Guest User

Untitled

a guest
Jun 21st, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. const
  2. MaxPlay = 12; //Max amount of players
  3. MaxPing = 64; //Max ping allowed
  4. Delay = 10; //Each how many seconds the ping of each player is checked
  5. Warnings = 5; //Amount of warnings a player has to get before get kicked
  6. Ban = 10; //Amount of minutes the ban will last
  7.  
  8. var
  9. i: Integer;
  10. ID: array[1..MaxPlay] of Integer;
  11.  
  12. procedure AppOnIdle(Ticks: integer);
  13. begin
  14. if i = 0 then
  15. if (GetPlayerStat(ID,'Ping')) > MaxPing then begin
  16. WriteConsole(ID,'Your ping is higher than allowed, stop downloading porn!',$006900);
  17. i := Delay;
  18. Warnings[ID] := Warnings[ID] + 1;
  19. else i := i - 1;
  20. end;
  21. if Warnings[ID] = Warnings then
  22. BanPlayer(1,Ban);
  23. end;
Add Comment
Please, Sign In to add comment