Help with this problem regarding class selection.
#1

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.

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;
}
Any help would be appreciated.
Reply


Messages In This Thread
Help with this problem regarding class selection. - by rangerxxll - 10.02.2013, 20:32
Re: Help with this problem regarding class selection. - by MP2 - 10.02.2013, 20:50
Re: Help with this problem regarding class selection. - by rangerxxll - 10.02.2013, 22:07

Forum Jump:


Users browsing this thread: 1 Guest(s)