Difference between revisions of "GetVehicleVelocity"

From Onset Developer Wiki
 
Line 1: Line 1:
{{Info|Function|Server & Client|1.0}}
{{Info|Function|Server & Client|1.0}}


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


{{FuncSyntax|GetVehicleVelocity(vehicle)}}
{{FuncSyntax|GetVehicleVelocity(vehicle)}}
Line 13: Line 13:
<syntaxhighlight lang="Lua">
<syntaxhighlight lang="Lua">
local vehicleId = GetPlayerVehicle()
local vehicleId = GetPlayerVehicle()
local velocity = GetVehicleVelocity(vehicleId)
local vX, vY, vZ = GetVehicleVelocity(vehicleId)
AddPlayerChat("Your vehicle velocity is: "..velocity..".")
AddPlayerChat("Your vehicle velocity is: "..vX..", "..vY..","..vZ..".")
</syntaxhighlight>
</syntaxhighlight>


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

Latest revision as of 17:12, 6 April 2020