Script name: SetScriptState
Short description Extremely useful procedure to disable/enable any script
Author: rainrider (rr-)
Compile test: Passed
Core version: 2.6.5
Hosted by: Soldat Central - http://soldatcentral.com/
Full Description:procedure
setscriptstate(scriptname:
string; state:
boolean);
If state = false then this script adds '//' at the beginning of each line in Includes.txt (only if that line didn't begin with '//', so don't worry - they won't stack). If state = true then it searches for '//' in each line and deletes it.
You have to recompile modified script to apply changes.
The attached .PAS file contains commented OnCommand function with suggested usage. You can uncomment it and test it in game.
Usage:
/script <name> <true/false>It can of course disable itself too.
This script is NOT made by me. The original author is rainrider (rr-). I wanted to make it myself but I couldn't handle RegExpReplace, so I asked him for help. Again, I am NOT the original author, rainrider allowed me to upload this here.