NPC in boat bug - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: NPC in boat bug (
/showthread.php?tid=505873)
NPC in boat bug -
Dusan01 - 10.04.2014
Hi guys, i created NPC to drive a boat and i recorded him in boat with /vrecord, and when i connect him he just spawn at cords where record starts and he is in water and boat is behind him, and i change vehicle model to car(infernus,turismo...) and then works perfect?
What is problem?
Re: NPC in boat bug -
Dusan01 - 12.04.2014
BUMP
Re: NPC in boat bug -
Flake. - 13.04.2014
Can you at least show us your NPC spawning/placing in vehicle code?
Re: NPC in boat bug -
Dusan01 - 14.04.2014
here u go:
Code:
new MyFirstNPCVehicle;
ConnectNPC("Diler","mini");
MyFirstNPCVehicle = CreateVehicle(473, 2333.1509,-3322.9014,-0.4635, 1.6437, 0, 0, 5000);
now on player spawn:
Code:
if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC.
{
// print("diler 2 spawn priprema");
new npcname[MAX_PLAYER_NAME];
GetPlayerName(playerid, npcname, sizeof(npcname)); //Getting the NPC's name.
if(!strcmp(npcname, "Diler", true)) //Checking if the NPC's name is MyFirstNPC
{
npcid = playerid;
PutPlayerInVehicle(playerid, MyFirstNPCVehicle, 0);
}
return 1;
}
and he just spawn under the vehicle...
Re: NPC in boat bug -
Dusan01 - 15.04.2014
BUMP