GetVehicleVelocity: Difference between revisions

From Onset Developer Wiki
No edit summary
No edit summary
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}}


{{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 velocity = GetVehicleVelocity(vehicleId)
AddPlayerChat("Your vehicle velocity is: "..velocity..".")
</syntaxhighlight>


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

Revision as of 09:50, 12 December 2019