GetVehicleHandling: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(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...")
 
No edit summary
Line 29: Line 29:
</syntaxhighlight>
</syntaxhighlight>


==See Also==
==See other vehicle functions==
{{Client element functions}}
{{Vehicle functions}}

Revision as of 17:02, 6 May 2011

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 other vehicle functions