LoadScript
From Liberty Unleashed Wiki
This function will load a script folder. Note that the script folder you wish to load should be placed in the Scripts/ folder of your server.
Syntax
bool LoadScript( string scriptName )
Arguments
- scriptName - The name of the script folder
Example
This example will load the scripts specified in Script.xml in Scripts/SomeScript when someone types /load.
function onPlayerCommand( id, cmd, text ) { if ( cmd == "load" ) { LoadScript( "SomeScript" ); Message( "SomeScript loaded!" ); } return 1; }
Notes
The function [[Squirrel/Functions/Misc/Message|Message] and call onPlayerCommand were used in in this example. More info about them in corresponding pages.