Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #define MAX_PING 1000
- forward CheckPing(playerid);
- new Timer[MAX_PLAYERS];
- public OnPlayerSpawn(playerid)
- {
- Timer[playerid] = SetTimerEx("CheckPing",1000,1,"i",playerid);
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- KillTimer(Timer[playerid]);
- return 1;
- }
- public CheckPing(playerid)
- {
- if(GetPlayerPing(playerid) > MAX_PING) Kick(playerid);
- }
Advertisement
Add Comment
Please, Sign In to add comment