0 Members and 1 Guest are viewing this topic.
Error: OnJoinTeam: Out of rangeError: OnJoinTeam: Out of rangeError: OnJoinTeam: Out of rangeError: OnJoinTeam: Out of rangeError: OnJoinTeam: Out of rangeError: OnJoinTeam: Out of rangeError: OnJoinTeam: Out of rangeError: OnJoinTeam: Out of rangeError: OnJoinTeam: Out of rangeError: OnJoinTeam: Out of rangeError: OnJoinTeam: Out of rangeError: OnJoinTeam: Out of rangeError: OnJoinTeam: Out of rangeError: OnJoinTeam: Out of rangeError: OnMapChange : Out of range.
//Setup////////var Cash: array[1..50] of integer; Mana: array[1..50] of integer; Zombied: array[1..50] of integer; i: Integer; temp: string; piece: array[0..10] of string; shiftx: array[1..50] of integer; shifty: array[1..50] of integer; stat: array[1..50] of integer;
procedure OnMapChange(NewMap: String);begin//First get rid of the old wave;Command('/kick Zombie');//Then set every player to unzombied and give bonuses to survivors. for i := 1 to 50 do begin if GetPlayerStat(1,'Team') = 1 then begin Cash := Cash + 1500; Mana := Mana + 40; WriteConsole(i,'You recieved $1500 and 40% Mana for surviving!',$EE81FAA1); if Mana > 99 then Mana := 100; end; //shiftx := 0; //shifty := 0; stat := 0; Zombied := 0; Command('/setteam1 ' + inttostr(i)); end;//Now spawn the first waveWriteConsole(0,'Wave 1 has spawned',$EE81FAA1);Command('/addbot2 zombiegrunt');Command('/addbot2 zombiegrunt');end;
procedure OnJoinTeam(ID, Team: byte);beginif Team = 1 then beginif Zombied[ID] = 1 thenbeginCommand('/setteam2 ' + inttostr(ID));WriteConsole(ID,'Bad Zombie! You cannot join the humans until next round!',$EE81FAA1);end;SetWeaponActive(ID, 1, false);SetWeaponActive(ID, 2, false);SetWeaponActive(ID, 3, true);SetWeaponActive(ID, 4, false);SetWeaponActive(ID, 5, false);SetWeaponActive(ID, 6, false);SetWeaponActive(ID, 7, false);SetWeaponActive(ID, 8, false);SetWeaponActive(ID, 9, false);SetWeaponActive(ID, 10, false);SetWeaponActive(ID, 11, true);SetWeaponActive(ID, 12, true);SetWeaponActive(ID, 13, true);SetWeaponActive(ID, 14, true);end;if Team = 2 then beginif Zombied[ID] = 0 thenbeginZombied[ID] := 1;WriteConsole(ID,'Silly Marine. Joining Bravo makes you a zombie!',$EE81FAA1);end;SetWeaponActive(ID, 1, false);SetWeaponActive(ID, 2, false);SetWeaponActive(ID, 3, false);SetWeaponActive(ID, 4, false);SetWeaponActive(ID, 5, false);SetWeaponActive(ID, 6, false);SetWeaponActive(ID, 7, false);SetWeaponActive(ID, 8, false);SetWeaponActive(ID, 9, false);SetWeaponActive(ID, 10, false);SetWeaponActive(ID, 11, false);SetWeaponActive(ID, 12, false);SetWeaponActive(ID, 13, true);SetWeaponActive(ID, 14, false);end;if Team = 3 thenbeginCommand('/setteam2 ' + inttostr(ID));Zombied[ID] := 1;end;if Team = 4 thenbeginCommand('/setteam2 ' + inttostr(ID));Zombied[ID] := 1;end;end;
procedure OnMapChange(NewMap: String);begin//First get rid of the old wave;Command('/kick Zombie');//Then set every player to unzombied and give bonuses to survivors.  for i := 1 to 50 do   begin        if GetPlayerStat(1,'Team') = 1 then      begin      Cash := Cash + 1500;      Mana := Mana + 40;      WriteConsole(i,'You recieved $1500 and 40% Mana for surviving!',$EE81FAA1);      if Mana > 99 then      Mana := 100;      end;    //shiftx := 0;    //shifty := 0;    stat  := 0;    Zombied := 0;    Command('/setteam1 ' + inttostr(i));   end;//Now spawn the first waveWriteConsole(0,'Wave 1 has spawned',$EE81FAA1);Command('/addbot2 zombiegrunt');Command('/addbot2 zombiegrunt');end;