VLE Functions/GetXYInFrontOfVehicle
From Vice City Online Wiki
[edit]
GetXYInFrontOfVehicle
Syntax: float, float, float, float GetXYInFrontOfVehicle ( vehicleID VehicleID, float Radius )
Parameters:
vehicleID VehicleID- The ID of a vehicle.
Returns:
float X- The X co ordinate.float Y- The Y co ordinate.float Z- The Z co ordinate.float A- The Z angle.
Description:
This function gets the X,Y position in front of a vehicle, based on the vehicle's angle, at a given distance (radius).
Thanks to ReGeX for this function!
Sample Implementation:
function test(PlayerID) local VehicleID = getPlayerVehicleID(PlayerID) local X, Y, Z, A = GetXYInFrontOfVehicle(VehicleID, 5) end
