HELP - Add player class with tag/name
#1

i know addplayerclass cmd only !!!

help guys...how can i addplayerclass with name when players selecting a class... !!!

like this----
Reply
#2

What? Explain better
Reply
#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
#4

Thx Bro .... but check the img i want like that!!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)