NPC wont get in the vehicle? - 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 wont get in the vehicle? (
/showthread.php?tid=420193)
NPC wont get in the vehicle? -
mati233 - 03.03.2013
Hello guys,
I was scripting some NPC's but I'm getting an issue when I try to put a NPC on a vehicle.
The NPC connects fine, and works great with onfoot recs, but when I try to PutPlayerinVehicle the NPC disconnects with reason 0:0.
I'm sure the vehicle exists with the correct id, so why wont it work? Any tips?
Thanks
Re: NPC wont get in the vehicle? -
MP2 - 03.03.2013
You can't put NPCs in to vehicles. They have to either be entirely on-foot or entirely in-vehicle.
Re: NPC wont get in the vehicle? -
mati233 - 04.03.2013
Nevermind, I added some prints to the OnNPCEnterVehicle, and when I tried to PutPlayerinVehicle he disconnected after ~5seconds without printing anything because my .rec file was bad named.
I hope this helps someone out, sometimes we're dumb and lost a lot of time with the error in front of our eyes.
Solved.
Re: NPC wont get in the vehicle? -
Petricko - 04.03.2013
pawn Код:
public OnNPCEnterVehicle(vehicleid, seatid)
{
StartRecordingPlayback(PLAYER_RECORDING_TYPE_DRIVER,"Your .rec file name");
}