Author Topic: is there any way to stop running a script while the server is running?  (Read 894 times)

0 Members and 1 Guest are viewing this topic.

Offline Londonbrig0

  • Major(1)
  • Posts: 38
  • despite my experience, I'm a noob, deal with it
Just wanna know if there is any way to deactivate a script while my server is running
I could have sworn I had something witty to put here...

Offline Leo

  • Soldat Beta Team
  • Veteran
  • ******
  • Posts: 1011
Re: is there any way to stop running a script while the server is running?
« Reply #1 on: December 15, 2007, 04:36:46 pm »
Sure, delete it from server and do /recompile

Offline spkka

  • Camper
  • ***
  • Posts: 469
Re: is there any way to stop running a script while the server is running?
« Reply #2 on: December 15, 2007, 06:04:59 pm »
you could also write a function to write information in server.ini and disable scripting from there so could disable script then recompile. Leo's suggestion is faster though

Offline corl45

  • Major
  • *
  • Posts: 51
  • PWNED!
    • www.freewebs.com/tylersmod
Re: is there any way to stop running a script while the server is running?
« Reply #3 on: December 15, 2007, 06:42:14 pm »
just delete the text inside the includes.ini of the folder, then /recompile

EDIT:
CRAP its not inculdes.ini, its includes.txt   SRRY
« Last Edit: December 16, 2007, 07:47:20 pm by corl45 »
BE AWESOME!

Offline Londonbrig0

  • Major(1)
  • Posts: 38
  • despite my experience, I'm a noob, deal with it
Re: is there any way to stop running a script while the server is running?
« Reply #4 on: December 15, 2007, 10:25:56 pm »
cool, that makes sense, thanks
I could have sworn I had something witty to put here...

Offline poutch

  • Major(1)
  • Posts: 34
Re: is there any way to stop running a script while the server is running?
« Reply #5 on: December 18, 2007, 11:40:57 pm »
just comment ur includes with //, for example :

in Includes.txt change

toto.pas  ->  //toto.pas

and do a /recompile
www.pleez.fr .... coming soon

Offline Kavukamari

  • Camper
  • ***
  • Posts: 435
  • 3.14159265358979, mmm... pi
Re: is there any way to stop running a script while the server is running?
« Reply #6 on: December 19, 2007, 08:39:09 pm »
a bit complicated way to do it is add a command to the script like this: (in OnCommand so only admins can use it)

Code: [Select]
function OnCommand(ID: Byte;Text: string):boolean;
begin
  Result:=false;
...
  if Text = '/disable' then DisableScript:=true;
...
end;

except you can't make an '/enable' command to turn it back on, as DisableScript stops events from being called (like OnCommand)

link to DisableScript documentation:
http://enesce.com/help/index.html?Variables/DisableScript.html
"Be mindful of fame, show a mighty courage, watch against foes. Nor shalt thou lack what thou desirest, if with thy life thou hast comest out from that heroic task."

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: is there any way to stop running a script while the server is running?
« Reply #7 on: December 20, 2007, 10:06:12 am »
With most of my server mod scripts, I have a variable Enabled, which is true when the script is usable and false when it isn't.. but sense stuff like OnCommand can still be called, you can re-enable the script after its been turned off. But for scripts w/out that, you would need to modify them (and of course ask for permission :) )