Resource:Hedit: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(code updates)
(tweak)
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Resource page}}
{{Resource page}}
The MTA Ingame Handling Editor (shortly hedit or ahe) is an open source resource being developed for the latest version of MTA.
The MTA Ingame Handling Editor (known as 'hedit') is an open source resource that was created in 2010 and has been included in the official MTA resources package since 2021.
You can see and download the latest version on the [http://github.com/deltanic/hedit/ GitHub repository]. <br><br>
'''[http://forum.mtasa.com/viewtopic.php?f=108&t=30494/ Be sure to see the forumtopic for all information!]'''


<!--==Exported Functions==
You can see and download the latest version on the Hedit page of [https://github.com/multitheftauto/mtasa-resources/tree/master/%5Bgameplay%5D/hedit official resources '''GitHub repository'''] or download it directly from the latest package at https://mirror.mtasa.com/mtasa/resources/mtasa-resources-latest.zip. <br><br>


===getDefaultHandling===
'''[https://forum.mtasa.com/topic/25539-hedit-mta-ingame-handling-editor-v214/ Be sure to see the Hedit forum topic for all information!]'''
<section name="Server" class="server" show="true">
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 (through the meta), this function will return the same as getOriginalHandling. It does not take into account custom .hnd applications.


==Syntax==
[https://github.com/multitheftauto/mtasa-resources/tree/master/%5Bgameplay%5D/hedit GitHub repository] - See and get the latest changes here.<br>
<syntaxhighlight lang="lua">
[https://forum.mtasa.com/topic/25539-hedit-mta-ingame-handling-editor-v214/ Official Forum Topic] - The place for discussing this project.<br>
table getDefaultHandling(vehicle theVehicle)
[http://www.youtube.com/user/SilentStrikeMTA?feature=mhsn#p/p Youtube playlist] - Full playlist of several development video's of the handling editor.
</syntaxhighlight>
 
==Required Arguments==
*'''theVehicle''': The vehicle you wish to get the default handling of
 
==Returns==
Returns a table containing the default handling, false otherwise.
Table structure: ''property'':''value''
</section>
 
===importVehicleHandling===
<section name="Server" class="server" show="true">
This function is used to import the handling set of all vehicles with the specified model ID.
 
==Syntax==
<syntaxhighlight lang="lua">
bool importVehicleHandling ( element theVehicle, string/table data )
</syntaxhighlight>
 
==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.
</section>
 
==Exported Events==
===onVehicleHandlingChange===
<section name="Server" class="server" show="true">
This event is called when someone changes some handling from any vehicle.
 
==Parameters==
<syntaxhighlight lang="lua">
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>
 
===onClientVehicleHandlingChange===
<section name="Client" class="client" show="true">
This event is called when you change some handling from any vehicle.
 
==Parameters==
<syntaxhighlight lang="lua">
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>
 
-->==See also==
[http://www.code.google.com/p/hedit/ Google Code Project] - See and get the latest changes here.<br>
[http://forum.mtasa.com/viewtopic.php?f=108&t=30494 Official Forum Topic] - The place for discussing this project.<br>
[http://www.youtube.com/user/SilentStrikeMTA?feature=mhsn#p/p Youtube playlist] - Full playlist of all development video's of the handling editor.

Latest revision as of 06:58, 14 April 2021

The MTA Ingame Handling Editor (known as 'hedit') is an open source resource that was created in 2010 and has been included in the official MTA resources package since 2021.

You can see and download the latest version on the Hedit page of official resources GitHub repository or download it directly from the latest package at https://mirror.mtasa.com/mtasa/resources/mtasa-resources-latest.zip.

Be sure to see the Hedit forum topic for all information!

GitHub repository - See and get the latest changes here.
Official Forum Topic - The place for discussing this project.
Youtube playlist - Full playlist of several development video's of the handling editor.