SA-MP Forums Archive
How to remove minimap marker on NPC - 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: How to remove minimap marker on NPC (/showthread.php?tid=665639)



How to remove minimap marker on NPC - MichiCZ - 11.04.2019

Код:
	if(IsPlayerNPC(playerid))
	{
    	new npcname[MAX_PLAYER_NAME];
    	GetPlayerName(playerid, npcname, sizeof(npcname));
    	if(!strcmp(npcname, "Natasha", true))
    	{
     		new Text3D:label = Create3DTextLabel("Natasha", COLOR_WHITE, 30.0, 40.0, 5.0, 40.0, 1);
			Attach3DTextLabelToPlayer(label, playerid, 0.0, 0.0, 0.0);
      		SetPlayerSkin(playerid, 197);
      		TogglePlayerControllable(playerid,0);
      		SetPlayerPos(playerid, 6.6185,1955.5071,17.6406);
			SetPlayerFacingAngle(playerid, 270.0592);
			for(new i = 0; i < MAX_PLAYERS; i++)
    		{
        		SetPlayerMarkerForPlayer(i, playerid, 0xFFFFFF00 );
    		}
      		print("Natasha spawned!");
      		return 1;
    	}
    	return 1;
	}
After using this, is still NPC visible on minimap


Re: How to remove minimap marker on NPC - Freaksken - 11.04.2019

If you want to disable the player icon on the mini map for ALL players, you can just use this:
Код:
SetPlayerColor(playerid, 0xFFFFFF00);
instead of this:
Код:
for(new i = 0; i < MAX_PLAYERS; i++) {
	SetPlayerMarkerForPlayer(i, playerid, 0xFFFFFF00);
}