SA-MP Forums Archive
NPC doesnt enter vehcile - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: NPC doesnt enter vehcile (/showthread.php?tid=360017)



NPC doesnt enter vehcile - omario - 16.07.2012

Hey,

i made this npc but i doesnt enter the vehcile and some times samp-npc.exe crashes

the npc stands on vehcile but doesnt enter



Код:
#include <a_samp>

#define FILTERSCRIPT

new Taxi1_ID, TaxiVehcile_NPC1;

public OnFilterScriptInit()
{
    print("NPC-1 is ready");
    ConnectNPC("NPC_NAME","Taxi1");
    return 1;
}

public OnPlayerSpawn(playerid)
{
  if(IsPlayerNPC(playerid)) 
  {
    new npcname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, npcname, sizeof(npcname)); 
    if(!strcmp(npcname, "NPC_NAME", true))
    {
      SetPlayerSkin(playerid, 182);
      TaxiVehcile_NPC1 = AddStaticVehicle(420, 1999.0, -1434.0, 14.8, 0.0, 0, 0);
      PutPlayerInVehicle(playerid, TaxiVehcile_NPC1, 0);
      Taxi1_ID = playerid;
    }
  }
  return 1;
}



Re: NPC doesnt enter vehcile - omario - 16.07.2012

now the npc enters the vehicle but after it crashes after it finish the playback