Displaying Team Names Help
#1

closed.
Reply
#2

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)
Reply
#3

okay thanks Ballu! +REP

Btw, *hands you some food*

God bless.
Reply
#4

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
Reply
#5

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]
Reply
#6

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?
Reply
#7

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);
     }
}
Reply
#8

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


Forum Jump:


Users browsing this thread: 1 Guest(s)