0 Members and 1 Guest are viewing this topic.
var Killz: array [1..32] of integer; Deathz: array [1..32] of integer;procedure OnPlayerKill(Killer, Victim: byte;Weapon: string);begin; Killz[Killer] := Killz[Killer] + 1; Deathz[Victim] := Deathz[Victim] + 1; if Killer = Victim then begin Killz[Killer] := Killz[Killer] - 1 end; end;procedure OnPlayerSpeak(ID: Byte; Text: string);begin if Text = '!spec' then begin if GetPlayerStat(ID, 'Team') < 5 then begin Command('/setteam5 ' + IntToStr(ID)) end else WriteConsole(ID,'You are already a spectator', RandomColor); end; if Text = '!ping' then begin WriteConsole(0, (IDToName(ID)) + ', Your ping is ' + (GetPlayerStat(ID,'ping')), RandomColor); end; if (Text = '!rate') then begin WriteConsole(0, (IDToName(ID)) + ', Your rate is ' + IntToStr(Killz[ID])/IntToStr(Deathz[ID]) , RandomColor); end; if (Text ='!rate') and (Killz[ID] = 0) then begin WriteConsole(0, (IDToName(ID)) + ', Your rate is ' + IntToStr(Killz[ID])/IntToStr(Deathz[ID]), RandomColor); end; end;
Last year, I dreamt I was pissing at a restroom, but I missed the urinal and my penis exploded.
WriteConsole(0, (IDToName(ID)) + ', Your rate is ' + IntToStr(Killz[ID])/IntToStr(Deathz[ID]) , RandomColor);
WriteConsole(0, (IDToName(ID)) + ', Your rate is ' + IntToStr(Killz[ID]/Deathz[ID]) , RandomColor);
function IntToFloat(Num: integer): single;beginresult := strtofloat(inttostr(num));end;WriteConsole(0, (IDToName(ID)) + ', Your rate is ' + floattostr(roundto(inttofloat(Killz[ID])/inttofloat(Deathz[ID],2))), RandomColor);