How to Make Text for Team Selection?
#10

Quote:
Originally Posted by BlackWolf120
View Post
hi,
id try smth. like:

pawn Code:
if (classid == 0)//ur first skin added with AddPlayerClass
    {
    GameTextForPlayer(playerid, "~r~Zombie", 500, 5);
    gTeam[playerid] = TEAM1;
    SetPlayerTeam(playerid,TEAM1);
    }
    else if (classid == 1)//second skin
    {
    GameTextForPlayer(playerid, "~b~Human", 500, 5);
    gTeam[playerid] = TEAM2;
    SetPlayerTeam(playerid,TEAM2);
    }
    }
    else if (classid == 2)//and so on...
    {
    //...
    }
Use this code in the callback OnPlayerRequestClass.

Do u use gTeam?
If so, just adjust the gTeam variable to ur needs: gTeam[playerid] = ChangeThisToYourDefinedTeams;

Was this helpfull?
pawn Code:
switch(classid)
{
    case 0: GameTextForPlayer(playerid, "~r~CJ", 500, 5);
    case 1: GameTextForPlayer(playerid, "~b~Weed Smoker", 500, 5);
    case 2: GameTextForPlayer(playerid, "~b~Gangster", 500, 5);
}
They will work both the same ways but this way is more efficient.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)