Author Topic: RS round timer  (Read 875 times)

0 Members and 1 Guest are viewing this topic.

Offline Zabijaka

  • Soldier
  • **
  • Posts: 201
  • Soldat Fan, Hitman Fan
RS round timer
« on: July 05, 2009, 06:48:04 am »
Hello, I need timer script for survival mode :)

Offline Furai

  • Administrator
  • Veteran
  • *****
  • Posts: 1908
    • TransHuman Design
Re: RS round timer
« Reply #1 on: July 05, 2009, 08:19:52 am »
Hmmm, I saw it in Leo's servers. Ask him for it. Or use search function implemented in the forums.
"My senses are so powerful that I can hear the blood pumping through your veins."

Offline PKS|Shooter

  • Soldier
  • **
  • Posts: 130
  • Dont fuck with us!
    • PKS - La Familia
Re: RS round timer
« Reply #2 on: July 05, 2009, 02:34:06 pm »

Offline Zabijaka

  • Soldier
  • **
  • Posts: 201
  • Soldat Fan, Hitman Fan
Re: RS round timer
« Reply #3 on: July 06, 2009, 03:25:00 am »
Shooter thanks but this is bad link xD
This is not timer for survival mode.

Ok, I know if somebody tell me witch command kill all alive players xD
« Last Edit: July 06, 2009, 04:35:58 am by Zabijaka »

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: RS round timer
« Reply #4 on: July 06, 2009, 04:52:19 am »
Ok, I know if somebody tell me witch command kill all alive players xD
There's none but...
Code: [Select]
function OnCommand(ID: byte; Text: string): boolean;
var i: byte;
begin
  if Text = '/killall' then begin
    for i:= 1 to 32 do if GetPlayerStat(i,'Alive') = true then if GetPlayerStat(i,'Active') = true then DoDamage(i,3333);
    Command('/say Admin killed everyone');
  end;
end;

Offline Zabijaka

  • Soldier
  • **
  • Posts: 201
  • Soldat Fan, Hitman Fan
Re: RS round timer
« Reply #5 on: July 06, 2009, 05:49:47 pm »
I dont know, My script is fail :/
Code: [Select]
const
   Time = 5; //Seconds

var
   Timer: integer;

procedure ActivateServer;
begin
   Timer := 90;
end;

procedure AppOnIdle(Ticks: integer);
begin
  Timer := Timer - 1;
  if (Timer = 0) then begin
     
WriteConsole(0, 'Round Time Over!', $FFFFFF);

function OnCommand(ID: byte; Text: string): boolean;
var i: byte;
begin
  if Text = '/killall' then begin
    for i:= 1 to 32 do if GetPlayerStat(i,'Alive') = true then if GetPlayerStat(i,'Active') = true then DoDamage(i,3333);
    Command('/say Admin killed everyone');
 
      Timer := 90;
    end;

end;

Offline -Major-

  • Veteran
  • *****
  • Posts: 1419
Re: RS round timer
« Reply #6 on: July 06, 2009, 07:58:29 pm »
I dont know, My script is fail :/
Code: [Select]
const
   Time = 5; //Seconds

var
   Timer: integer;

procedure ActivateServer;
begin
   Timer := 90;
end;

procedure AppOnIdle(Ticks: integer);
begin
  Timer := Timer - 1;
  if (Timer = 0) then begin
     
WriteConsole(0, 'Round Time Over!', $FFFFFF);

function OnCommand(ID: byte; Text: string): boolean;
var i: byte;
begin
  if Text = '/killall' then begin
    for i:= 1 to 32 do if GetPlayerStat(i,'Alive') = true then if GetPlayerStat(i,'Active') = true then DoDamage(i,3333);
    Command('/say Admin killed everyone');
 
      Timer := 90;
    end;

end;

the "Text" is never "/killall"

I guess you gotta make it launch, by making Text = "/killall" or launch that code without the "if"

Code: [Select]
const
   Time = 5; //Seconds

var
   Timer: integer;

procedure ActivateServer;
begin
   Timer := 90;
end;

procedure AppOnIdle(Ticks: integer);
begin
         Timer := Timer - 1;
         if (Timer = 0) then begin
           
      WriteConsole(0, 'Round Time Over!', $FFFFFF);

      Command('/killalll')

      function OnCommand(ID: byte; Text: string): boolean;
      var i: byte;
      begin
        if Text = '/killall' then begin
          for i:= 1 to 32 do if GetPlayerStat(i,'Alive') = true then if GetPlayerStat(i,'Active') = true then DoDamage(i,3333);
          Command('/say Admin killed everyone');
       
            Timer := 90;
      end;

end;

not sure if this will work, never really coded in pascal, so I'm not sure how it handels functions.
« Last Edit: July 06, 2009, 08:05:41 pm by -Major- »

Offline xmRipper

  • Soldat Beta Team
  • Flagrunner
  • ******
  • Posts: 742
    • Personal
Re: RS round timer
« Reply #7 on: July 06, 2009, 08:41:20 pm »

I dont know, My script is fail :/
(...)
There is OnCommand function inside of AppOnIdle procedure. That's the problem.
Co-Founder / CTO @ Macellan
Founder Turkish Soldat Community

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: RS round timer
« Reply #8 on: July 07, 2009, 03:47:07 am »
Code: [Select]
const
   Time = 5; //Seconds

var
   Timer: integer;

procedure ActivateServer;
begin
   Timer := 90;
end;

procedure AppOnIdle(Ticks: integer);
begin
  Timer := Timer - 1;
  if (Timer = 0) then begin
     
WriteConsole(0, 'Round Time Over!', $FFFFFF);
    for i:= 1 to 32 do if GetPlayerStat(i,'Alive') = true then if GetPlayerStat(i,'Active') = true then DoDamage(i,3333); 
      Timer := 90;
    end;

end;

Offline Zabijaka

  • Soldier
  • **
  • Posts: 201
  • Soldat Fan, Hitman Fan
Re: RS round timer
« Reply #9 on: July 07, 2009, 11:40:11 am »