Help with this problem regarding class selection.
#2

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.

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;
}
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.
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)