[Help] NPC's invisible on Radar
#1

Hi!
Ok, i want that the NPC's are not green on the radar.
-> how to change there color?
--> The best would be that there is no maker(ONLY FOR NPC's)

please help!
Reply
#2

i took this from gl_npcs filterscript as an example
pawn Код:
public OnPlayerSpawn(playerid)
{
    if(!IsPlayerNPC(playerid)) return 1; // We only deal with NPC players in this script

    new playername[64];
    GetPlayerName(playerid,playername,64);

    if(!strcmp(playername,"TrainDriverLV",true)) {
    PutPlayerInVehicle(playerid,1,0);
    SetPlayerColor(playerid,0xFFFFFFFF); // if you dont want them to be visible on map remove this line(s)
           // or change this color to whatever colour you want them to be
    }
    else if(!strcmp(playername,"TrainDriverSF",true)) {
      PutPlayerInVehicle(playerid,5,0);
      SetPlayerColor(playerid,0xFFFFFFFF);
    }
    else if(!strcmp(playername,"TrainDriverLS",true)) {
      PutPlayerInVehicle(playerid,9,0);
      SetPlayerColor(playerid,0xFFFFFFFF);
    }
    else if(!strcmp(playername,"PilotLV",true)) {
      PutPlayerInVehicle(playerid,13,0);
      SetPlayerColor(playerid,0xFFFFFFFF);
    }
    else if(!strcmp(playername,"PilotSF",true)) {
      PutPlayerInVehicle(playerid,14,0);
      SetPlayerColor(playerid,0xFFFFFFFF);
    }
    else if(!strcmp(playername,"PilotLS",true)) {
      PutPlayerInVehicle(playerid,15,0);
      SetPlayerColor(playerid,0xFFFFFFFF);
    }
    else if(!strcmp(playername,"TestIdleDriver",true)) {
      PutPlayerInVehicle(playerid,43,0);
      SetPlayerColor(playerid,0xFFFFFFFF);
    }
    else if(!strcmp(playername,"TaxiTest",true)) {
      PutPlayerInVehicle(playerid,968,0);
      SetPlayerColor(playerid,0xFFFFFFFF);
    }

    return 1;
}
Reply
#3

already tried this - doesnt work
Reply
#4

SetPlayerColor(NPCid,0);

I thought this had been answered once before.
Reply
#5

sorry ^^ but i searched xD


hmmm.. do you mean like SetPlayerColor(FLIGHTLS,0); ??

-> doesnt work
Reply
#6

I mean like
pawn Код:
public OnPlayerConnect(playerid)
{
  if(IsPlayerNPC(playerid))SetPlayerColor(playerid,0);
}
Reply
#7

doesnt work too
Reply
#8

Try this:

pawn Код:
public OnPlayerConnect(playerid)
{
  if(IsPlayerNPC(playerid)
  {
     SetPlayerColor(playerid,0xFFFFFF00);
     return 1;
  }
  return 1;
}
it's work perfectly for me
Reply
#9

but it doesnt work for me lol
Reply
#10

So use it in ur npcmode at SetPlayerColor(playerid, 0xFFFFFFFF); and you put 0xFFFFFF00 as color
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)