Stefax71 0 Posted August 3, 2023 Posted August 3, 2023 Hello all! I hope someone can help me out here! I am trying to stow an hogtied ped into a Prison Wagon (WAGONPRISON01X). I tried this task: ped.Tasks.EnterVehicle(_wagon, 5, EnterVehicleFlags.WarpIn) and it works but only if the ped is able to move (which makes sense). What I would like to accomplish is to be able to stow the hogtied ped I am carrying inside the wagon. I lurked around on FiveM docs and found some other functions, all of them, since they are tasks, are working only if the ped is not incapacitated. I tried recreating the ped inside the wagon but even if I pass the model, it uses another random model and the effect is not the best ever. Any hints? Thank you!!!! Quote
Stefax71 0 Posted August 3, 2023 Author Posted August 3, 2023 Ok I think I answered myself. I created this function that does exactly that and it works just fine: public static void SetPedIntoVehicle(Ped ped, Vehicle vehicle, int seatNumber) { Game.CallNative(NativeHashes.VEHICLE.SET_PED_INTO_VEHICLE, ped, vehicle, seatNumber); } maybe it was buried somewhere in RPH SDK but I did not really find it! The only thing I had to do was to set: ped.BlockPermanentEvents = true; to avoid the ped getting out of the wagon (apparently locking the door did not help) and shoot at me! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.