Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- forward CheckingSpeedHack();
- new CheckSH;
- KillTimer(CheckSH);
- CheckSH = SetTimer("CheckingSpeedHack", 100, 1);
- public CheckingSpeedHack()
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- new String[1000],maxspeed=275;
- if(GetPlayerState(i) == PLAYER_STATE_DRIVER)
- {
- new kmh = GetPlayerSpeed(i, true);
- if(kmh > maxspeed && PlayerInfo[i][pAdmin] < 6)
- {
- new tmpcar = GetPlayerVehicleID(i);
- if(!IsAPlane(tmpcar) || tmpcar < 1698)
- {
- format( String, sizeof( String ), "ADMCMD: %s has been banned, reason: Speed hacking.", GetPlayerNameEx(i));
- SendClientMessageToAllEx( COLOR_LIGHTRED, String );
- PlayerInfo[i][pBanned] = 3;
- new year, month,day;
- getdate(year, month, day);
- new playerip[32];
- GetPlayerIp(i, playerip, sizeof(playerip));
- format( String, sizeof( String ), "ADMCMD: %s (IP:%s) was banned, reason: Speed hacking (%d-%d-%d)", GetPlayerNameEx(i), playerip ,month,day,year);
- PlayerInfo[i][pBanned] = 3;
- Log("logs/ban.log", String);
- new ip[32];
- GetPlayerIp(i,ip,sizeof(ip));
- KickEx(i);
- AddBan(ip);
- TotalAutoBan++;
- }
- }
- }
- new playerspeed = GetPlayerSpeedOnFoot(i, true);
- new playermaxspeed=45;
- if(!IsPlayerInAnyVehicle(i) && TutStep[i] <= 1 && TutStep[i] >= 25)
- {
- if(playerspeed > playermaxspeed && PlayerInfo[i][pAdmin] < 6)
- {
- format( String, sizeof( String ), "ADMCMD: %s has been banned, reason: Airbreak hacking.", GetPlayerNameEx(i));
- SendClientMessageToAllEx( COLOR_LIGHTRED, String );
- PlayerInfo[i][pBanned] = 3;
- new year, month,day;
- getdate(year, month, day);
- new playerip[32];
- GetPlayerIp(i, playerip, sizeof(playerip));
- format( String, sizeof( String ), "ADMCMD: %s (IP:%s) was banned, reason: Airbreak hacking (%d-%d-%d)", GetPlayerNameEx(i), playerip ,month,day,year);
- PlayerInfo[i][pBanned] = 3;
- Log("logs/ban.log", String);
- new ip[32];
- GetPlayerIp(i,ip,sizeof(ip));
- KickEx(i);
- AddBan(ip);
- TotalAutoBan++;
- }
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement