29.08.2011, 16:49
Hi , i want whene a player is in Team Selection Creat a Text like : HUMANS for Skin ID 290
How to do it?
How to do it?
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...
{
//...
}
switch(classid)
{
case 0 .. 3: { // This is for skin 0 untill 3 (0, 1, 2, 3)
// allt he stuff you want for the first 4 skins
}
case 4, 5, 6, 7: {
// all the stuff you want for the classes 4, 5, 6, 7
}
}
AddPlayerClass(/*blablabla*/);//skin or class 1
AddPlayerClass(/*blablabla*/);//skin or class 2
AddPlayerClass(/*blablabla*/);//skin or class 3
if (classid == 0)//this means: when the player looks at the skin 1 it shows
{
GameTextForPlayer(playerid, "Human", 500, 5);//the text humans
gTeam[playerid] = TEAM1;//sets this skin to team1
SetPlayerTeam(playerid,TEAM1);
}
else if (classid == 1)//and then if the skin is the 2nd skin we have set up with AddPlayerClass
{
//...do stuff...
}
//and so on
hi,
id try smth. like: pawn Code:
Do u use gTeam? If so, just adjust the gTeam variable to ur needs: gTeam[playerid] = ChangeThisToYourDefinedTeams; Was this helpfull? |
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);
}