Interface administrators, moderator
2,813
edits
No edit summary |
No edit summary |
||
| Line 9: | Line 9: | ||
First, you'll need to either create the module source yourself or find one that already exists. Grab the sample module download, 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 example modules (some with source) [https://forum.gtaconnected.com/index.php?board=24.0 here] | First, you'll need to either create the module source yourself or find one that already exists. Grab the sample module download, 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 example modules (some with source) [https://forum.gtaconnected.com/index.php?board=24.0 here] | ||
== | ==Use in Scripting== | ||
Once the module is loaded, all namespaces, classes, functions and properties it provides are available to use in scripting resources. Each module will have it's own namespace inside the module namespace. For example, if your module's namespace is "mysql" and you have a "connect" function within that namespace, then the syntax within scripting would be "module.mysql.connect()" | Once the module is loaded, all namespaces, classes, functions and properties it provides are available to use in scripting resources. Each module will have it's own namespace inside the module namespace. For example, if your module's namespace is "mysql" and you have a "connect" function within that namespace, then the syntax within scripting would be "module.mysql.connect()" | ||