GetVehicleVelocity: Difference between revisions

From Onset Developer Wiki
No edit summary
28days (talk | contribs)
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{Info|Function|Server & Client|1.0}}
{{Info|Function|Server & Client|1.0}}


{{FuncDescription|__EDIT_ME__}}
{{FuncDescription|Returns the vehicle's velocity vectors.}}


{{FuncSyntax|GetVehicleVelocity(vehicle)}}
{{FuncSyntax|GetVehicleVelocity(vehicle)}}


{{FuncParameters}}
{{FuncParameters}}
{{FuncParam|vehicle|__EDIT_ME__}}
{{FuncParam|vehicle|The vehicle identifier}}


{{FuncReturnValue|__EDIT_ME__}}
{{FuncReturnValue|This function returns the velocity of your vehicle.}}


== Example ==
== Example ==
__EDIT_ME__
<syntaxhighlight lang="Lua">
local vehicleId = GetPlayerVehicle()
local vX, vY, vZ = GetVehicleVelocity(vehicleId)
AddPlayerChat("Your vehicle velocity is: "..vX..", "..vY..","..vZ..".")
</syntaxhighlight>


{{RelatedFunctions}}
{{RelatedFunctions}}
__EDIT_ME__
{{Template:VehicleFunctions}}

Latest revision as of 17:12, 6 April 2020