0 Members and 2 Guests are viewing this topic.
varkills: array[1..32] of byte;procedure OnJoinTeam(ID, Team: byte);begin kills[ID] := 0;end;procedure OnLeaveGame(ID, Team: byte; Kicked: boolean);begin kills[ID] := 0;end;procedure OnPlayerKill(Killer, Victim: byte; Weapon: string);varspree: array[1..17] of string;killsNeeded: byte;begin killsNeeded := 5; //number of kills needed to count as a killing spree //spree[x] where x represents the current number of spree kills player has //more can be added just be sure to change the spree array size spree[killsNeeded] := ' is on a Killing Spree!'; spree[8] := ' is on a Rampage!'; spree[11] := ' is Dominating!'; spree[14] := ' is Unstoppable!'; spree[17] := ' is Godlike!'; if killer <> victim then begin if (GetPlayerStat(killer,'team') <> GetPlayerStat(victim,'team')) then begin kills[killer] := kills[killer] + 1; if (kills[victim] >= killsNeeded) then begin Command('/say ' + GetplayerStat(victim,'name') + '''s ' + inttostr(kills[victim]) + ' kills spree ended by ' + GetPlayerStat(killer,'name')); end; kills[victim] := 0; if (kills[killer] <= Arrayhigh(spree) + 1) then begin if (spree[kills[killer]] <> '') then Command('/say ' + GetPlayerStat(killer,'name') + spree[kills[killer]]); end; end else begin if (kills[killer] > 0) then SayToPlayer(killer, 'Your spree kills have been reset for team killing'); kills[killer] := 0; end; end;end;
I don't understand do you mean that there is a /faceplam commmand ?and this command should drop a random item ?
varkills: array[1..32] of integer;function OnRequestGame(IP: string;State: integer):integer;beginResult := State;end;procedure OnJoinGame(IP, Nickname: string;Team: byte);beginend;procedure OnJoinTeam(IP, Nickname: string;Team: byte);beginkills[NameToId(Nickname)] := 0;end;procedure OnLeaveGame(IP, Nickname: string;Team: byte);beginkills[NameToId(Nickname)] := 0;end;procedure OnFlagGrab(ID: integer;TeamFlag: byte;GrabbedInBase: boolean);beginend;procedure OnFlagReturn(ID: integer;TeamFlag: byte);beginend;procedure OnFlagScore(ID: integer;TeamFlag: byte);beginend;procedure OnPlayerKill(Killer,Victim,Weapon: string);varspree: array[1..11] of string;i: integer;j: integer;killsNeeded: integer;beginkillsNeeded := 3; //number of kills needed to count as a killing spree//spree where x represents the current number of spree kills player has//more can be added just be sure to change the spree array sizespree[killsNeeded] := ' is on a Killing Spree!';spree[5] := ' is on a Rampage!';spree[7] := ' is Dominating!';spree[9] := ' is Unstoppable!';spree[11] := ' is Godlike!';i := NameToId(killer);j := NameToId(victim);if (killer <> victim) then begin //needed for servers with survival mode kills := kills + 1; if (kills[j] >= killsNeeded) then begin Command('/say ' + victim + '''s ' + inttostr(kills[j]) + ' kills spree ended by ' + killer); end; kills[j] := 0; if (kills <= Arrayhigh(spree) + 1) then begin if (spree[kills] <> '') then Command('/say ' + killer + spree[kills]); end; end;end;procedure OnPlayerRespawn(ID: integer);beginend;procedure OnPlayerSpeak(Name,Text: string);beginend;
There's is some bug, when FF is off and I kill enemy it tells ''Your spree kills have been reset for team killing'' etc.EDIT: Doesn't happen always, I think it has something to do with autobalance.. when teammate goes to enemy team..