#include #include #include #define VERSION "1.0.2" public OnFilterScriptInit(){ print("\n-------------------------------------------------\n"); printf(" S:Anti-Flood %s by Sacky\n",VERSION); print("-------------------------------------------------"); } new connect[MAX_PLAYERS]; new hack; public OnPlayerConnect(playerid){ if(!PropertyExists("Timer")){ PropertySet("Timer","On"); SetTimer("SecTimer",1000,true); SetTimer("ClearHack",60000,true); } connect[playerid] = 0; return 1; } public OnPlayerDisconnect(playerid){ if(connect[playerid] < 3){ hack++; if(hack > 5){ hack = 0; Ban(playerid); new playername[MAX_PLAYER_NAME]; GetPlayerName(playerid,playername,sizeof(playername)); printf("Banned: %s for flood hack",playername); } } return 1; } public SecTimer(){ for(new i=0;i