RemovePlayerMapIcon?
#1

How do I remove SetPlayerMarkerForPlayer...? i.e So I can create a /bkcancel.

pawn Код:
CMD:backup(playerid, params[])
{
    if(LoggedIn[playerid] == 0) return SendClientMessage(playerid, COLOUR_GREY, "You must be logged in to use this command.");
    new string[256];
    if(Faction[playerid] != 1) return SendClientMessage(playerid, COLOUR_GREY, "You are not a member of the police.");
   
    foreach(Player, i)
    {
        if(Faction[playerid] == Faction[i])
        {
            format(string, sizeof(string), "[Police Message] %s has activated their assistance beacon, please respond immediately.", GetNameEx(playerid));
            SendClientMessage(i, COLOUR_GREEN, string);

            SetPlayerMarkerForPlayer(playerid, i, COLOUR_BLUE);
            Beacon[playerid] = 1;
            }
        }
     return 1;
}
Reply
#2

You can't remove it per-say, but you can make it invisible.

pawn Код:
// Make the players marker invisible to the player while keeping chat colour the same. Will only work correctly if SetPlayerColor has been used:
SetPlayerMarkerForPlayer( 42, 1, ( GetPlayerColor( 1 ) & 0xFFFFFF00 ) );
Also, 256 cells for a string is NOT needed. Just so you know
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)