09.12.2009, 23:54
No, it's a callback.
Leave the classes for now. Lets say you want to have class 1 2 and 3 for admins, you do this:
Leave the classes for now. Lets say you want to have class 1 2 and 3 for admins, you do this:
pawn Код:
new pClass[MAX_PLAYERS]; // Top of script, outside of all publics etc.
public OnPlayerRequestSpawn(playerid)
{
if(pClass[playerid] == 1 || pClass[playerid] == 2 || pClass[playerid] == 3)
{
if(!IsPlayerAdmin(playerid))
{
SendClientMessage(playerid, color, "This skin is for admins only!");
return 0;
}
}
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
pClass[playerid] = classid;
return 1;
}