HELP - Add player class with tag/name
#3

Define the classes like so:

pawn Код:
#define CLASS_ONE
#define CLASS_TWO
Make a stock that seperates the team from AddPlayerClass, So the 1st AddPlayerClass will be 0, the 2nd 1 and so on.

pawn Код:
stock OnPlayerSelectClass(playerid, classid);
{
    switch(classid)
    {
        case 0:
        {
             gTeam[playerid] = CLASS_ONE;
        }    
        case 1:
        {
             gTeam[playerid] = CLASS_TWO;
        }
    }
}
And place the function under OnPlayerRequestClass(playerid, classid) like so:

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    OnPlayerSelectClass(playerid, classid);
    //other code here
    return 1;
}
Should work.

EDIT: typos

EDIT2: typo
Reply


Messages In This Thread
HELP - Add player class with tag/name - by Lak[S]hYa - 08.08.2011, 09:19
Re: HELP - Add player class with tag/name - by zombieking - 08.08.2011, 09:24
Re: HELP - Add player class with tag/name - by Godhimself - 08.08.2011, 09:27
Re: HELP - Add player class with tag/name - by Lak[S]hYa - 08.08.2011, 15:20

Forum Jump:


Users browsing this thread: 2 Guest(s)