Author Topic: Bonus pts for kills without death!  (Read 1081 times)

0 Members and 1 Guest are viewing this topic.

Offline Vyka

  • Major
  • *
  • Posts: 59
Bonus pts for kills without death!
« on: September 27, 2008, 01:04:32 pm »
Script Name: Bonus PTS for kills without death...
Script Description:
Player gains bonus points for kills without death ;)¬ 
If somebody gained points, he can't do this again.
Simple script. Usefull with survival mode... ;)
also works good in rest of gameplays : )
Original Author: Vyka (Wykalaczka)
Core Version: 2,6,3
Code:
Code: [Select]
const
color=$dd00dd;            // color of msg, set your own
frags=3;                       // kills needed to gain points
bonus=3;                     // points adding to player

var
kills: array [1..32] of integer;
bool: array [1..32] of boolean;
i: integer;

procedure ActivateServer();
begin
for i:=1 to 32 do kills[i]:=0
end;

procedure OnPlayerRespawn(ID: Byte);
begin
kills[ID]:=0;
bool[ID]:=true;
end;

procedure OnPlayerKill(Killer, Victim: byte;Weapon: string);
begin
kills[Victim]:=0;
kills[Killer]:=kills[Killer]+1;
if ((kills[Killer]=frags) and (bool[Killer]=true)) then begin
SetScore(Killer,GetPlayerStat(Killer,'KILLS')+bonus);
WriteConsole(0,+idtoname(Killer)+' gained '+inttostr(bonus)+' points for '+inttostr(frags)+' kills without death!', color);
bool[Killer]:=false;
end;
end;

enjoy    : )
« Last Edit: September 28, 2008, 02:29:46 am by Vyka »

Offline miketh2005

  • Soldat Beta Team
  • Flagrunner
  • ******
  • Posts: 668
  • What's the URL for www.microsoft.com?
Re: Bonus pts for kills without death!
« Reply #1 on: September 27, 2008, 03:23:57 pm »
nice script, never thought of this, you should add it to your sig ;)
Quote from: 'Ando.' pid='12999178' dateline='1309046898'
My new password is secure as shit :)
Mate, I am not sure Shit is even secured nowadays.

Offline ~Niko~

  • Rainbow Warrior
  • *****
  • Posts: 2410
Re: Bonus pts for kills without death!
« Reply #2 on: September 27, 2008, 03:56:27 pm »
wow we just had it in a DM survival... back to 1.3.1... Niko got 3 kills in a row! +2 points... it was so neat :D aaahhh old timez...