Predefined variables list: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "'''Server variables''' <syntaxhighlight lang="lua"> _G -- Table, contains all global variables. _VERSION -- Version LUA in server. coroutine -- Table, contains functions for thread. debug -- Tabl...")
 
No edit summary
Line 1: Line 1:
'''Server variables'''
'''Server variables'''
<section name="Server" class="server" show="true">
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
_G -- Table, contains all global variables.
_G -- Table, contains all global variables.
Line 13: Line 14:
table -- Table, contains functions for tables.
table -- Table, contains functions for tables.
</syntaxhighlight>
</syntaxhighlight>
</section>
'''Client variables'''
'''Client variables'''
<section name="Client" class="client" show="true">
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
guiRoot -- Element, root element all GUI elements.
guiRoot -- Element, root element all GUI elements.
Line 29: Line 32:
table -- Table, contains functions for tables.
table -- Table, contains functions for tables.
</syntaxhighlight>
</syntaxhighlight>
</section>


List hidden local variables, that can be in functions-handlers:
List hidden local variables, that can be in functions-handlers:
'''Server / Client'''
'''Server / Client'''
<section name="Server/Client" class="both" show="true">
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
source -- Element, who call event.
source -- Element, who call event.
Line 40: Line 45:
eventName -- Name event, which called function-handler.
eventName -- Name event, which called function-handler.
</syntaxhighlight>
</syntaxhighlight>
</section>


List create user [http://forum.mtasa.com/memberlist.php?mode=viewprofile&u=59875 Fro], [http://wiki.multitheftauto.com/wiki/AddEventHandler More details on the functios-handlers.]
List create user [http://forum.mtasa.com/memberlist.php?mode=viewprofile&u=59875 Fro], [http://wiki.multitheftauto.com/wiki/AddEventHandler More details on the functios-handlers.]

Revision as of 18:59, 6 February 2012

Server variables

Click to collapse [-]
Server
_G -- Table, contains all global variables.
_VERSION -- Version LUA in server.
coroutine -- Table, contains functions for thread.
debug -- Table, contains debug functions.
exports -- Table, contains all export functions server.
math -- Table, contains mathematical functions.
resource -- Element, current resource.
resourceRoot -- Element, root element current resource.
root -- Element, root element server.
string -- Table, contains string functions.
table -- Table, contains functions for tables.

Client variables

Click to collapse [-]
Client
guiRoot -- Element, root element all GUI elements.
localPlayer -- Element, local player.
_G -- Table, contains all global variables.
_VERSION -- Version LUA in client.
coroutine -- Table, contains functions for thread.
debug -- Table, contains debug functions.
exports -- Table, contains all export functions client.
math -- Table, contains mathematical functions.
resource -- Element, current resource.
resourceRoot -- Element, root element current resource.
root -- Element, root element client.
string -- Table, contains string functions.
table -- Table, contains functions for tables.

List hidden local variables, that can be in functions-handlers: Server / Client

Click to collapse [-]
Server/Client
source -- Element, who call event.
this -- Element, which was attached function-handler.
sourceResource -- Resource, which was called event.
sourceResourceRoot -- Element, root element resource, which was called event.
client -- Client, which was called event. If event called not client - not used.
eventName -- Name event, which called function-handler.

List create user Fro, More details on the functios-handlers.

Element_tree

If list is broken or change - write down update list and this post will be updated.

Original post by MX_Master link