Interface administrators, moderator
2,818
edits
No edit summary |
No edit summary |
||
| (10 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{DISPLAYTITLE:Modules}} | {{DISPLAYTITLE:Modules}} | ||
==Summary== | ==Summary== | ||
Modules | Modules extend the server with things like MySQL, SQlite, ini, and other things that aren't provided by default. | ||
==Module SDK== | ==Module SDK== | ||
The module SDK for GTA Connected is known as "GalacticC" ... It's a C library that provides all the necessary functions to create classes, namespaces, functions, and properties to use in your server resources. | The [https://gtaconnected.com/downloads/ModuleSDK.7z module SDK] for GTA Connected is known as "GalacticC" ... It's a C library that provides all the necessary functions to create classes, namespaces, functions, and properties to use in your server resources. | ||
==How to Create== | ==How to Create== | ||
First, you'll need to either create the module source yourself or find one that already exists. Grab the | Anybody with C/C++ skills can create a module using the module SDK. First, you'll need to either create the module source yourself or find one that already exists. Grab the [https://gtaconnected.com/downloads/ModuleSDK.7z module SDK], include the files in your project, compile, and if all goes well you should end up with a DLL file (Windows) or an SO file (Linux). See some [https://forum.gtaconnected.com/index.php?board=24.0 example modules here] (some with source). | ||
== | ==Use in Scripting== | ||
Once the module is loaded, all namespaces, classes, functions and properties it provides are available to use in | Once the module is loaded, all namespaces, classes, functions and properties it provides are available to use in scripts. A module's functions are available in the module namespace, inside another namespace with the name of the module. For example, if the module's namespace is "mysql" and it has a "connect" function, then in scripts you would use <code>module.mysql.connect()</code> | ||
== | ==Notes== | ||
For more help and information regarding modules, ask on the forum or the discord! | * For more help and information regarding modules, ask on the forum or the discord! | ||
* '''For security reasons, modules can not be used on the client, and the server does not provide a way to distribute and load them onto clients.''' | |||