SetPlayerColor Query
#1

Hey,
So I'm having an issue with
Код:
SetPlayerColor(playerid, X);
If I have more than 1 person in a server for example, If I select a team that gives me color yellow, It sets everyone yellow in tab list for me..
Can anyone tell me why its showing everyone as yellow in tab list and minimap please.
But for others
Lets say

I'm Team 1 - Yellow
Someone selects Team 2 - Blue
I'll appear blue for them but they appear yellow for me..
So we look like we're the same team to each other..
I'll be yellow an so will he for me
and for him
I'll be blue an so will he...

_
But if he dies, His color then changes for me..
And same for him If I die my color will change for him, It'll go to yellow an for me he'll go blue
Reply
#2

In which callback do you placed this function?
Can you give us more code?
Reply
#3

It's simple, while selection of the class/team, put a value for the player for example:
Код:
new playerteam[MAX_PLAYERS];

//While selecting the team
playerteam[playerid] = 1; //for yellow
playerteam[playerid] = 2; // for blue 

/* Select any color you wish to and set their value.*/

//OnPlayerSpawn
if(playerteam[playerid] == 1)
{
       SetPlayerColor(playerid,x); // X = the color code of yellow
}
else if(playerteam[playerid] == 2)
{
       SetPlayerColor(playerid,x); // X = color code of blue
}
For any other queries or issues, PM me. I can script the whole feature at a paid service. Thank you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)