How to remove minimap marker on NPC
#1

Код:
	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
Reply
#2

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);
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)