Guest User

AntDoSatackPoriPSBruno

a guest
Jul 14th, 2013
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.53 KB | None | 0 0
  1. #include a_samp
  2.  
  3. #if !defined varGet
  4. #define varGet(%0)      getproperty(0,%0)
  5. #endif
  6.  
  7. // http://forum.sa-mp.com/showthread.php?p=1925909
  8. //DĂȘ rep pro ipsBruno acessando este link http://forum.sa-mp.com/reputation.php?p=1925893
  9.  
  10.  
  11. #if !defined varSet
  12. #define varSet(%0,%1) setproperty(0, %0, %1)
  13. #endif
  14.  
  15. stock botGetIP[24];
  16.  
  17. #define IsPlayerBot(%0)\
  18.             GetPlayerPing(%0) == 65535 && (gettime() - varGet((GetPlayerIp(%0, botGetIP, sizeof botGetIP), botGetIP)) > 5)
  19.  
  20.  
  21. public OnPlayerConnect(playerid)
  22. {
  23.     if(IsPlayerNPC(playerid)) return false;
  24.     static playerip[24];
  25.     GetPlayerIp(playerid, playerip, 24);
  26.     if(gettime() - varGet(playerip) < 2)
  27.     {
  28.         strcat(playerip, "di_S");
  29.         if(gettime() - varGet(playerip) < 3) return false;
  30.         printf("%d Entrou em menos de 2 segundos", playerid);
  31.         GetPlayerIp(playerid, playerip, 20);
  32.         varSet(playerip, gettime());
  33.         strcat(playerip, "x");
  34.         static timers ;
  35.         timers = varGet(playerip);
  36.         varSet(playerip, 1+ timers);
  37.         if(timers > 2)
  38.         {
  39.             playerip[strlen(playerip) - 2] = 0;
  40.             printf("BOT: ID -> %d IP -> %s", playerid, playerip);
  41.             BanEx(playerid, "Bot Connect");
  42.         }
  43.     }
  44.     return varSet(playerip, gettime());
  45. }
  46.  
  47.  
  48. public OnPlayerDisconnect(playerid, reason)
  49. {
  50.     if(reason == 2)
  51.     {
  52.         static playerip[20];
  53.         GetPlayerIp(playerid, playerip, 20);
  54.         strcat(playerip, "di_S");
  55.         varSet(playerip, gettime());
  56.     }
  57.     return false;
  58.  
  59. }
Advertisement
Add Comment
Please, Sign In to add comment