StartVehicleEngine: Difference between revisions
From Onset Developer Wiki
No edit summary |
No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 8: | Line 8: | ||
{{FuncParam|vehicle|Vehicle which engine you want to start}} | {{FuncParam|vehicle|Vehicle which engine you want to start}} | ||
{{FuncReturnValue| | {{FuncReturnValue|Returns '''true''' on success.}} | ||
== Example == | == Example == | ||
Line 20: | Line 20: | ||
AddCommand('engine', StartEngine) | AddCommand('engine', StartEngine) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{RelatedFunctions}} | {{RelatedFunctions}} | ||
{{Template:VehicleFunctions}} |
Latest revision as of 13:23, 1 September 2020
Description
Used to start vehicle engine
Syntax
StartVehicleEngine(vehicle)
Parameters
- vehicle
Vehicle which engine you want to start
Return Value
- Returns true on success.
Example
function StartEngine(player)
local veh = GetPlayerVehicle(player)
if veh ~= 0 then
StartVehicleEngine(veh)
end
end
AddCommand('engine', StartEngine)
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