GetVehicleHandling

From Multi Theft Auto: Wiki
Revision as of 19:44, 6 May 2011 by Qaisjp (talk | contribs)
Jump to navigation Jump to search

This function can get a vehicle's handling.

*Note: This function is still not implemented in the nightly, and is currently only implemented in the handling branch!

Syntax

table getVehicleHandling(element theVehicle) 

Required Arguments

  • theVehicle: The vehicle you wish to get the handling of

Returns

Returns a table, false otherwise.

Example

This example simplifies the use of getVehicleHandling

_getVehicleHandling = getVehicleHandling() -- replace the original getVehicleHandling function as _getVehicleHandling
function getVehicleHandling(ele, prop)
        if ele and prop then -- there is an element and property
           if getElementType(ele) == "vehicle" then -- if the type of the element is a vehicle
	      local handlingTable = _getVehicleHandling(ele) -- get the handling as table and save as handlingTable
              local value = handlingTable.prop -- make the value wanted
              return value -- return the value wanted!
           end
        end
end

See other vehicle functions