Posts: 197
Threads: 12
Joined: Oct 2015
Reputation:
0
how can i prevent player to spawn with a specified skin if he has selected value (for e.g 0 instead of 1) in some variable?
i mean, using OnPlayerRequestSpawn and returning 0 doesn't work for me, are there any other methods?
Posts: 539
Threads: 30
Joined: Feb 2015
Reputation:
0
Well, use OnPlayerRequestSpawn to check for that.
Posts: 579
Threads: 5
Joined: Oct 2015
PHP код:
public OnPlayerRequestClass(playerid, classid)
{
SetPVarInt(playerid, "class", classid);
return 1;
}
PHP код:
public OnPlayerRequestSpawn(playerid)
{
new class;
class = GetPVarInt(playerid, "class");
if(class == 217 && !IsPlayerAdmin(playerid)) // change to whatever class you want to make it for admins only.
{
GameTextForPlayer(playerid, "You can't use admin skins.", 3000, 5);
return 0;
}
return 1;
}