Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- ################################################################################
- # Anti Bot by HavingGood
- ################################################################################
- */
- #include <a_samp>
- #define RED 0xFF0000
- #define FILTERSCRIPT
- new bt[20];
- new bt2[20];
- new Search;
- public OnPlayerConnect(playerid)
- {
- GetPlayerIp(playerid, bt, sizeof(bt));
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- if(!IsPlayerConnected(i) || i == playerid) continue;
- if(strcmp(bt2, bt)== 0)
- GetPlayerIp(i, bt2, sizeof(bt2));
- {
- Search++;
- if(Search >= 2)
- {
- new strbt[28];
- format(strbt, sizeof(strbt), "Player %s has been banned for btting server", PlayerName(playerid));
- SendClientMessageToAll(RED, strbt);
- printf("*bt* %s(%d) MK %d", PlayerName(playerid), playerid, Search); //Dont delete this searching player IP.
- Ban(playerid); //Ban player
- //Kick(playerid); //This is kick
- return 1;}}}
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- SendClientMessage(playerid,RED, "This server using AntiBot by HavingGood");
- return 1;
- }
- PlayerName(playerid)
- {
- new pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
- return pName;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement