- Documentation
- Server functions
- getVehicleComponentPosition
Function
getVehicleComponentPosition
Returns the part offset stored with setVehicleComponentPosition (0, 0, 0 when not set).
Syntax
float, float, float getVehicleComponentPosition(vehicle vehicle, string component)Arguments
vehiclevehicle- The vehicle.
componentstring- Part name.
Differences from MTA:SA
- These MTA:SA arguments are not here:
string base = "root"
In MTA:SA
getVehicleComponentPosition(vehicle theVehicle, string theComponent, string base = "root")Returns
x, y, z.
Example
local vehicle = createVehicle(411, 2000, -1690, 13.5)
local x, y, z = getVehicleComponentPosition(vehicle, "bonnet_dummy")