show player markers
#1

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?
Reply
#2

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
Reply
#3

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.
Reply
#4

very thanks BigETI and cessil
Thats Fixed.
+Rep ...
Reply
#5

*cough*...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)