Author Topic: Change this script for FLAMER  (Read 694 times)

0 Members and 1 Guest are viewing this topic.

Offline sckme

  • Major(1)
  • Posts: 33
Change this script for FLAMER
« on: November 18, 2008, 10:56:17 am »
can somebody chagne this script for flamer, not pred?

Code: [Select]
  const
  Color = $32CD32;

var
  IsPred, AfterRespawn: array[1..32] of boolean;

procedure AppOnIdle(Ticks: cardinal);
var
  i: byte;
begin
  for i := 1 to 32 do if AfterRespawn[i] then begin
    if IsPred[i] then begin
      GiveBonus(i, 1);
      DrawText(i, '  ', 0, $00000000, 0, 0, 0);
    end;
    AfterRespawn[i] := false;
  end;
  if (Ticks mod 600) = 0 then begin
    for i := 1 to 32 do if GetPlayerStat(i, 'Active') = true then if IsPred[i] and (GetPlayerStat(i, 'Alive') = true) then begin
      GiveBonus(i, 1);
      DrawText(i, '  ', 0, $00000000, 0, 0, 0);
    end;
  end;
end;

procedure OnJoinGame(Id, Team: byte);
begin
  IsPred[Id] := false;
end;

function OnCommand(Id: byte; Text: string): boolean;
var
  Who: byte;
begin
  if Text[1] = '/' then begin
    Delete(Text, 1, 1);
    if LowerCase(GetPiece(Text, ' ', 0)) = 'setpred' then begin
      try
        Who := StrtoInt(Copy(Text, 9, Length(Text)));
        if not GetPlayerStat(Who, 'Active') then StrtoInt(' ');
        IsPred[Who] := true;
        if GetPlayerStat(Who, 'Alive') = true then begin
          GiveBonus(Who, 1);
          DrawText(Who, '  ', 0, $00000000, 0, 0, 0);
        end;
        if Id <> Who then WriteConsole(Id, 'You have given ' + GetPlayerStat(Who, 'Name') + ' infinite predator', Color);
        WriteConsole(Who, 'Admin dal ci niewidzialnosc!', Color);
      except
        WriteConsole(Id, 'Invalid player', Color);
      end;
    end else if LowerCase(GetPiece(Text, ' ', 0)) = 'delpred' then begin
      try
        Who := StrtoInt(Copy(Text, 9, Length(Text)));
        if not GetPlayerStat(Who, 'Active') then StrtoInt(' ');
        IsPred[Who] := false;
        if Id <> Who then WriteConsole(Id, 'You have taken infinite predator from ' + GetPlayerStat(Who, 'Name'), Color);
        WriteConsole(Who, 'Admin zabral ci niewidzialosc!', Color);
      except
        WriteConsole(Id, 'Invalid player', Color);
      end;
    end;
  end;
end;

procedure OnPlayerRespawn(Id: byte);
begin
  AfterRespawn[Id] := true;
end;

Offline danmer

  • Camper
  • ***
  • Posts: 466
  • crabhead
Re: Change this script for FLAMER
« Reply #1 on: November 19, 2008, 03:42:24 am »
use the search
http://forums.soldat.pl/index.php?topic=25405.0

also, spend some of your free time getting familiar with the scriptcore, it shouldn't take long. At least look at the procedure list