Author Topic: Console Kills  (Read 1772 times)

0 Members and 1 Guest are viewing this topic.

Offline Vyka

  • Major
  • *
  • Posts: 59
Console Kills
« on: February 04, 2009, 01:27:08 pm »
Script Name: Console Kills
Script Description: Show msg with combo (double, triple, multi, multix2) and player, who gained it.
Original Author(s): Vyka (Wykalaczka)
Core Version: 2,6,3
Code: Copy/Paste

Code: [Select]
type tCombo = record
H,T: integer;
end;

const
color=$ff0000;

var
Combo: array [1..32] of tCombo;
i: integer;

Procedure ActivateServer();
begin
for i:=1 to 32 do begin
Combo[i].H:=0;
Combo[i].T:=0;
end;
end;

procedure OnPlayerKill(Killer, Victim: byte;Weapon: string);
begin
  inc(Combo[Killer].H, 1);
  Combo[Killer].T:= 4;
   case Combo[Killer].H of
      2: WriteConsole(0,'Double kill! - '+idtoname(killer),color);
      3: WriteConsole(0,'Triple kill! - '+idtoname(killer),color);
      4: WriteConsole(0,'Multi kill! - '+idtoname(killer),color);
      5: WriteConsole(0,'Multi kill x2! - '+idtoname(killer),color);
   end;
end;

procedure AppOnIdle(Ticks: integer);
begin
  for i:= 1 to 32 do if Combo[i].T > 0 then begin
    dec(Combo[i].T, 1);
  end else if Combo[i].H > 0 then Combo[i].H:= 0;
end;

procedure OnJoinTeam(ID, Team: byte);
begin
Combo[ID].H:=0;
Combo[ID].T:=0;
end;


Offline danmer

  • Camper
  • ***
  • Posts: 466
  • crabhead
Re: Console Kills
« Reply #1 on: February 04, 2009, 07:23:26 pm »
something is missing :D

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: Console Kills
« Reply #2 on: February 05, 2009, 07:08:04 am »
When you do small scripts like this try to make them the best. This has combos only from 2-5, was it so hard to write rest?
It's almost same as example I gave you :P

Offline Bonecrusher

  • Global Moderator
  • Veteran
  • *****
  • Posts: 1397
  • High above
    • Zabijaka.pl
Re: Console Kills
« Reply #3 on: February 07, 2009, 08:24:06 pm »
You killed ...
DOUBLE KILL
TRIPLE KILL
MULTI KILL
MULTI KILL x2
SERIAL KILL
INSANE KILL
GIMME MORE!
MASTA KILLA!
MASTA KILLA!
MASTA KILLA!
STOP IT!!!
MERCY!!!!!!!!!!
CHEATER!!!!!!!!
PHASED PLASMA RIFLE IN THE FORTY WATT RANGE
Hey, what you just see, pal
JUST WHAT YOU SEE, PAL...
MASTA KILLA!
MASTA KILLA!
MASTA KILLA!
MASTA KILLA!
MASTA KILLA

Im chill like that

Offline scarface09

  • Veteran
  • *****
  • Posts: 1153
  • Arsenal Supporter For Life
Re: Console Kills
« Reply #4 on: February 07, 2009, 11:03:27 pm »
haha cool script!
Football is the other face of the world. If you don't like it, then you can get the hell out!