PDA

View Full Version : PutPlayerInVehicle(NPC) - Passenger NPC/Actor


Adam_Hardy
23/02/2018, 07:32 PM
I've tried it million times and it's still not working. PutPlayerInVehicle doesn't work for NPCs at all? Even for Actors? It doesn't work on either RNPC or FCNPC aswell. Is there a way I can achieve doing that? Nothing happens when I do the function.

PutPlayerInVehicle(NPC, car, 1);

Please try the function before you comment that it works for you, maybe you just think in does.

Ritzy2K
23/02/2018, 07:43 PM
If my memory serves right. NPC can only be driver. Which means, seat id 0 (driver) not 1 (front passenger.) I might be wrong, though.

Adam_Hardy
06/03/2018, 07:00 PM
Can anyone help?

NaS
06/03/2018, 07:03 PM
FCNPC however should work. Worked with that myself (FCNPC Taxi System to find fares if no players are around). But here you have to use FCNPC_PutInVehicle (or similar, FCNPC-exclusive function). SAMP's PutPlayerInVehicle doesn't work for FCNPC.

Regular NPCs can indeed not be passengers iirc. I failed to achieve the above mentioned Taxi System with regular NPCs, so I used FCNPC.
With the new FCNPC version you can also use FCNPC_EnterVehicle, if the NPC is close, it will use the door like a player.

Adam_Hardy
06/03/2018, 09:11 PM
FCNPC however should work. Worked with that myself (FCNPC Taxi System to find fares if no players are around). But here you have to use FCNPC_PutInVehicle (or similar, FCNPC-exclusive function). SAMP's PutPlayerInVehicle doesn't work for FCNPC.

Regular NPCs can indeed not be passengers iirc. I failed to achieve the above mentioned Taxi System with regular NPCs, so I used FCNPC.
With the new FCNPC version you can also use FCNPC_EnterVehicle, if the NPC is close, it will use the door like a player.

You're right, thanks for the help repped ♥