21.04.2010, 23:45
I have ShowPlayerMarkers(1); in my game mode init callback.
It works fine, but the problem is that when I go close to a cop I can suddenly see his marker![Sad](images/smilies/sad.gif)
How do I make them only show team
I have two teams.
Here is the only code that affects markers:
It works fine, but the problem is that when I go close to a cop I can suddenly see his marker
![Sad](images/smilies/sad.gif)
How do I make them only show team
I have two teams.
Here is the only code that affects markers:
Код:
public SetPlayerNametagsMarkers(id) { if(playerteam[id] == TEAM_POLICE) { for(new i=0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(playerteam[i] == TEAM_POLICE) { ShowPlayerNameTagForPlayer(i, id, true); SetPlayerMarkerForPlayer(i, id, TEAM_POLICE_COLOR); ShowPlayerNameTagForPlayer(id, i, true); SetPlayerMarkerForPlayer(id, i, TEAM_POLICE_COLOR); } else if(playerteam[i] == TEAM_CROOKS) { ShowPlayerNameTagForPlayer(i, id, false); SetPlayerMarkerForPlayer(i, id, 0xFFA50000); ShowPlayerNameTagForPlayer(id, i, false); SetPlayerMarkerForPlayer(id, i, 0xFFA50000); } } } } else if(playerteam[id] == TEAM_CROOKS) { for(new i=0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(playerteam[i] == TEAM_POLICE) { ShowPlayerNameTagForPlayer(i, id, false); SetPlayerMarkerForPlayer(i, id, 0x80008000); ShowPlayerNameTagForPlayer(id, i, false); SetPlayerMarkerForPlayer(id, i, 0x80008000); } else if(playerteam[i] == TEAM_CROOKS) { ShowPlayerNameTagForPlayer(i, id, true); SetPlayerMarkerForPlayer(i, id, TEAM_CROOKS_COLOR); ShowPlayerNameTagForPlayer(id, i, true); SetPlayerMarkerForPlayer(id, i, TEAM_CROOKS_COLOR); } } } } return 1; }