How to Disable this ?
#1

Hey Guys, i have a NPC on my server and i want to remove the Marker from Map, i want him to be invisible in map !!
Reply
#2

https://sampwiki.blast.hk/wiki/SetPlayerMarkerForPlayer
Reply
#3

or in SetPlayerColor set alpha to 00
Reply
#4

i use this...
Код:
public OnPlayerSpawn(playerid)
{
    if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC.
  	{
    	new npcname[MAX_PLAYER_NAME];
    	GetPlayerName(playerid, npcname, sizeof(npcname)); //Getting the NPC's name.
    	if(!strcmp(npcname, "Tram_Driver", true)) //Checking if the NPC's name is MyFirstNPC
    	{
      	PutPlayerInVehicle(playerid, SFTramVehicle, 0); //Putting the NPC into the vehicle we created for it.
    	}
  	}
where i gonna put the SetPlayerColor to invisible ?
Reply
#5

Before PutPlayerInVehicle
Reply
#6

Can you Put it so i can Copy / Paste it please ?
Reply
#7

Quote:

public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC.
{
new npcname[MAX_PLAYER_NAME];
GetPlayerName(playerid, npcname, sizeof(npcname)); //Getting the NPC's name.
if(!strcmp(npcname, "Tram_Driver", true)) //Checking if the NPC's name is MyFirstNPC
{
SetPlayerMarkerForPlayer( 42, 1, 0xFFFFFF00 );
PutPlayerInVehicle(playerid, SFTramVehicle, 0); //Putting the NPC into the vehicle we created for it.
}
}

....
Reply
#8

That was just an example of the wiki so it's supposed you had to use a loop for all the players but Jefff's idea is better. Just set the alpha of the color:
pawn Код:
SetPlayerColor(playerid, 0x00000000);
Reply
#9

@Clad if i want to put Invisible for all Players on my RolePlay server how to do it ?

Like that ?
Quote:

public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC.
{
new npcname[MAX_PLAYER_NAME];
GetPlayerName(playerid, npcname, sizeof(npcname)); //Getting the NPC's name.
if(!strcmp(npcname, "Tram_Driver", true)) //Checking if the NPC's name is MyFirstNPC
{
SetPlayerMarkerForPlayer( 42, 1, 0xFFFFFF00 );
PutPlayerInVehicle(playerid, SFTramVehicle, 0); //Putting the NPC into the vehicle we created for it.
}
}

because in wiki it say :

Quote:

// Make player 42 see player 1 as a red marker

but i don't want to none see Player 1 as a red marker
Reply
#10

Oh, for crying out load! Just use a color, any color, with 00 at the end. Like several people already told you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)