SetVehicleLinearVelocity: Difference between revisions
From Onset Developer Wiki
No edit summary |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 9: | Line 9: | ||
{{FuncParam|x|The X axis velocity}} | {{FuncParam|x|The X axis velocity}} | ||
{{FuncParam|y|The Y axis velocity}} | {{FuncParam|y|The Y axis velocity}} | ||
{{FuncParam|z |The Z axis velocity}} | {{FuncParam|z|The Z axis velocity}} | ||
{{FuncParamOptional|reset| | {{FuncParamOptional|reset|'''true''' to reset the linear velocity, default: '''false'''}} | ||
{{FuncReturnValue|This function returns '''true'''.}} | {{FuncReturnValue|This function returns '''true'''.}} |
Latest revision as of 19:32, 30 August 2020
Description
Set the vehicle's linear velocity.
Syntax
SetVehicleLinearVelocity(vehicle, x, y, z [, reset])
Parameters
- vehicle
The vehicle identifier. - x
The X axis velocity - y
The Y axis velocity - z
The Z axis velocity - reset (optional)
true to reset the linear velocity, default: false
Return Value
- This function returns true.
Example
SetVehicleLinearVelocity(vehicleId, 100.0, 0.0, 0.0, false)
-- Push the vehicle towards 100.0 units in X axis
See also
- CreateVehicle
- DestroyVehicle
- IsValidVehicle
- GetVehicleCount
- GetAllVehicles
- GetVehicleModel
- GetVehicleModelName
- SetVehicleRespawnParams
- IsVehicleStreamedIn
- GetStreamedVehiclesForPlayer
- GetStreamedVehicles
- SetVehicleLocation
- GetVehicleLocation
- SetVehicleRotation
- GetVehicleRotation
- SetVehicleHeading
- GetVehicleHeading
- SetVehicleHealth
- GetVehicleHealth
- SetVehicleLicensePlate
- GetVehicleVelocity
- GetVehicleDriver
- GetVehiclePassenger
- GetVehicleNumberOfSeats
- SetVehicleColor
- GetVehicleColor
- SetVehicleLinearVelocity
- SetVehicleAngularVelocity
- GetVehicleGear
- SetVehicleHoodRatio
- GetVehicleHoodRatio
- SetVehicleTrunkRatio
- GetVehicleTrunkRatio
- StartVehicleEngine
- StopVehicleEngine
- GetVehicleEngineState
- SetVehicleLightEnabled
- GetVehicleLightState
- SetVehicleDamage
- GetVehicleDamage
- AttachVehicleNitro