SA-MP Forums Archive
Admin Class Help? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Admin Class Help? (/showthread.php?tid=154741)



Admin Class Help? - Youtube - 15.06.2010

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!


Re: Admin Class Help? - NewTorran - 15.06.2010

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


Re: Admin Class Help? - hab2ever - 15.06.2010

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;
}




Re: Admin Class Help? - Youtube - 15.06.2010

Thanks guys i will try it soon