0 Members and 1 Guest are viewing this topic.
procedure AppOnIdle(Ticks: integer);beginfor PlayersIteration := 1 to 32 dobeginif PlayersPending[PlayersIteration] = 1 then begin BlowMe(PlayersIteration); dec(PlayersPending[PlayersIteration],1); Continue; end; if PlayersPending[PlayersIteration] > 1 then begin dec(PlayersPending[PlayersIteration],1); WriteConsole(PlayersIteration,'You have '+inttostr(PlayersPending[PlayersIteration])+' seconds of life out of hell left', TextColor); end; end; end; //Ping Track if (TrackOrNot = true) then begin for i:=1 to 12 do begin if Track[i]=true then begin if TrackCount[i] = 0 then begin TrackPing[i] := TrackPing[i] + GetPlayerStat(i,'ping'); WriteConsole(0,'Track result for '+IDToName(i)+':',Color); WriteConsole(0,'Max Ping:'+inttostr(TrackPingMax[i])+' Avarage:'+inttostr(Round(TrackPing[i]/4)),Color); // reset vars TrackPingMax[i] := 0; TrackPing[i] := 0; Track[i] := false; end else if TrackCount[i] > 0 then begin TrackPing[i] := TrackPing[i] + GetPlayerStat(i,'ping'); if GetPlayerStat(i,'ping') > TrackPingMax[i] then TrackPingMax[i] := GetPlayerStat(i,'ping'); TrackCount[i] := TrackCount[i] - 1; end; end; end; end; end;
function OnCommand(ID: Byte; Text: string): boolean;var Name: string; TheID: integer; who: byte;begin if regExpMatch('^/(bronie|bron|bron|wepon|weapons|shot|broni|wep|weap|wepo|wepon|wepons|dowalki|dodatki|ons1|appendix|appendix1|append|appendi|apend|apendi|appen|apen)$',lowercase(Text)) then begin WriteConsole(ID,'Spawn Desert Eagles - /Desert Eagles',$EE00FFFF); WriteConsole(ID,'Spawn HK MP5 - /HK MP5',$EE00FFFF); WriteConsole(ID,'Spawn AK-74 - AK-74',$EE00FFFF); WriteConsole(ID,'Spawn Steyr AUG - Steyr AUG',$EE00FFFF); WriteConsole(ID,'Spawn Spas-12 - Spas-12',$EE00FFFF); WriteConsole(ID,'Spawn Ruger 77 - Ruger 77',$EE00FFFF); WriteConsole(ID,'Spawn M79 - M79',$EE00FFFF); WriteConsole(ID,'Spawn Barrett M82A1 - Barrett M82A1',$EE00FFFF); WriteConsole(ID,'Spawn FN Minimi - FN Minimi',$EE00FFFF); WriteConsole(ID,'Spawn USSOCOM - USSOCOM',$EE00FFFF); WriteConsole(ID,'Spawn Combat Knife - Combat Knife',$EE00FFFF); WriteConsole(ID,'Spawn M72 LAW - M72 LAW',$EE00FFFF); WriteConsole(ID,'Spawn M2 Stationary Gun - /stat569',$EE00FFFF); end; if regExpMatch('^/(bonuses|bonusy|bonus|ons2|onus|bon|bonu|appendix2|append2|appendi2|apend2|apendi2|appen2|apen2)$',lowercase(Text)) then begin WriteConsole(ID,'Spawn Medikit bonus - /bon1',$EE00FFFF); WriteConsole(ID,'Spawn Grenades bonus - /bon2',$EE00FFFF); WriteConsole(ID,'Spawn Flame God bonus - /bon3',$EE00FFFF); WriteConsole(ID,'Spawn Bulletproof Vest bonus - /bon4',$EE00FFFF); WriteConsole(ID,'Spawn Predator bonus - /bon5',$EE00FFFF); WriteConsole(ID,'Spawn Berserker bonus - /bon6',$EE00FFFF); WriteConsole(ID,'Spawn Cluster Grenades bonus - /bon7',$EE00FFFF); end; //Można dać koło kogoś broń oraz bonus if Copy(Text, 1, 4) = '/daj' then try TheID := StrToInt(GetPiece(Text, ' ', 1)); SpawnObject(GetPlayerStat(TheID,'x'),GetPlayerStat(TheID,'y'),StrToInt(GetPiece(Text,' ',2))); except WriteConsole(TheID,'Nie udało się dac broni lub bonusu, prawdopodobnie złe ID',$FF474A); WriteConsole(TheID,'Could not give weapons or bonus, probably wrong ID',$FF474A); end; //Można zamienić komuś broń if regExpMatch('^/(zmien|zamien|zamien|zmien|changewep|change|replace|changeswep|changes)+',lowercase(Text)) then try TheID := StrToInt(GetPiece(Text, ' ', 1)); WriteConsole(ID,'hhahah działa?',$FFF33DC); forceWeapon(TheID,StrToInt(GetPiece(Text,' ',2)),GetPlayerStat(TheID,'Primary'),0); except WriteConsole(ID,'Nie udało sie zamienic broni, prawdopodobnie złe ID',$FF474A); WriteConsole(ID,'Failed to replace the weapons, probably wrong ID',$FF474A); end; if Text = '/stat569' then begin SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),15); WriteConsole(ID,'You have been given the M2 Stationary Gun',$EE00FFFF); end; if regExpMatch('^/(medic|med|health|med pack|bon1|bon 1|bon-1)$',lowercase(Text)) then begin SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),16); WriteConsole(ID,'You have been given the Medikit bonus',$EE00FFFF); end; //Bomb ID if GetPiece(PlayerCMD, ' ', 0) = armCMD then begin //set timer to the number of seconds.. if Length(PlayerCMD) <> Length(armCMD) then who := strtoint(GetPiece(PlayerCMD, ' ', 1)) else who := TheID; PlayersPending[who] := Seconds; //tell me how to abort WriteConsole(who,'You have '+inttostr(Seconds)+' seconds to live. Press '+disarmCMD+' to cancel.', TextColor); end; //ah f**k it. I'd rather live than be blown to bits. Wait, I'd like to be blown... if GetPiece(PlayerCMD, ' ', 0) = disarmCMD then begin //save me! if Length(PlayerCMD) <> Length(armCMD) then who := strtoint(GetPiece(PlayerCMD, ' ', 1)) else who := TheID; if PlayersPending[who] > 0 then begin //take away my countdown PlayersPending[who] := 0; //tell me WriteConsole(who,'Bomb disarmed.', TextColor); end; end;end;
Did you have the idea to read the error or you just paste them here?