0 Members and 1 Guest are viewing this topic.
type plr = record;level,xp,extrahealth,deathstillkick: integer;damagemultiplier,mana: single;end;varplayer: array[1..32] of plr;procedure foo(ID: byte);beginplayer[ID].level := 9;player[ID].damagemultiplier := 2.6;player[ID].deathstillkick := 20;player[ID].mana := 5.5;player[ID].xp := 0;end;procedure ActivateServer();var i: byte;beginfor i := 1 to 32 do foo(i); // calls foo for all players, setting 160 variables all at onceend;
varp1lvl,p2lvl,p3lvl,p4lvl,p5lvl,p6lvl, (ect)
Function OnPlayerCommand(ID:Byte; Text:String):Boolean; begin if LowerCase(Text) = '/pred' then GiveBonus(ID,1); Result := false; end;
var Kills1, Kills2, Kills3, Kills4, Kills6, Kills7, Kills8, Kills9, ..., Kills32: byte;procedure OnPlayerKill(Shooter, Victim: byte; Weapon: string);begin if Shooter = 1 then Kills1:= Kills1 + 1 else if Shooter = 2 then Kills2:= Kills2 + 1 else if Shooter = 3 then Kills3:= Kills3 + 1 else if Shooter = 4 then Kills4:= Kills4 + 1 else if Shooter = 5 then Kills5:= Kills5 + 1 else if Shooter = 6 then Kills6:= Kills6 + 1 ... else if Shooter = 32 then Kills32:= Kills32 + 1;end;