Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const
- MaxPlay = 12; //Max amount of players
- MaxPing = 64; //Max ping allowed
- Delay = 10; //Each how many seconds the ping of each player is checked
- Warnings = 5; //Amount of warnings a player has to get before get kicked
- Ban = 10; //Amount of minutes the ban will last
- var
- i: Integer;
- ID: array[1..MaxPlay] of Integer;
- procedure AppOnIdle(Ticks: integer);
- begin
- if i = 0 then
- if (GetPlayerStat(ID,'Ping')) > MaxPing then begin
- WriteConsole(ID,'Your ping is higher than allowed, stop downloading porn!',$006900);
- i := Delay;
- Warnings[ID] := Warnings[ID] + 1;
- else i := i - 1;
- end;
- if Warnings[ID] = Warnings then
- BanPlayer(1,Ban);
- end;
Add Comment
Please, Sign In to add comment