Squirrel/Server/Functions/Scripts/LoadModule
From Liberty Unleashed Wiki
(Difference between revisions)
(Created page with '{{Squirrel/Title|LoadModule}} This function will load an external C/C++ module which will add extra functionality to scripting. Note that the module you wish to load should be pl…') |
m (paste shite) |
||
Line 25: | Line 25: | ||
=== Notes === | === Notes === | ||
− | |||
− | |||
The function [[Squirrel/Server/Functions/Misc/print|print]] and event [[Squirrel/Server/Events/Player/onPlayerCommand|onPlayerCommand]] were used in this example. More info about them in the corresponding pages. | The function [[Squirrel/Server/Functions/Misc/print|print]] and event [[Squirrel/Server/Events/Player/onPlayerCommand|onPlayerCommand]] were used in this example. More info about them in the corresponding pages. |
Revision as of 04:01, 25 September 2010
This function will load an external C/C++ module which will add extra functionality to scripting. Note that the module you wish to load should be placed in the Modules/ folder of your server.
Syntax
bool LoadModule( string moduleName )
Arguments
- moduleName - The name of the module without the extension .dll or .so
Example
This example will load the module lu_ini when the script is loaded.
function onScriptLoad() { LoadModule( "lu_ini" ); print( "Scripts and module loaded!" ); return 1; }
Notes
The function print and event onPlayerCommand were used in this example. More info about them in the corresponding pages.