28.07.2010, 21:07
Hi,
I have 2 teams and I want to show Player marker only for players in team.
In OnPlayerSpawn I have this code for show and hide player markers
Color definition is :
#define T1 0x38FF06FF
#define T1I 0x38FF0600
#define T2 0xFFFF00FF
#define T2I 0xFFFF0000
My code don't work correct know why.
Sorry for english.
I have 2 teams and I want to show Player marker only for players in team.
In OnPlayerSpawn I have this code for show and hide player markers
Код:
for(new i=0;i<MAX_PLAYERS;i++){ if(IsPlayerConnected(i)){ if(Player[i][Team]==Player[playerid][Team]){ if(Player[playerid][Team]==1){ SetPlayerMarkerForPlayer(playerid,i,T1); SetPlayerMarkerForPlayer(i,playerid,T1); } if(Player[playerid][Team]==2){ SetPlayerMarkerForPlayer(playerid,i,T2); SetPlayerMarkerForPlayer(i,playerid,T2); } }else{ if(Player[playerid][Team]==1){ SetPlayerMarkerForPlayer(playerid,i,T2I); SetPlayerMarkerForPlayer(i,playerid,T1I); } if(Player[playerid][Team]==2){ SetPlayerMarkerForPlayer(playerid,i,T1I); SetPlayerMarkerForPlayer(i,playerid,T2I); } } } }
#define T1 0x38FF06FF
#define T1I 0x38FF0600
#define T2 0xFFFF00FF
#define T2I 0xFFFF0000
My code don't work correct know why.
Sorry for english.