SA-MP Forums Archive
Is it possible?. - 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: Is it possible?. (/showthread.php?tid=82270)



Is it possible?. - -eXo - 17.06.2009

Is it possible to make player markers only show up for members of certain teams/factions?


Re: Is it possible?. - [M2S]moe - 17.06.2009

Sure, use SetPlayerMarkerForPlayer. For example:

for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(gTeam[i] == TEAM_MEDIC)
{
SetPlayerMarkerForPlayer(i, i, 0xFF0000FF);
}
}
}

This will make team medic have red markers which only their team can see.


Re: Is it possible?. - -eXo - 17.06.2009

I'm using it in a command, so would this work?
Код:
if(IsPlayerConnected(i))
						{
							if(gTeam[i] == 2)
		  {
								SetPlayerMarkerForPlayer(i, i, 0xFF0000FF);
								SendClientMessage(i, TEAM_BLUE_COLOR, string);
							}
						}
					}