Author Topic: SetScriptState  (Read 1654 times)

0 Members and 1 Guest are viewing this topic.

Offline freestyler

  • Soldat Beta Team
  • Camper
  • ******
  • Posts: 326
SetScriptState
« on: July 27, 2009, 03:40:24 pm »
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.



(Size 926 B)
- http://soldatcentral.com/index.php?page=script&f=124 -


** Script hosted by Soldat Central! Please visit the author's script page and Rate this script **