SHARE
TWEET

Untitled

a guest Jul 23rd, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. forward CheckingSpeedHack();
  2. new CheckSH;
  3. KillTimer(CheckSH);
  4.  
  5. CheckSH = SetTimer("CheckingSpeedHack", 100, 1);
  6.  
  7. public CheckingSpeedHack()
  8. {
  9.     for(new i = 0; i < MAX_PLAYERS; i++)
  10.         {
  11.             if(IsPlayerConnected(i))
  12.             {
  13.             new String[1000],maxspeed=275;
  14.             if(GetPlayerState(i) == PLAYER_STATE_DRIVER)
  15.             {
  16.                 new kmh = GetPlayerSpeed(i, true);
  17.                 if(kmh > maxspeed && PlayerInfo[i][pAdmin] < 6)
  18.                 {
  19.                     new tmpcar = GetPlayerVehicleID(i);
  20.                     if(!IsAPlane(tmpcar) || tmpcar < 1698)
  21.                     {
  22.                         format( String, sizeof( String ), "ADMCMD: %s has been banned, reason: Speed hacking.", GetPlayerNameEx(i));
  23.                         SendClientMessageToAllEx( COLOR_LIGHTRED, String );
  24.                         PlayerInfo[i][pBanned] = 3;
  25.                         new year, month,day;
  26.                         getdate(year, month, day);
  27.                         new playerip[32];
  28.                         GetPlayerIp(i, playerip, sizeof(playerip));
  29.                         format( String, sizeof( String ), "ADMCMD: %s (IP:%s) was banned, reason: Speed hacking (%d-%d-%d)", GetPlayerNameEx(i), playerip ,month,day,year);
  30.                         PlayerInfo[i][pBanned] = 3;
  31.                         Log("logs/ban.log", String);
  32.                         new ip[32];
  33.                         GetPlayerIp(i,ip,sizeof(ip));
  34.                         KickEx(i);
  35.                         AddBan(ip);
  36.                         TotalAutoBan++;
  37.                     }
  38.                 }
  39.             }
  40.             new playerspeed = GetPlayerSpeedOnFoot(i, true);
  41.             new playermaxspeed=45;
  42.             if(!IsPlayerInAnyVehicle(i) && TutStep[i] <= 1 && TutStep[i] >= 25)
  43.             {
  44.                 if(playerspeed > playermaxspeed && PlayerInfo[i][pAdmin] < 6)
  45.                 {
  46.                     format( String, sizeof( String ), "ADMCMD: %s has been banned, reason: Airbreak hacking.", GetPlayerNameEx(i));
  47.                     SendClientMessageToAllEx( COLOR_LIGHTRED, String );
  48.                     PlayerInfo[i][pBanned] = 3;
  49.                     new year, month,day;
  50.                     getdate(year, month, day);
  51.                     new playerip[32];
  52.                     GetPlayerIp(i, playerip, sizeof(playerip));
  53.                     format( String, sizeof( String ), "ADMCMD: %s (IP:%s) was banned, reason: Airbreak hacking (%d-%d-%d)", GetPlayerNameEx(i), playerip ,month,day,year);
  54.                     PlayerInfo[i][pBanned] = 3;
  55.                     Log("logs/ban.log", String);
  56.                     new ip[32];
  57.                     GetPlayerIp(i,ip,sizeof(ip));
  58.                     KickEx(i);
  59.                     AddBan(ip);
  60.                     TotalAutoBan++;
  61.                 }
  62.             }
  63.         }
  64.     }
  65.     return 1;
  66. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top