19.09.2014, 17:57
Код:
public OnPlayerUpdate(playerid) { //-----------------------------------| //Contador de mudanзas de veнculo para anti-cheater if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { if(GetPlayerVehicleID(playerid) != LastVehicleModel[playerid]) { LastVehicleModel[playerid] = GetPlayerVehicleID(playerid); VChanges[playerid]++; } } //-----------------------------------| //Contador de FPS new drunknew = GetPlayerDrunkLevel(playerid); if(drunknew < 100){SetPlayerDrunkLevel(playerid, 2000);}else{ if(pDrunkLevelLast[playerid] != drunknew){ new wfps = pDrunkLevelLast[playerid] - drunknew; if((wfps > 0) && (wfps < 200)) pFPS[playerid] = wfps; SetPVarInt(playerid, "PVarFPS", pFPS[playerid]); pDrunkLevelLast[playerid] = drunknew;}} //-----------------------------------| //Comando Bugar if(Bugar[playerid] == true) {return 0;} return 1; } stock ProcessarBOT(playerid) { BotTolerance++; if(BotTolerance >= 5) BanBot(playerid); } stock BanBot(playerid) { new str_hack[128],pnamehack[MAX_PLAYER_NAME]; GetPlayerName(playerid, pnamehack, sizeof(pnamehack)); format(str_hack, sizeof(str_hack), "[ADM]: BOT/CONNECT FLOOD bloqueado: %s (%i) - [BANIDO]", pnamehack, playerid); CallRemoteFunction("MessageToAdmins","is",COLOUR_AVISO,str_hack); print(str_hack); CallRemoteFunction("SaveToFile","ss","BotFlood",str_hack); SendClientMessage(playerid, COLOUR_INFORMACAO, "[SERVER]: Seu IP foi banido por tentar conectar 5x em menos de 2 segundos de forma seguida."); BanEx(playerid, "Flood/Reconnect"); }