Guest User

Anti Niex

a guest
Oct 26th, 2012
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.69 KB | None | 0 0
  1. //FilterScript Ant-Niex Boot By:Gabriel Hornet.
  2. //Exclusividade www.homehots.net
  3. //Bom,Minha Primeira fs de proteção ta ae.. Se Forem Postar em Seus blogs,Não Sejam NOobS Créditos..
  4. //Exclusivo Para www.homehots.net
  5.  
  6. #include <a_samp> // Include do SAMP
  7. #define MAX_CONNECTIONS_FROM_IP 1 // Não Mudar
  8.  
  9. //---------------------------------------------
  10.  
  11. public OnFilterScriptInit()
  12. {
  13. printf("\n*** FilterSscript Ant Niex-Boot Inicializada e Crarregada. Maximo de conexões a partir de 1 IP = %d\n",MAX_CONNECTIONS_FROM_IP);
  14. }
  15.  
  16. //---------------------------------------------
  17. //GetNumberOfPlayersOnThisIP
  18. // Retorna o número de jogadores de ligação do
  19. // Fornecido endereço IP
  20.  
  21. stock GetNumberOfPlayersOnThisIP(test_ip[])
  22. {
  23. new against_ip[32+1];
  24. new x = 0;
  25. new ip_count = 0;
  26. for(x=0; x<MAX_PLAYERS; x++) {
  27. if(IsPlayerConnected(x)) {
  28. GetPlayerIp(x,against_ip,32);
  29. if(!strcmp(against_ip,test_ip)) ip_count++;
  30. }
  31. }
  32. return ip_count;
  33. }
  34.  
  35. //---------------------------------------------
  36.  
  37. public OnPlayerConnect(playerid)
  38. {
  39. new connecting_ip[32+1];
  40. GetPlayerIp(playerid,connecting_ip,32);
  41. new num_players_on_ip = GetNumberOfPlayersOnThisIP(connecting_ip);
  42.  
  43. if(num_players_on_ip > MAX_CONNECTIONS_FROM_IP) {
  44. printf("Ant-NiexBoot: leitor de ligação (% d) excedido% d conexões IP de% s.", playerid, MAX_CONNECTIONS_FROM_IP, connecting_ip);
  45. Kick(playerid);
  46. return 1;
  47. }
  48.  
  49. return 0;
  50. }
  51.  
  52. //---------------------------------------------
  53.  
  54. // EEEEEEEEEEEEEEEE
  55. // EE
  56. // EE
  57. // EE
  58. // EE
  59. // EE
  60. // EE E EE
  61. // EE EE
  62. // EE EE
  63. // EEEEEEEEEEEEEEEE
Advertisement
Add Comment
Please, Sign In to add comment