Advertisement
Guest User

Untitled

a guest
Apr 4th, 2012
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. // created by P3ti
  2.  
  3. #include <a_samp>
  4.  
  5. #define SPAM_PLAYER 1 // 0 - kick , 1 - ban
  6.  
  7. public OnFilterScriptInit()
  8. {
  9. print("Anti server spam loaded");
  10. return 1;
  11. }
  12.  
  13. public OnPlayerConnect (playerid)
  14. {
  15. new ip[20], ip2[20];
  16. GetPlayerIp(playerid, ip, 20);
  17. for(new i = 0; i < MAX_PLAYERS; i++)
  18. {
  19. if(IsPlayerConnected(i) && !IsPlayerNPC(i) && playerid != i)
  20. {
  21. GetPlayerIp(i, ip2, 20);
  22. if(!strcmp(ip,ip2,true))
  23. {
  24. #if SPAM_PLAYER == 1
  25. Ban(playerid);
  26. #else
  27. Kick(playerid);
  28. #endif
  29. break;
  30. }
  31. }
  32. }
  33. return 1;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement