StartVehicleEngine: Difference between revisions
From Onset Developer Wiki
Created page with "{{Info|Function|Server|1.0}} {{FuncDescription|__EDIT_ME__}} {{FuncSyntax|StartVehicleEngine(vehicle)}} {{FuncParameters}} {{FuncParam|vehicle|__EDIT_ME__}} {{FuncReturnVa..." |
No edit summary |
||
Line 1: | Line 1: | ||
{{Info|Function|Server|1.0}} | {{Info|Function|Server|1.0}} | ||
{{FuncDescription| | {{FuncDescription|Used to start vehicle engine}} | ||
{{FuncSyntax|StartVehicleEngine(vehicle)}} | {{FuncSyntax|StartVehicleEngine(vehicle)}} | ||
{{FuncParameters}} | {{FuncParameters}} | ||
{{FuncParam|vehicle| | {{FuncParam|vehicle|Vehicle which engine you want to start}} | ||
{{FuncReturnValue|__EDIT_ME__}} | {{FuncReturnValue|__EDIT_ME__}} | ||
== Example == | == Example == | ||
<syntaxhighlight lang="Lua"> | |||
function StartEngine(player) | |||
local veh = GetPlayerVehicle(player) | |||
if veh ~= 0 then | |||
StartVehicleEngine(veh) | |||
end | |||
end | |||
AddCommand('engine', StartEngine) | |||
</syntaxhighlight> | |||
{{RelatedFunctions}} | {{RelatedFunctions}} | ||
__EDIT_ME__ | __EDIT_ME__ |
Revision as of 20:05, 13 November 2019
Description
Used to start vehicle engine
Syntax
StartVehicleEngine(vehicle)
Parameters
- vehicle
Vehicle which engine you want to start
Return Value
- __EDIT_ME__
Example
function StartEngine(player)
local veh = GetPlayerVehicle(player)
if veh ~= 0 then
StartVehicleEngine(veh)
end
end
AddCommand('engine', StartEngine)
See also
__EDIT_ME__