SA-MP Forums Archive
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: Player Markers (/showthread.php?tid=435663)



Player Markers - DLR - 07.05.2013

I'm trying to set up a command that shows a player marker to the player that typed the command. It's basically for police to track other players.

It changes their name colour to red and I want it to show their marker. However, in my OnGameModeInit I have ShowPlayerMarkers(0);

When I type the command, I have SetPlayerMarkerForPlayer(playerid, giveplayerid, 0xFF0000AA);

It turns the name red, but doesn't show a marker.

Any help greatly appreciated.


Re: Player Markers - Sithis - 08.05.2013

As per https://sampwiki.blast.hk/wiki/SetPlayerMarkerForPlayer:

The ShowPlayerMarkers(); should be 1. Because SetPlayerMarkerForPlayer() will only CHANGE the colour of the marker, not enable it.

What you could try is setting a checkpoint of some sort instead of what you're trying to do now with suspects.

EDIT: You can show them by default and do this:
Код:
Set the alpha to 00 for an invisible blip.
Which applies to the color property of SetPlayerMarkerForPlayer( playerid, showplayerid, color );

Once a player needs to see a suspect, change the color to something and make sure the alpha value is set in such a way it's visible instead of invisible


Re: Player Markers - DLR - 09.05.2013

So when a player connects I'd have to do a loop to make all the player markers alpha 00.


Re: Player Markers - TheStreetsRP - 09.05.2013

Correct, DLR. You'll need to loop through all connected players & set their alpha to 00 for the player that just connected.


Re: Player Markers - DLR - 10.05.2013

Easy enough I guess.


Re: Player Markers - DLR - 12.05.2013

I've tried this code in both OnPlayerConnect and OnPlayerLogin and neither seems to work.

pawn Код:
// Set player markers alphas invisible to player
        foreach (new mId : Player)
        {
            SetPlayerMarkerForPlayer( playerid, mId, 0xFFFFFF00 );
        }
And in OnGameModeInit I've put ShowPlayerMarkers(2);

EDIT:

It seems that if a players name tag changes colour (Depending on faction etc.) the player marker will appear, unless it's white.


Re: Player Markers - DLR - 15.05.2013

bump


Re: Player Markers - DLR - 20.05.2013

bump