StopVehicleEngine: Difference between revisions

From Onset Developer Wiki
Created page with "{{Info|Function|Server|1.0}} {{FuncDescription|__EDIT_ME__}} {{FuncSyntax|StopVehicleEngine(vehicle)}} {{FuncParameters}} {{FuncParam|vehicle|__EDIT_ME__}} {{FuncReturnVal..."
 
Kuzkay (talk | contribs)
No edit summary
Line 1: Line 1:
{{Info|Function|Server|1.0}}
{{Info|Function|Server|1.0}}


{{FuncDescription|__EDIT_ME__}}
{{FuncDescription|Used to stop vehicle engine}}


{{FuncSyntax|StopVehicleEngine(vehicle)}}
{{FuncSyntax|StopVehicleEngine(vehicle)}}


{{FuncParameters}}
{{FuncParameters}}
{{FuncParam|vehicle|__EDIT_ME__}}
{{FuncParam|vehicle|Vehicle which engine you want to stop}}


{{FuncReturnValue|__EDIT_ME__}}
{{FuncReturnValue|__EDIT_ME__}}


== Example ==
== Example ==
__EDIT_ME__
<syntaxhighlight lang="Lua">
function StopEngine(player)
  local veh = GetPlayerVehicle(player)
  if veh ~= 0 then
      StopVehicleEngine(veh)
  end
end
AddCommand('engineoff', StopEngine)
</syntaxhighlight>


{{RelatedFunctions}}
{{RelatedFunctions}}
__EDIT_ME__
__EDIT_ME__

Revision as of 20:06, 13 November 2019

StopVehicleEngine

Type: Function
Context: Server
Introduced: v1.0

Description

Used to stop vehicle engine

Syntax

StopVehicleEngine(vehicle)

Parameters

  • vehicle
    Vehicle which engine you want to stop

Return Value

  • __EDIT_ME__

Example

function StopEngine(player)
   local veh = GetPlayerVehicle(player)
   if veh ~= 0 then
      StopVehicleEngine(veh)
   end
end
AddCommand('engineoff', StopEngine)

See also

__EDIT_ME__