10.02.2013, 20:32
I'm trying to make it so you need at least 50 score to choose these two classes. (In this case, Police and Mafia.) This is my current code, but it doesn't seem to be working. I choose the class, and spawn and then get the message saying I need at least 50 score to choose this class. But I want it so you can't spawn unless you have 50 score.
Any help would be appreciated.
pawn Код:
public OnPlayerRequestSpawn(playerid)
{
if(classid == 2 || classid == 3)
{
new score = GetPlayerScore(playerid);
if(score <50) return SendClientMessage(playerid,COLOR_RED, "You need at least 50 Score to choose this Team.");
{
return 0;
}
}
if(classid == 4 || classid == 5)
{
new score = GetPlayerScore(playerid);
if(score <50) return SendClientMessage(playerid,COLOR_RED, "You need at least 50 Score to choose this Team.");
{
return 0;
}
}
return 1;
}