Quote:
Originally Posted by arakuta
Create a per-player variable to store the skin at OnPlayerRequestClass.
At OnPlayerRequestSpawn, check if the skin is enabled for playerid to prevent him from spawn.
pawn Код:
public OnPlayerRequestClass(playerid,classid) { pClass[playerid] = classid; return 1; }
public OnPlayerRequestSpawn(playerid) { if(pClass[playerid] == 11 && GetPlayerScore(playerid) < 1000) { SendClientMessage(playerid,-1,"You're too young to be a cop!"); return 0; // It means not spawn, and keep the player at class selection, till he choose a valid class for him. } return 1; }
|
Oh return 0 and OnPlayerRequestSpawn

, will update my code too.