getVehicleHandling | Multi Theft Auto: Wiki Skip to content

getVehicleHandling

Client-side
Server-side
Shared

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function returns a table of the current vehicle handling data.

Syntax

getVehicleHandling ( )

Code Examples

server

This example creates a new function called getVehicleHandlingProperty, which simulates the previous syntax of this function.

function getVehicleHandlingProperty ( element, property )
if isElement ( element ) and getElementType ( element ) == "vehicle" and type ( property ) == "string" then -- Make sure there's a valid vehicle and a property string
local handlingTable = getVehicleHandling ( element ) -- Get the handling as table and save as handlingTable
local value = handlingTable[property] -- Get the value from the table
if value then -- If there's a value (valid property)
return value -- Return it
end
end
return false -- Not an element, not a vehicle or no valid property string. Return failure
end

See Also

Vehicle Functions