SA-MP Forums Archive
Displaying Team Names Help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Displaying Team Names Help (/showthread.php?tid=336625)



closed. :) - WarriorEd22 - 23.04.2012

closed.


Re: Displaying Team Names Help - Ballu Miaa - 23.04.2012

That wont work at all. You need to do it the way you're doing it in the above code.

Example:
pawn Код:
if(GetPlayerSkin(playerid) == 284 || GetPlayerSkin(playerid) == 285 || GetPlayerSkin(playerid) == 286)



Re: Displaying Team Names Help - WarriorEd22 - 23.04.2012

okay thanks Ballu! +REP

Btw, *hands you some food*

God bless.


Re: Displaying Team Names Help - Ballu Miaa - 23.04.2012

Quote:
Originally Posted by WarriorEd22
Посмотреть сообщение
okay thanks Ballu! +REP

Btw, *hands you some food*

God bless.
Hahaha Thanks for the food bruh and the rep given.

God Bless Kalcor ,****** and US ALL. Peace


Re: Displaying Team Names Help - Yuryfury - 23.04.2012

If you have a lot of skin ids, this would be easier.

pawn Код:
switch (GetPlayerSkin(playerid))
{
     case 284,285,286:
     {
          GameTextForPlayer(playerid, "~b~Blue Team", 1000, 4);
     }
}
Control Structures - Switch [sa-mp wiki]


Re: Displaying Team Names Help - WarriorEd22 - 23.04.2012

Quote:
Originally Posted by Yuryfury
Посмотреть сообщение
If you have a lot of skin ids, this would be easier.

pawn Код:
switch (GetPlayerSkin(playerid))
{
     case 284,285,286:
     {
          GameTextForPlayer(playerid, "~b~Blue Team", 1000, 4);
     }
}
Control Structures - Switch [sa-mp wiki]
Okay I see so does "case 284,285,286:" mean the skin ID's?


Re: Displaying Team Names Help - Yuryfury - 23.04.2012

Yep, just add as many as you need (separated by commas). You can also add another case:

pawn Код:
switch (GetPlayerSkin(playerid))
{
     case 284,285,286:
     {
          GameTextForPlayer(playerid, "~b~Blue Team", 1000, 4);
     }
     case 289,292,299:
     {
          GameTextForPlayer(playerid,"~r~Red Team",1000,4);
     }
}



Re: Displaying Team Names Help - Ballu Miaa - 23.04.2012

Switch case is also better way to do the Job you want.