Admin Class Help?
#1

Hello,i searched on sa=mp forums and wiki but i cant do it,i've added AddPlayerClass and putted this OnPlayerRequestSpawn,i took it from torran's post.
Код:
OnPlayerRequestClass(playerid, classid)
{
for(new i = 0; i<MAX_PLAYERS; i++)
{
if(GetPlayerSkin(i) == 294)
 {
	if(IsPlayerLAdmin(playerid)) //i use LAdmin system thats why its LAdmin
	{
		return 1;
		SendClientMessage(playerid, "Welcome Admin");
	}
	else
	{
		GameTextForPlayer(playerid, "You aren't an admin!", 5000, 5);
		ForceClassSelection()
		return 0;
	}
}
Can anyone paste a code or help?Thanks!
Reply
#2

pawn Код:
public OnPlayerRequestSpawn(playerid)
{
if(GetPlayerSkin(playerid) == 294)
 {
    if(IsPlayerLAdmin(playerid)) //i use LAdmin system thats why its LAdmin
    {
        SendClientMessage(playerid, "Welcome Admin");
        return 1;
    }
    else
    {
        GameTextForPlayer(playerid, "You aren't an admin!", 5000, 5);
        return 0;
    }
}
return 1;
}
}
Try that
Reply
#3

I use this on ladmin4v2

Quote:

public OnPlayerSpawn(playerid)
{
if(PlayerInfo[playerid][LoggedIn] == 1) {
if(PlayerInfo[playerid][Level] >= 1) {
SetPlayerColor(playerid,Admin color);
SetPlayerSkin(playerid, Skin Id here);
GameTextForPlayer(playerid,"~y~~n~~n~~n~Welcome ~r~Admin",4000,3);
}
}
return 1;
}

Reply
#4

Thanks guys i will try it soon
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)