0 Members and 1 Guest are viewing this topic.
var Realistic: boolean; Hits: array[1..32] of array[1..32] of byte; Dmg: array[1..32] of array[1..32] of longint;procedure AfterKill(Killer,Victim: byte; Weapon: string);var i: byte;begin Sleep(10); DrawText(Victim,IDtoName(Killer) + ' killed you with ' + Chr(13) + Chr(10) + iif(Hits[Victim][Killer] = 1,'1 hit using ',InttoStr(Hits[Victim][Killer]) + ' hits using ') + Weapon + Chr(13) + Chr(10) + 'You hurt him with ' + Chr(13) + Chr(10) + iif(Hits[Killer][Victim] = 1,'1 hit doing ',InttoStr(Hits[Killer][Victim]) + ' hits doing ') + iif(Realistic,InttoStr(1.54 * Dmg[Killer][Victim]),InttoStr(Dmg[Killer][Victim])) + '% damage',500,$FF000000,0.06,8,340); for i := 1 to 32 do begin Hits[Victim][i] := 0; Dmg[Victim][i] := 0; end;end;procedure ActivateServer();begin if StrtoInt(ReadINI('Soldat.ini','GAME','Realistic_Mode','0')) = 1 then Realistic := true else Realistic := false;end;procedure OnPlayerKill(Killer, Victim: byte; Weapon: string);begin if Killer <> Victim then ThreadFunc([Killer,Victim,Weapon],'AfterKill');end;function OnPlayerDamage(Victim, Shooter: byte; Damage: integer): integer;begin Hits[Victim][Shooter] := Hits[Victim][Shooter] + 1; if Damage <= GetPlayerStat(Victim,'Health') then Dmg[Victim][Shooter] := Dmg[Victim][Shooter] + Damage else Dmg[Victim][Shooter] := Dmg[Victim][Shooter] + GetPlayerStat(Victim,'Health');end;procedure OnPlayerRespawn(ID: byte);var i: byte;begin for i:= 1 to 32 do begin Dmg[i][ID] := 0; Hits[i][ID] := 0; end;end;
DrawText(Victim,GetPlayerStat(Killer,'Name') + ' killed you with ' + Chr(13) + Chr(10) + iif(Hits[Victim][Killer] = 1,'1 hit using ',InttoStr(Hits[Victim][Killer]) + ' hits using ') + Weapon + Chr(13) + Chr(10) + 'You hurt him with ' + Chr(13) + Chr(10) + iif(Hits[Killer][Victim] = 1,'1 hit doing ',InttoStr(Hits[Killer][Victim]) + ' hits doing ') + iif(Realistic,InttoStr(Round(1.54 * Dmg[Killer][Victim])),InttoStr(Dmg[Killer][Victim])) + '% damage',500,$FF000000,0.06,8,340);
var Realistic: boolean; Hits: array[1..32] of array[1..32] of byte; Dmg: array[1..32] of array[1..32] of longint;procedure AfterKill(Killer,Victim: byte; Weapon: string);var i: byte;begin Sleep(10); DrawText(Victim,GetPlayerStat(Killer,'Name') + ' killed you with ' + Chr(13) + Chr(10) + iif(Hits[Victim][Killer] = 1,'1 hit using ',InttoStr(Hits[Victim][Killer]) + ' hits using ') + Weapon + Chr(13) + Chr(10) + 'You hurt him with ' + Chr(13) + Chr(10) + iif(Hits[Killer][Victim] = 1,'1 hit doing ',InttoStr(Hits[Killer][Victim]) + ' hits doing ') + iif(Realistic,InttoStr(Round(1.54 * Dmg[Killer][Victim])),InttoStr(Dmg[Killer][Victim])) + '% damage',500,$FF000000,0.06,8,340); for i := 1 to 32 do begin Hits[Victim][i] := 0; Dmg[Victim][i] := 0; end;end;procedure ActivateServer();begin if StrtoInt(ReadINI('Soldat.ini','GAME','Realistic_Mode','0')) = 1 then Realistic := true else Realistic := false;end;procedure OnPlayerKill(Killer, Victim: byte; Weapon: string);begin if Killer <> Victim then ThreadFunc([Killer,Victim,Weapon],'AfterKill');end;function OnPlayerDamage(Victim, Shooter: byte; Damage: integer): integer;begin Hits[Victim][Shooter] := Hits[Victim][Shooter] + 1; if Damage <= GetPlayerStat(Victim,'Health') then Dmg[Victim][Shooter] := Dmg[Victim][Shooter] + Damage else Dmg[Victim][Shooter] := Dmg[Victim][Shooter] + GetPlayerStat(Victim,'Health');end;procedure OnPlayerRespawn(ID: byte);var i: byte;begin for i:= 1 to 32 do begin Dmg[i][ID] := 0; Hits[i][ID] := 0; end;end;
function AddValue(x: integer): integerbeginResult := x + 5;end;//Somewhere later in the script:t := AddValue(20); //makes t = 25