Rob0 Posted July 18, 2015 Posted July 18, 2015 Standing outside a vehicle i press f to drive it. While i engage in the auto walk to vehicle sequence isPedInVehicle(source) reports true, getPedOccupiedVehicle reports the vehicle's id, getPedOccupiedVehicleSeat(source) reports 0... with reports 1 and 3 listed here being in fact false. I am not in the vehicle I am walking to it as well not being in a seat. How do correct for this? I need a confirmation that reports false until the player is in control of the vehicle.
Addlibs Posted July 18, 2015 Posted July 18, 2015 Use isPedInVehicle() in conjunction with getPedSimplestTask() == "TASK_COMPLEX_CAR_DRIVE" (not sure, but this should work for passengers as well), or try testing for an array (table) of specific tasks, including tasks like TASK_COMPLEX_DO_DRIVEBY. Find all tasks here: List of player tasks
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now