GetVehicleHandling: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 4: Line 4:


''*'''Note:''' This function is still not implemented into the nightly, and currently only impelemented in the handling branch''
''*'''Note:''' This function is still not implemented into the nightly, and currently only impelemented in the handling branch''
==Syntax==  
==Syntax==  
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">

Revision as of 17:04, 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