SetVehicleLinearVelocity: Difference between revisions

From Onset Developer Wiki
(Created page with "{{Info|Function|Server|1.0}} {{FuncDescription|__EDIT_ME__}} {{FuncSyntax|SetVehicleLinearVelocity(vehicle, x, y, z [, reset])}} {{FuncParameters}} {{FuncParam|vehicle|__ED...")
 
No edit summary
Line 1: Line 1:
{{Info|Function|Server|1.0}}
{{Info|Function|Server|1.0}}


{{FuncDescription|__EDIT_ME__}}
{{FuncDescription|Set the vehicle's linear velocity.}}


{{FuncSyntax|SetVehicleLinearVelocity(vehicle, x, y, z [, reset])}}
{{FuncSyntax|SetVehicleLinearVelocity(vehicle, x, y, z [, reset])}}


{{FuncParameters}}
{{FuncParameters}}
{{FuncParam|vehicle|__EDIT_ME__}}
{{FuncParam|vehicle|The vehicle identifier.}}
{{FuncParam|x|__EDIT_ME__}}
{{FuncParam|x|The X axis velocity}}
{{FuncParam|y|__EDIT_ME__}}
{{FuncParam|y|The Y axis velocity}}
{{FuncParam|z |__EDIT_ME__}}
{{FuncParam|z |The Z axis velocity}}
{{FuncParamOptional|reset|__EDIT_ME__}}
{{FuncParamOptional|reset|Boolean __EDIT_ME__}}


{{FuncReturnValue|__EDIT_ME__}}
{{FuncReturnValue|This function returns '''true'''.}}


== Example ==
== Example ==
__EDIT_ME__
<syntaxhighlight lang="Lua">
SetVehicleLinearVelocity(vehicleId, 100.0, 0.0, 0.0, false)
-- Push the vehicle towards 100.0 units in X axis
<syntaxhighlight>


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

Revision as of 19:27, 31 December 2019

SetVehicleLinearVelocity

Type: Function
Context: Server
Introduced: v1.0

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)
    Boolean __EDIT_ME__

Return Value

  • This function returns true.

Example

<syntaxhighlight lang="Lua"> SetVehicleLinearVelocity(vehicleId, 100.0, 0.0, 0.0, false) -- Push the vehicle towards 100.0 units in X axis <syntaxhighlight>

See also