Resource:Handling Editor: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
(That's better :D)
Line 1: Line 1:
{{Resource page}}
{{Resource page}}
The handling editor is an open source handling editor for the MTA 1.1 handling branch. The handling editor is also known as heditor or ahe. The resource is currently in production and latest unstable can found at [http://code.google.com/p/hedit/ Google Code] >>> [http://code.google.com/p/hedit/source/browse/trunk/#trunk Trunk].
The MTA Ingame Handling Editor (shortly hedit or ahe) is an open source resource being developed for MTA 1.1. It currently won't work on the 1.1 Nightly releases, you need the latest Custom-Handling nightly in order to use this tool.
==Links==
You can see and download the latest version on the [http://code.google.com/p/hedit/ Google Code project].
{| border="1"
! Name
! Link
|-
|[http://www.code.google.com/p/hedit/ Google Code Page]
|[http://www.code.google.com/p/hedit/ http://www.code.google.com/p/hedit/]
|-
|[http://forum.mtasa.com/viewtopic.php?f=108&t=30494 Forum Topic]
|[http://forum.mtasa.com/viewtopic.php?f=108&t=30494 http://forum.mtasa.com/viewtopic.php?f=108&t=30494]
|}


==Users==
==Exported Functions==
{| border="2"
|-
! Name 
! Role 
|-
| Remi-X
| Owner
|-
| Qais
| Committer
|}


==Exported Functions/Events==
===importVehicleHandling===
<section name="Server and Client" class="both" show="true">
<section name="Server and Client" class="both" show="true">
This function is used to import the handling set of all vehicles with the specified model ID.


===Functions===
==Syntax==  
This function is used to import the handling set of all vehicles with the specified model ID.
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
bool importModelHandling( int modelID, table data )
bool importVehicleHandling( element theVehicle, table data )
</syntaxhighlight>
</syntaxhighlight>


'''modelID''': The model id of what you want to import all handling data to (integer)
==Required Arguments==
'''data''': The data of which you wish the handling of the vehicle to (table)
*'''theVehicle''': The vehicle you wish to set the handling of
*'''data''': A table containing the handling data you want to set


==Returns==
Returns '''true''' if the handling was set successfully, '''false''' otherwise.
Returns '''true''' if the handling was set successfully, '''false''' otherwise.
</section>


----
==Exported Events==
===onVehicleHandlingChange===
<section name="Server" class="server" show="true">
This event is called when you change some handling from any vehicle.


This function is used to import the handling set of a desired vehicle.
==Parameters==
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
bool importVehicleHandling ( vehicle theVehicle, table data )
string hProperty, var oldValue, var newValue
</syntaxhighlight>
</syntaxhighlight>
*'''hProperty:''' The handling property which has been changed
*'''oldValue:''' The old value of the changed property
*'''newValue:''' The new value of the changed property
==Source==
The [[event system#Event source|source]] of this event is the vehicle element that got changed.
</section>


'''theVehicle''': The vehicle you wish to set the handling of (element)
'''data''': The data of which you wish the handling of the vehicle to (table)


Returns '''true''' if the handling was set successfully, '''false''' otherwise.
===onClientVehicleHandlingChange===
</section>
<section name="Client" class="client" show="true">
This event is called when you change some handling from any vehicle.


You can call them from another resource using call()
==Parameters==
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
call ( getResourceFromName ( "hedit" ), "importVehicleHandling", theVehicle, theTable )
string hProperty, var oldValue, var newValue
</syntaxhighlight>
*'''hProperty:''' The handling property which has been changed
*'''oldValue:''' The old value of the changed property
*'''newValue:''' The new value of the changed property
 
==Source==
The [[event system#Event source|source]] of this event is the vehicle element that got changed.
</section>


-- Note that this syntax is also valid
==See also==
exports.hedit:importVehicleHandling(theVehicle, theTable)
[http://www.code.google.com/p/hedit/ Google Code Project] See and get the latest changes here.<br>
</syntaxhighlight>
[http://forum.mtasa.com/viewtopic.php?f=108&t=30494 Official Forum Topic] The place for discussing this project.

Revision as of 19:49, 11 May 2011

The MTA Ingame Handling Editor (shortly hedit or ahe) is an open source resource being developed for MTA 1.1. It currently won't work on the 1.1 Nightly releases, you need the latest Custom-Handling nightly in order to use this tool. You can see and download the latest version on the Google Code project.

Exported Functions

importVehicleHandling

Click to collapse [-]
Server and Client

This function is used to import the handling set of all vehicles with the specified model ID.

Syntax

bool importVehicleHandling( element theVehicle, table data )

Required Arguments

  • theVehicle: The vehicle you wish to set the handling of
  • data: A table containing the handling data you want to set

Returns

Returns true if the handling was set successfully, false otherwise.

Exported Events

onVehicleHandlingChange

Click to collapse [-]
Server

This event is called when you change some handling from any vehicle.

Parameters

string hProperty, var oldValue, var newValue
  • hProperty: The handling property which has been changed
  • oldValue: The old value of the changed property
  • newValue: The new value of the changed property

Source

The source of this event is the vehicle element that got changed.


onClientVehicleHandlingChange

Click to collapse [-]
Client

This event is called when you change some handling from any vehicle.

Parameters

string hProperty, var oldValue, var newValue
  • hProperty: The handling property which has been changed
  • oldValue: The old value of the changed property
  • newValue: The new value 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.