Marker shows the wanted
#1

If someone on my rp is wanted,
I want it to light up for all TEAM_COP,
I have ShowPlayerMarkers set to 0
But if someone commits a crime, I want it to show there marker to all cops,
All of them not just one, All of them, How would i do this
Reply
#2

Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
     if(TEAM_COP[i] == 1) //you'll need to adjust this bit to however you've set teams up in your server
     {
         SetPlayerMarkerForPlayer(i, the id of the player who committed the crime, the colour you want to set them to);
     }
}
Reply
#3

Ok that works ty, But how would i make only one players marker show for everyone,
Not everyones marker for everyone, Just one players marker for everyone, How would i do this,
Example: When a admin is on duty it shows for everyone, Like that, But im using it for a Game helper
Reply
#4

Well the thing I'm not sure about is whether

Код:
ShowPlayerMarkers(0);
sets it so that even if you use SetPlayerMarkerForPlayer then you can't change their marker...

If this is the case then you can do this instead:

Код:
public OnPlayerConnect(playerid)
{
    new name[20];
    GetPlayerName(playerid, name, sizeof(name));

    if(strcmp(name, "the name of the helper", true) != 0)
    {
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
             if(IsPlayerConnected(i) == 1)
             {
                  SetPlayerMarkerForPlayer(i, playerid, (GetPlayerColor(playerid) & 0xFFFFFF00 )); //this will remove the player's marker.
             }
        }
    }
    else
    {
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
             if(IsPlayerConnected(i) == 1)
             {
                 SetPlayerMarkerForPlayer(i, playerid, pick a colour for your helper);
             }
        }
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)