SA-MP Forums Archive
show player markers - 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)
+--- Thread: show player markers (/showthread.php?tid=454563)



show player markers problem - rouzbeh - 29.07.2013

i want to use SetPlayerMarkerForPlayer,but if i write ShowPlayerMarkers(0) in game mode,SetPlayerMarkerForPlayer doesn't show markers on map and Does setplayercolor.
i have a RPG server and i dont want to mark all players for all players with marker.
i just want many players can see many players in map with marker,but its impossible when i writen ShowPlayerMarkers(0);
how i can do that?


Re: show player markers - cessil - 30.07.2013

you probably want to use ShowPlayerMarkers(2); which would be streamed players only, also don't use SetPlayerMarkerForPlayer if you don't want it to change


AW: show player markers - BigETI - 30.07.2013

pawn Код:
ShowPlayerMarker(2)
or
pawn Код:
ShowPlayerMarker(PLAYER_MARKERS_MODE_STREAMED)
will just show player markers, if the players are streamed to the observing player.

If you want to hide specified Markers, you can use

pawn Код:
SetPlayerMarkerForPlayer(playerid, toplayerid, GetPlayerColor(playerid)&0xFFFFFF00)
which sets the alpha channel to 0, and the streamed player will have an invisible marker to the observing player.

To show a marker, you have to do
pawn Код:
SetPlayerMarkerForPlayer(playerid, toplayerid, GetPlayerColor(playerid))
which uses the original set alpha channel or
pawn Код:
SetPlayerMarkerForPlayer(playerid, toplayerid, (GetPlayerColor(playerid)&0xFFFFFF00)|my_alpha)
which uses a custom alpha channel value.

You have to re-call SetPlayerMarkerForPlayer inside OnPlayerStreamIn and OnPlayerStreamOut to re-sync markers to observing players.


Re: show player markers - rouzbeh - 30.07.2013

very thanks BigETI and cessil
Thats Fixed.
+Rep ...


AW: show player markers - BigETI - 28.08.2013

*cough*...