RemovePlayerMapIcon? - 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: RemovePlayerMapIcon? (
/showthread.php?tid=303643)
RemovePlayerMapIcon? -
Dokins - 14.12.2011
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;
}
Re: RemovePlayerMapIcon? -
Scarred - 14.12.2011
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