Detecting the vehicle
#3

GetPlayerCameraTargetVehicle will return the vehicle the player is looking at (but always returns the closest even if it's at the side). About the distance thing I'm not so sure, depending on what you want to do. Getting the distance between vehicle and player and if it is not somewhat equal to that specified amount, return that there's no vehicle or detect it with other way (looping and such is not very efficient unless you have an custom iterator with all the streamed vehicles for each player).
Reply


Messages In This Thread
Detecting the vehicle - by cdoubleoper - 28.05.2016, 18:53
Re: Detecting the vehicle - by Darkwood17 - 28.05.2016, 19:22
Re: Detecting the vehicle - by Konstantinos - 28.05.2016, 19:25
Re: Detecting the vehicle - by PrO.GameR - 28.05.2016, 20:12
Re: Detecting the vehicle - by cdoubleoper - 28.05.2016, 21:17

Forum Jump:


Users browsing this thread: 1 Guest(s)