Resource:Handling Editor: Difference between revisions
Line 46: | Line 46: | ||
==Parameters== | ==Parameters== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
element thePlayer, string hProperty, var oldValue, var newValue | element thePlayer, string hProperty, var oldValue, var newValue, string fullName | ||
</syntaxhighlight> | </syntaxhighlight> | ||
*'''thePlayer:''' The player who changed the handling | *'''thePlayer:''' The player who changed the handling | ||
Line 52: | Line 52: | ||
*'''oldValue:''' The old value of the changed property | *'''oldValue:''' The old value of the changed property | ||
*'''newValue:''' The new value of the changed property | *'''newValue:''' The new value of the changed property | ||
*'''fullName:''' The full name of the changed property | |||
==Source== | ==Source== | ||
Line 63: | Line 64: | ||
==Parameters== | ==Parameters== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
string hProperty, var oldValue, var newValue | string hProperty, var oldValue, var newValue, string fullName | ||
</syntaxhighlight> | </syntaxhighlight> | ||
*'''hProperty:''' The handling property which has been changed | *'''hProperty:''' The handling property which has been changed | ||
*'''oldValue:''' The old value of the changed property | *'''oldValue:''' The old value of the changed property | ||
*'''newValue:''' The new value of the changed property | *'''newValue:''' The new value of the changed property | ||
*'''fullName:''' The full name of the changed property | |||
==Source== | ==Source== |
Revision as of 21:07, 8 July 2011
The MTA Ingame Handling Editor (shortly hedit or ahe) is an open source resource being developed for MTA 1.1.
You can see and download the latest version on the Google Code project.
Be sure to see the forumtopic for all information!
Exported Functions
getDefaultHandling
This function is used to get the default handling of some vehicle. While getOriginalHandling returns the default handling by San Andreas, this function returns the default handling which has been set by the Handling Editor. If the editor did not load any custom handlings as default, this function will return the same as getOriginalHandling.
Syntax
table getDefaultHandling ( element theVehicle )
Required Arguments
- theVehicle: The vehicle you wish to get the default handling of
Returns
Returns a table containing the default handling, false otherwise.
importVehicleHandling
This function is used to import the handling set of all vehicles with the specified model ID.
Syntax
bool importVehicleHandling ( element theVehicle, string/table data )
Required Arguments
- theVehicle: The vehicle you wish to set the handling of
- data: A string if you want to load a handling.cfg line, or a table containing valid handlingProperties and data.
Returns
Returns true if the handling was set successfully, false otherwise.
Exported Events
onVehicleHandlingChange
This event is called when someone changes some handling from any vehicle.
Parameters
element thePlayer, string hProperty, var oldValue, var newValue, string fullName
- thePlayer: The player who changed the handling
- hProperty: The handling property which has been changed
- oldValue: The old value of the changed property
- newValue: The new value of the changed property
- fullName: The full name of the changed property
Source
The source of this event is the vehicle element that got changed.
onClientVehicleHandlingChange
This event is called when you change some handling from any vehicle.
Parameters
string hProperty, var oldValue, var newValue, string fullName
- hProperty: The handling property which has been changed
- oldValue: The old value of the changed property
- newValue: The new value of the changed property
- fullName: The full name of the changed property
Source
The source of this event is the vehicle element that got changed.
See also
Google Code Project - See and get the latest changes here.
Official Forum Topic - The place for discussing this project.
Youtube playlist - Full playlist of all development video's of the handling editor.