Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. ARConnect(playerid);
  2. new connecting_ip[32+1];
  3. GetPlayerIp(playerid,connecting_ip,32);
  4. new num_players_on_ip = GetNumberOfPlayersOnThisIP(connecting_ip);
  5. if(num_players_on_ip > MAX_CONNECTIONS_FROM_IP){
  6. new tmp3[50];
  7. GetPlayerIp(playerid,tmp3,50);
  8. printf("MAXIPS: %s(%d) excedeu o maximo de conexões: %d conectando com o IP: %s ao server %s.", sendername, playerid, MAX_CONNECTIONS_FROM_IP, tmp3,connecting_ip);
  9. SendClientMessage(playerid, -1, "3 CONEXÕES COM O MESMO IP NO SERVIDOR É PROIBIDO!");
  10. new stringbot[128];
  11. GetPlayerName(playerid, pname, sizeof(pname));
  12. new File:BOTS=fopen("bots.txt", io_append);
  13. format(stringbot, sizeof(stringbot), "Player: %s - IP: %s\r\n", pname, tmp3);
  14. fwrite(BOTS, stringbot);
  15. fclose(BOTS);
  16. Ban(playerid);}