10.02.2013, 20:50
Where are you getting 'classid' from if it doesn't exist..?
You need to save the player's classid in a variable under OnPlayerRequestClass.
'return SendClientMessage(...)' is the same as 'return 1'. You need to return 0 to stop them from spawning.
Also you have two checks when you only need one. Also there's no need to declare a variable when you're only using a function once.
You need to save the player's classid in a variable under OnPlayerRequestClass.
'return SendClientMessage(...)' is the same as 'return 1'. You need to return 0 to stop them from spawning.
pawn Код:
public OnPlayerRequestSpawn(playerid)
{
if(classid == 2 || classid == 3 || classid == 4|| classid == 5)
{
if(GetPlayerScore(playerid) < 50)
{
SendClientMessage(playerid,COLOR_RED, "You need at least 50 Score to choose this Team.");
return 0;
}
}
return 1;
}