0 Members and 1 Guest are viewing this topic.
procedure OnWeaponChange(ID, PrimaryNum, SecondaryNum: Byte);begin if (PrimaryNum <> 255) and (PrimaryNum <> Round) then if Round = 14 then ForceWeapon(ID, 14, 14, 0) else if Round = 17 then ForceWeapon(ID, 255, 255, 0) else ForceWeapon(ID, Round, 255, 0);end;
for i:= 1 to 32 do if GetPlayerStat(i,'Alive') then DoDamage(i,200);
GetPlayerStat returns a VARIANT not a boolean.You need to change it to "if GetPlayerStat(i,'Alive') = true then"
That makes no sense.
type tPlayer = record time, delay: integer; end;var Player: array [1..32] of tPlayer; Color: longint; procedure ActivateServer();var i: byte;begin for i := 1 to 32 do begin Player[i].delay := 0; Player[i].time := 0; end;end; procedure ClearWeapons1(ID: byte);begin SetWeaponActive(ID,2,false); SetWeaponActive(ID,3,false); SetWeaponActive(ID,4,false); SetWeaponActive(ID,6,false); SetWeaponActive(ID,9,false); SetWeaponActive(ID,10,false); SetWeaponActive(ID,11,false); SetWeaponActive(ID,12,false); SetWeaponActive(ID,13,false); SetWeaponActive(ID,14,false);end;procedure ClearWeapons2(ID: byte);begin 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,14,false);end;procedure OnMapChange(NewMap: String);var i: byte;begin for i := 1 to 32 do begin Player[i].delay := 0; Player[i].time := 0; end;end; procedure AppOnIdle(Ticks: integer);var i: byte;begin for i := 1 to 32 do begin if (Player[i].time <> 0) then begin Player[i].time := Player[i].time -1; end; if (GetPlayerStat(i, 'Team') = 2) then if (Player[i].time = 1) then begin Player[i].time := 25; GiveBonus(i, 1); exit; end; for i := 1 to 32 do begin if Player[i].delay <> 0 then begin if Player[i].delay <> 1 then Player[i].delay := Player[i].delay - 1 else begin Player[i].delay := Player[i].delay - 1; exit; end; end; if (Player[i].delay = 1) then if (Player[i].time = 0) then begin Player[i].time := 25; GiveBonus(i, 1); WriteConsole(i,'You are now stealthed!',Color); exit; end; end; end; end;procedure OnJoinTeam(ID, Team: byte);begin if (GetPlayerStat(ID, 'Team') = 2) then if (GetPlayerStat(ID, 'Active') = true) then ClearWeapons2(ID); if (GetPlayerStat(ID, 'Team') = 1) then if (GetPlayerStat(ID, 'Active') = true) then ClearWeapons1(ID);end;procedure OnPlayerRespawn(ID: Byte);begin if (GetPlayerStat(ID, 'Team') = 2) then if (Player[ID].delay = 0) then Player[ID].delay := 4; GiveBonus(ID, 5); if (GetPlayerStat(ID, 'Team') = 2) then GiveBonus(ID, 5);end;procedure OnPlayerKill(Killer, Victim: byte;Weapon: string);begin if (GetPlayerStat(Victim, 'Team') = 2) then begin GiveBonus(Killer, 5); if (Player[Victim].time > 0) then Player[Victim].time := 0; end; if (GetPlayerStat(Victim, 'Team') = 1) then GiveBonus(Killer, 5);end;
... GiveBonus(ID, 5); if (GetPlayerStat(ID, 'Team') = 2) then GiveBonus(ID, 5);...
I see you haven't heard of debug: comment out parts of code and check if bug still appears.