0 Members and 1 Guest are viewing this topic.
[*] [Error] wa -> (OnPlayerKill): Invalid parameter10-03-25 06:27:52 [*] [Error] wa -> (OnPlayerKill): Invalid parameter10-03-25 06:27:56 [*] [Error] wa -> (OnPlayerKill): Invalid parameter10-03-25 06:28:00 [*] [Error] wa -> (OnPlayerKill): Invalid parameter10-03-25 06:28:00 [*] [Error] wa -> (OnPlayerKill): Invalid parameter10-03-25 06:28:05 [*] [Error] wa -> (OnPlayerKill): Invalid parameter10-03-25 06:28:05 [*] [Error] wa -> (OnPlayerKill): Invalid parameter10-03-25 06:28:05 [*] [Error] wa -> (OnPlayerKill): Invalid parameter10-03-25 06:28:05 [*] [Error] wa -> (OnPlayerKill): Invalid parameter10-03-25 06:28:05 [*] [Error] wa -> (OnPlayerKill): Invalid parameter10-03-25 06:28:06 [*] [Error] wa -> (OnPlayerKill): Invalid parameter10-03-25 06:28:06 [*] [Error] wa -> (OnPlayerKill): Invalid parameter10-03-25 06:28:06 [*] [Error] wa -> (OnPlayerKill): Invalid parameter10-03-25 06:28:06 [*] [Error] wa -> (OnPlayerKill): Invalid parameter10-03-25 06:28:06 [*] [Error] wa -> (OnPlayerKill): Invalid parameter10-03-25 06:28:06 [*] [Error] wa -> (OnPlayerKill): Invalid parameter10-03-25 06:28:06 [*] Too many script errors! Shutting down server -> "wa"10-03-25 06:28:06 Shutting down server...10-03-25 06:28:06 Shutting down FileServer...10-03-25 06:28:06 Shutting down admin server...10-03-25 06:28:06 Shutting down ScriptCore...
procedure OnPlayerKill(Killer, Victim: byte;Weapon: byte);
procedure OnPlayerKill(Killer, Victim: byte; Weapon: String);
procedure DropLoot(ID,Killer: byte);var drop: byte; loot: string;begindrop := 255;if getplayerstat(ID,'human')=false then case getplayerstat(ID,'name') of 'Zombie': drop := choose([1,16,17]); 'Elite Zombie': drop := choose([18,19,22,5]); end;if drop = 255 then drop := choose([1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,17,18,19,20,21,22]);case drop of 1: loot := 'Desert Eagle'; 2: loot := 'HK MP5'; 3: loot := 'AK 74'; 4: loot := 'Steyr AUG'; 5: loot := 'Spas 12'; 6: loot := 'Ruger77'; 7: loot := 'M79'; 8: loot := 'Barrett M82A1'; 9: loot := 'Minimi'; 10: loot := 'Minigun'; 11: loot := 'USSOCOM'; 12: loot := 'Combat Knife'; 13: loot := 'Chainsaw'; 14: loot := 'LAW'; 15: loot := 'Stationary Gun'; 16: loot := 'Medical Kit'; 17: loot := 'Grenade Kit'; 18: loot := 'Flamer Kit'; 19: loot := 'Vest Kit'; 20: loot := 'Predator Kit'; 21: loot := 'Berserk Kit'; 22: loot := 'Cluster Kit'; end;if (drop >= 1) AND (drop <= 22) then begin spawnobject(getplayerstat(ID,'x'),getplayerstat(ID,'y')-11,drop); writeconsole(Killer,'Looted -:- ' + loot ,$ff5555ff); end;end;function Chance(Perc: single): boolean;beginresult := (strtofloat(inttostr(random(0,101)))/100.0 < perc);end;procedure OnPlayerKill(Killer, Victim: byte; Weapon: string);beginif chance(0.5) then droploot(victim,killer); // 50% chance of dropping loot, 0.2 would be a 20% chance, ectend;
10-03-25 20:05:48 [*] Compiling wa -> wa.pas...10-03-25 20:05:48 [*] wa -> [Error] (7:20): Unknown identifier 'choose'10-03-25 20:05:48 [*] Compilation Failed.10-03-25 20:05:48 Shutting down server...10-03-25 20:05:48 Shutting down admin server...10-03-25 20:05:49 Shutting down ScriptCore...
function Choose(Input: array of variant): variant;var i,len: integer;beginlen := getarraylength(input);i := random(0,len);if i < 0 then i := 0;if i > len-1 then i := len-1;result := input[i];end;procedure DropLoot(ID,Killer: byte);var drop: byte; loot: string;begindrop := 255;if getplayerstat(ID,'human')=false then case getplayerstat(ID,'name') of 'Zombie': drop := choose([1,16,17]); 'Elite Zombie': drop := choose([18,19,22,5]); end;if drop = 255 then drop := choose([1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,17,18,19,20,21,22]);case drop of 1: loot := 'Desert Eagle'; 2: loot := 'HK MP5'; 3: loot := 'AK 74'; 4: loot := 'Steyr AUG'; 5: loot := 'Spas 12'; 6: loot := 'Ruger77'; 7: loot := 'M79'; 8: loot := 'Barrett M82A1'; 9: loot := 'Minimi'; 10: loot := 'Minigun'; 11: loot := 'USSOCOM'; 12: loot := 'Combat Knife'; 13: loot := 'Chainsaw'; 14: loot := 'LAW'; 15: loot := 'Stationary Gun'; 16: loot := 'Medical Kit'; 17: loot := 'Grenade Kit'; 18: loot := 'Flamer Kit'; 19: loot := 'Vest Kit'; 20: loot := 'Predator Kit'; 21: loot := 'Berserk Kit'; 22: loot := 'Cluster Kit'; end;if (drop >= 1) AND (drop <= 22) then begin spawnobject(getplayerstat(ID,'x'),getplayerstat(ID,'y')-11,drop); writeconsole(Killer,'Looted -:- ' + loot ,$ff5555ff); end;end;function Chance(Perc: single): boolean;beginresult := (strtofloat(inttostr(random(0,101)))/100.0 < perc);end;procedure OnPlayerKill(Killer, Victim: byte; Weapon: string);beginif chance(0.5) then droploot(victim,killer); // 50% chance of dropping loot, 0.2 would be a 20% chance, ectend;
const ZombieTeam = 2; // Team of zombies procedure OnJoinTeam(ID, Team: byte);begin if Team = ZombieTeam then Command('/setteam' + iif(ZombieTeam = 2, '1', '2') + ' ' + inttostr(ID)); end;
type plr = record targetteam: byte; end;var players: array[1..32] of plr;procedure ConstrainTeam(ID, CurTeam: Byte);beginif curteam <> players[ID].targetteam then command('/setteam'+inttostr(players[ID].targetteam)+' '+inttostr(id));end;procedure OnJoinGame(ID, Team: Byte);beginplayers[ID].targetteam := iif(getplayerstat(ID,'human'),1,2);end;procedure OnJoinTeam(ID, Team: Byte);beginconstrainteam(ID,team);end;procedure OnPlayerKill(Killer, Victim: byte; Weapon: string);beginif players[victim].targetteam = 1 then players[victim].targetteam := 2 else players[victim].targetteam := 1;constrainteam(victim,getplayerstat(victim,'team'));end;
type plr = record targetteam: byte; end;var players: array[1..32] of plr;procedure OnJoinGame(ID, Team: Byte);beginplayers[ID].targetteam := iif(getplayerstat(ID,'human'),1,2);end;procedure OnJoinTeam(ID, Team: Byte);beginif team <> 5 then if team <> players[ID].targetteam then command('/setteam'+inttostr(players[ID].targetteam)+' '+inttostr(id));end;procedure OnPlayerKill(Killer, Victim: byte; Weapon: string);beginif killer <> victim then begin if players[victim].targetteam = 1 then players[victim].targetteam := 2 else players[victim].targetteam := 1; command('/setteam'+inttostr(players[victim].targetteam)+' '+inttostr(victim)); end;end;
And Stuffy how you've know my name ?
var Died: array[1..32] of boolean;procedure OnJoinGame(ID, Team: byte);begin Dead[ID]:= false;end;procedure OnJoinTeam(ID, Team: byte);begin if Dead[ID] and (Team <> 2) and (Team <> 5) then Command('/setteam2 ' + IntToStr(ID));end;procedure OnPlayerRespawn(ID: byte);begin if Dead[ID] then Command('/setteam2 ' + IntToStr(ID));end;procedure OnPlayerKill(Killer, Victim: byte; Weapon: string);begin Dead[Victim]:= true;end;
[*] Zombie infections -> [Error] (7:3): Unknown identifier 'Dead'10-03-26 06:03:39 [*] Compilation Failed.10-03-26 06:03:39 Shutting down server...10-03-26 06:03:39 Shutting down admin server...10-03-26 06:03:39 Shutting down ScriptCore...
var Killed : array[1..32] of boolean; Total, TotalB : integer;procedure OnPlayerKill(Killer, Victim: byte; Weapon: String);beginif GetPlayerStat(Victim,'Team') = 1 and GetPlayerStat(Victim,'Human') then beginKilled[Victim] := true;WriteConsole(0, 'Player ' + IdToName(Victim) + 'has been killed by an zombie and is now infected.', $123456);Command('/setteam2' + IntToStr(Victim));TotalB := TotalB +1;end;end;procedure OnJoinTeam(ID, Team: byte);var i : integer;beginif (Killed[ID]) and (Team <> 5) then beginCommand('/setteam2' + IntToStr(ID));WriteConsole(ID, 'You are infected!', $123456);end;if Total = TotalB then beginWriteConsole(0, 'Everyone has been infected!!!', $123456);for i := 1 to 32 doKilled[i] := false;for i := 1 to 32 doCommand('/setteam1' + IntToStr(i))Command('/nextmap');end;end;procedure OnJoinGame(ID, Team: byte);beginif GetPlayerStat(ID,'Human') thenTotal := Total +1;end;
var Killed : array[1..32] of boolean; Total, TotalB : integer;procedure OnPlayerKill(Killer, Victim: byte; Weapon: String);beginif GetPlayerStat(Victim,'Team') = 1 and GetPlayerStat(Victim,'Human') then beginKilled[Victim] := true;WriteConsole(0, 'Player ' + IdToName(Victim) + 'has been killed by an zombie and is now infected.', $123456);Command('/setteam2 ' + IntToStr(Victim));TotalB := TotalB +1;end;end;procedure OnMapChange(NewMap: String);var i : integer;beginTotalB := 0;if GetPlayerStat(i,'Human') thenCommand('/setteam1 ' + IntToStr(i))end;procedure OnJoinTeam(ID, Team: byte);var i : integer;beginif (Killed[ID]) and (Team <> 5) and (Team <> 2) then beginCommand('/setteam2 ' + IntToStr(ID));WriteConsole(ID, 'You are infected!', $123456);end;if Total = TotalB then beginWriteConsole(0, 'Everyone has been infected!!!', $123456);for i := 1 to 32 doKilled[i] := false;Command('/nextmap');end;end;procedure OnJoinGame(ID, Team: byte);beginif GetPlayerStat(ID,'Human') thenTotal := Total +1;end;