GetVehicleHandling

From Multi Theft Auto: Wiki
Revision as of 16:57, 6 May 2011 by Qaisjp (talk | contribs) (Created page with "{{Server function}} __NOTOC__ This function can get a vehicle's handling.<br> '''Note:''' This function is still not implemented into the nightly, and currently only impelement...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This function can get a vehicle's handling.
Note: This function is still not implemented into the nightly, and currently only impelemented 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()
function getVehicleHandling(veh, prop)
        if veh then
           if getElementType(veh) == "vehicle" then
	      local handlingTable = _getVehicleHandling(veh)
              local value = handlingTable.prop
              return value
           end
        end
end

See Also