Author Topic: Zombie mod  (Read 1464 times)

0 Members and 1 Guest are viewing this topic.

Offline dragus

  • Major(1)
  • Posts: 23
Zombie mod
« on: August 17, 2009, 11:41:23 am »
I would like edited that you script zombie mod, you edited that script zombie mod, they let's edit only that it was possible to write he (it) included (switched) new commend on scripts  and off scripts
« Last Edit: August 17, 2009, 01:31:52 pm by dragus »

Offline JFK

  • Camper
  • ***
  • Posts: 255
    • My TraxInSpace Account
Re: Zombie mod
« Reply #1 on: August 17, 2009, 11:46:45 am »
I would like edited that you script zombie mod, you edited that script zombie mod, they let's edit only that it was possible to write he (it) included (switched) new commend on scripts  and off scripts

Being cultivated by old inovations will conclude in a drastic proclariation of independent post-narrative substances, which are being driven by compressive interfaculties written by noodles procreated after effects.


sry, couldn't help myself. Dragus, please restate your question
« Last Edit: August 17, 2009, 11:49:58 am by JFK »
Come join: EliteCTF
Listen to: My Music

Offline danmer

  • Camper
  • ***
  • Posts: 466
  • crabhead
Re: Zombie mod
« Reply #2 on: August 17, 2009, 12:44:50 pm »
just write in your mothertongue, someone might translate it <.< Even if they dont, it'll make more sense than what you just wrote =/

Offline dragus

  • Major(1)
  • Posts: 23
Re: Zombie mod
« Reply #3 on: August 17, 2009, 01:36:24 pm »
ohh sory no  zombie mod,only >>>Mission mod<<< 

who can add For a missionmode script

  command /on mm    = a scripts is on

  command /off mm    = a scripts is off


   this command only can admin


   this is link for a missionmod
    >>>>>>  http://forums.soldat.pl/index.php?topic=29994.0 <<<<<<

Offline JFK

  • Camper
  • ***
  • Posts: 255
    • My TraxInSpace Account
Re: Zombie mod
« Reply #4 on: August 17, 2009, 02:58:13 pm »
Ok, that's clear ;)

Save this as a NEW script:
Code: [Select]
MMDIR = 'MissionMod'; //Directory name of MissionMod goes here

procedure setscriptstate(scriptname: string; state: boolean);
var newfile, newfiletmp: string;
begin
  newfile := readfile('scripts/' + scriptname + '/Includes.txt');
  while newfiletmp <> newfile do begin
    newfiletmp := newfile;
    newfile := regexpreplace(iif(state, '\/\/([^\r\n]+)([\r\n])', '(^|[\r\n])([^\r\n/]+)([\r\n]|$)'), newfile, iif(state, '$1$2', '$1//$2$3'), true);
    end;
  writefile('scripts/' + scriptname + '/Includes.txt', newfile);
  command('/recompile ' + script);
end;

function oncommand(id: byte; text: string): boolean;
begin
  case text of
    '/on mm' : setscriptstate(MMDIR, true);
    '/off mm' : setscriptstate(MMDIR, false);
  end;
end;

Most of the script comes from here. It's not tested. Public debug please, if needed :p
Come join: EliteCTF
Listen to: My Music

Offline dragus

  • Major(1)
  • Posts: 23
Re: Zombie mod
« Reply #5 on: August 17, 2009, 11:54:48 pm »
error :/
« Last Edit: August 18, 2009, 12:18:15 am by dragus »

Offline Polifen

  • Soldier
  • **
  • Posts: 127
Re: Zombie mod
« Reply #6 on: August 18, 2009, 05:32:47 am »
Add line "const" before "MMDIR = 'MissionMod'; //Directory name of MissionMod goes here".

Offline dragus

  • Major(1)
  • Posts: 23
Re: Zombie mod
« Reply #7 on: August 18, 2009, 06:49:21 am »
error:P can meybe you complite script in a download
« Last Edit: August 18, 2009, 06:51:08 am by dragus »

Offline VinceBros

  • Soldat Beta Team
  • Camper
  • ******
  • Posts: 275
Re: Zombie mod
« Reply #8 on: August 18, 2009, 07:14:55 am »
Try that.
I have no problems but i didn't test it yet with the commands.

Code: [Select]
Const
MMDIR = 'MissionMod'; //Directory name of MissionMod goes here

procedure setscriptstate(scriptname: string; state: boolean);
var newfile, newfiletmp: string;
begin
  newfile := readfile('scripts/' + scriptname + '/Includes.txt');
  while newfiletmp <> newfile do begin
    newfiletmp := newfile;
    newfile := regexpreplace(iif(state, '\/\/([^\r\n]+)([\r\n])', '(^|[\r\n])([^\r\n/]+)([\r\n]|$)'), newfile, iif(state, '$1$2', '$1//$2$3'), true);
    end;
  writefile('scripts/' + scriptname + '/Includes.txt', newfile);
  command('/recompile ' + scriptname);
end;

function oncommand(id: byte; text: string): boolean;
begin
  case text of
    '/on mm' : setscriptstate(MMDIR, true);
    '/off mm' : setscriptstate(MMDIR, false);
  end;
end;