30.09.2011, 14:52
I want to make one class on my gangwar TDM to be for admins only I have the class set up and everything as class ID 4. Now I looked at the wiki for OnPlayerRequestSpawn so I could figure out how to not let them spawn if they werent admin,
is the code from the wiki, Where the "if(!IsPlayerAdmin(playerid)) how would I put it to check if they were on class id 4? And if they were admin? please help ASAP
pawn Code:
public OnPlayerRequestSpawn(playerid)
{
if(!IsPlayerAdmin(playerid))
{
SendClientMessage(playerid,COLOR_GREEN,"You may not spawn.");
return 0;
}
return 1;
}
pawn Code:
if(classid == 4) && if(PlayerInfo[playerid][pAdmin] > 1)