-
Notifications
You must be signed in to change notification settings - Fork 0
Setup
Plugin can be installed automatically or manually. Automatic installation is recommended since it's easier and faster than the manual approach.
- Open your LocalAdmin terminal and execute the following command:
p install Pogromca-SCP/SLCommandScript - Restart your server once the plugin is installed.
- Download
SLCommandScript.dllanddependencies.zipfiles from latest release. - Place downloaded
*.dllfile in your server's plugins folder. - Unzip the contents of the downloaded
*.zipfile into your server's plugin dependencies folder. - Restart your server if it's already running.
Once you start your server with plugin installed you should see SLCommandScript folder created in your server's plugins directory. Inside you should see the following items:
-
scriptsfolder pluginConfig.ymlscriptsLoaderConfig.yml
Files with *.yml extension store plugin configuration. You can find more details about configuration in section below. The scripts folder is the place where server scripts should be placed. By default it should contain 4 sub-directories. Scripts put in each folder will be registered to different consoles:
-
client-> Client in-game console -
events-> Scripts from this folder are used for events handling -
ra-> RemoteAdmin console -
server-> LocalAdmin terminal (doesn't work on non-dedicated servers)
Note
Folders might be inactive or behave differently depending on configuration and used scripts loader implementation.
To add new script create a file with *.slcs extension in a folder of your choosing. Once the file is created the plugin will attempt to register your new script to appropriate console. Your script won't be registered if a command with identical name or alias already exists, so you should always check commands in your target console before adding new scripts.
Tip
If your script's name is already taken, simply rename the file. The plugin will detect name change and try to register script with updated name. No server restarts needed.
Warning
RemoteAdmin suggestions won't show new scripts until next round restart.
To execute a script open your target console and input the name of your script without file extension. For example if you want to run a script test.slcs located in ra folder you need to open RemoteAdmin console and type test.
Tip
Client console also requires a dot prefix added to every script command. (ex. you should use .test instead of test)
Scripts put in events folder are registered as event handlers. Those scripts are executed automatically by server when an appropriate in-game event occurs. They cannot be accessed from any console. The name of your script must be the same as the name of the event you want to handle. Optional On prefix is also allowed if preferable. [TODO: LIST OF EVENTS]
[TODO: EXPLAIN CONFIGS]