SA-MP Forums Archive
Player markers on global, are still not showing up :( - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Player markers on global, are still not showing up :( (/showthread.php?tid=143246)



Player markers on global, are still not showing up :( - VMAN - 21.04.2010

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

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;
}