NPC wont get in the vehicle?
#1

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
Reply
#2

You can't put NPCs in to vehicles. They have to either be entirely on-foot or entirely in-vehicle.
Reply
#3

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.
Reply
#4

pawn Код:
public OnNPCEnterVehicle(vehicleid, seatid)
{
    StartRecordingPlayback(PLAYER_RECORDING_TYPE_DRIVER,"Your .rec file name");
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)