Player Markers
#1

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

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

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

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

Easy enough I guess.
Reply
#6

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

bump
Reply
#8

bump
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)