This function was added in SA-MP 0.3.7 and will not work in earlier versions!
Get the ID of the vehicle the player is looking at.
|playerid||The ID of the player to check.|
The vehicle ID of the vehicle the player is looking at. INVALID_VEHICLE_ID if none.
This function can (obviously) only return one vehicle ID at a time, while the player may be looking at multiple. It generally seems to detect the closest vehicle first.
This function is disabled by default to save bandwidth. Use EnablePlayerCameraTarget to enable it for each player.