#1

....
Reply
#2

Check the JunkBuster for Anti-Npc
Reply
#3

....
Reply
#4

pawn Код:
if(IsPlayerNPC(playerid)) return 1;
Put this under OnPlayerRequestSpawn
Reply
#5

....
Reply
#6

You should figure out what is blocking your NPC, because you must know it is like a Player, but the problem is that he can't register herself...

You know what I mean?
Reply
#7

....
Reply
#8

pawn Код:
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, "MyFirstNPC", true)) //Checking if the NPC's name is MyFirstNPC
    {
      PutPlayerInVehicle(playerid, MyFirstNPCVehicle, 0); //Putting the NPC into the vehicle we created for it.
    }
    return 1;
  }
  //Other stuff for normal players goes here!
  return 1;
}
I copied it from Kye's post regarding NPC creation. If it's a vehicle NPC then leave it as is, if it's a walking NPC then use SetSpawnInfo on it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)