Official Soldat Forums

Server Talk => Scripting Releases => Topic started by: Vyka on September 27, 2008, 01:04:32 pm

Title: Bonus pts for kills without death!
Post by: Vyka 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    : )
Title: Re: Bonus pts for kills without death!
Post by: miketh2005 on September 27, 2008, 03:23:57 pm
nice script, never thought of this, you should add it to your sig ;)
Title: Re: Bonus pts for kills without death!
Post by: ~Niko~ 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...