Difference between revisions of "Modules"

From Multi Theft Auto: Wiki
Jump to: navigation, search
m (SDK functions)
(18 intermediate revisions by 10 users not shown)
Line 1: Line 1:
Modules are extensions for MTA's lua to provide new external functions that aren't available in the self core. All modules listed here are not included with the MTA distributions and if you want to use them for your development, you must download and install them in your server.
+
Modules are extensions for Multi Theft Auto's Lua core, allowing the integration and use of custom Lua functions that have been written in C++, and compiled as a DLL or SO file. Modules are commonly used to create functions for such purposes that Multi Theft Auto lacks, such as sockets. All modules listed here are not distributed with Multi Theft Auto, and must be manually installed.
  
==Module listing==
+
==Modules list==
You can access the listing of all documented modules in this wiki in the following link: [[:Category:Modules]]
+
You can view a list of all the documented modules in this wiki [[:Category:Modules|here]].
  
 
==Modules SDK==
 
==Modules SDK==
To be able to create your own module for MTA servers, you must make use of the Modules SDK. You can download it from:
+
To be able to create your own modules, you must use the Modules SDK. You can download it from one of the links below - choose a link in accordance with your server's operating system.
  
*[http://files.mtasa.com/apps/1.0/dm/ml_devkit.tar.gz here] (Linux Version)
+
* Linux
*[http://wobzip.org/file/TANPP here] or [http://www.mediafire.com/?b8b3asgegn0xkm4 here] (Windows Version)
+
** [http://files.mtasa.com/apps/1.0/dm/ml_devkit.tar.gz Official]
 +
*** (Delete the .d files, and add #include <cstring> to Common.h)
 +
**** (On 64bit add -m32 to CPPFLAGS and LDFLAGS lines in Makefile)
 +
* Microsoft Windows
 +
** [http://www.mediafire.com/?b8b3asgegn0xkm4 Mirror (Mediafire)]
 +
** [https://mega.co.nz/#!nBNGUCgQ!3AHEJt684Heu9bN5de8xwAQ3h-qq5-V6fjUeU7rj5hI Mirror (MEGA)]
  
===SDK functions===
+
===SDK Functions===
Currently in there:
+
*Currently in there:
===Base===
+
**Base:
-HelloWorld
+
***HelloWorld
===MySQL===
+
**MySQL
-MySQLCreate
+
***MySQLCreate
-MySQLOpen
+
***MySQLOpen
-MySQLDestroy
+
***MySQLDestroy
-MySQLQuery
+
***MySQLQuery
-MySQLSafeString
+
***MySQLSafeString
  
  
Line 27: Line 32:
 
[[Category:Modules]]
 
[[Category:Modules]]
  
 +
[[hu:Modules]]
 +
[[pl:Modules]]
 +
[[pt-br:Módulos]]
 
[[ru:Modules]]
 
[[ru:Modules]]

Revision as of 14:46, 24 October 2018

Modules are extensions for Multi Theft Auto's Lua core, allowing the integration and use of custom Lua functions that have been written in C++, and compiled as a DLL or SO file. Modules are commonly used to create functions for such purposes that Multi Theft Auto lacks, such as sockets. All modules listed here are not distributed with Multi Theft Auto, and must be manually installed.

Modules list

You can view a list of all the documented modules in this wiki here.

Modules SDK

To be able to create your own modules, you must use the Modules SDK. You can download it from one of the links below - choose a link in accordance with your server's operating system.

SDK Functions

  • Currently in there:
    • Base:
      • HelloWorld
    • MySQL
      • MySQLCreate
      • MySQLOpen
      • MySQLDestroy
      • MySQLQuery
      • MySQLSafeString