Guest User

Untitled

a guest
Mar 26th, 2011
1,355
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.39 KB | None | 0 0
  1. #include <a_samp>
  2. #define MAX_PING 1000
  3.  
  4. forward CheckPing(playerid);
  5. new Timer[MAX_PLAYERS];
  6.  
  7. public OnPlayerSpawn(playerid)
  8. {
  9.     Timer[playerid] = SetTimerEx("CheckPing",1000,1,"i",playerid);
  10.     return 1;
  11. }
  12.  
  13. public OnPlayerDisconnect(playerid, reason)
  14. {
  15.     KillTimer(Timer[playerid]);
  16.     return 1;
  17. }
  18.  
  19. public CheckPing(playerid)
  20. {
  21.     if(GetPlayerPing(playerid) > MAX_PING) Kick(playerid);
  22. }
Advertisement
Add Comment
Please, Sign In to add comment