Advertisement
Guest User

Anti Invisible BOT SA:MP [by NicK]

a guest
Nov 20th, 2014
1,392
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.20 KB | None | 0 0
  1. /*
  2.     Compilado com includes do SA-MP 0.3z R2-2  
  3.     http://forum.sa-mp.com/showthread.php?t=506214 (0.3z R2-2) 
  4.     Não irá funcionar em versões anteriores.
  5. */
  6.  
  7. #include <a_samp>
  8.  
  9. enum iI
  10. {
  11.     IncomingIP[16],
  12.     IncomingVezes,
  13.     IncomingTempo
  14. }
  15. new IncomingConnection[iI];
  16.  
  17. public OnFilterScriptInit()
  18. {
  19.     print("** Invible-Bot by NicK **");
  20.     return 1;
  21. }
  22.  
  23. public OnFilterScriptExit()
  24. {
  25.     return 1;
  26. }
  27.  
  28. public OnIncomingConnection(playerid, ip_address[], port)
  29. {
  30.     if(!strcmp(IncomingConnection[IncomingIP], ip_address, true) && IncomingConnection[IncomingTempo] > gettime()) {
  31.         if(IncomingConnection[IncomingVezes] > 3) return BlockIpAddress(ip_address, 0), printf("ip %s bloqueado!", ip_address);
  32.         IncomingConnection[IncomingVezes]++;
  33.         return 1;
  34.     }
  35.     format(IncomingConnection[IncomingIP], 16, ip_address);
  36.     IncomingConnection[IncomingVezes] = 0;
  37.     IncomingConnection[IncomingTempo] = gettime()+2;
  38.     //printf("id %d conectando com o ip %s:%i", playerid, ip_address, port);
  39.     return 1;
  40. }
  41.  
  42. public OnPlayerConnect(playerid)
  43. {
  44.     return 1;
  45. }
  46.  
  47. public OnPlayerDisconnect(playerid, reason)
  48. {
  49.     return 1;
  50. }
  51.  
  52. /*
  53.       Mantenha os créditos!
  54.     www.brasilmegatrucker.com
  55.     NicK -> Brasil Mega Trucker
  56. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement