Advertisement
Guest User

Fs Anti Nick

a guest
Apr 26th, 2012
504
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 2.89 KB | None | 0 0
  1. /*******************************
  2. *      Criador Caio_Freeze     *
  3. *       Versao 1.1 FINAL       *************************
  4. *        Data 26/05/2012      * NAO RETIRE OS CREDITOS  *
  5. *                              *************************
  6. ********************************/
  7. #include < a_samp >
  8.  
  9. new NomesProibidos[34][MAX_PLAYER_NAME] =
  10. {
  11. "com1",
  12. "com2",
  13. "com3",
  14. "com4",
  15. "com5",
  16. "com6",
  17. "com7",
  18. "com8",
  19. "com9",
  20. "lpt1",
  21. "lpt2",
  22. "lpt3",
  23. "lpt4",
  24. "lpt5",
  25. "lpt6",
  26. "lpt7",
  27. "lpt8",
  28. "lpt9",
  29. "Carl",
  30. "Rocky",
  31. "Sony",
  32. "clock$",
  33. "prn",
  34. "nul",
  35. "con",
  36. "Azucar",
  37. "CON",
  38. "con",
  39. "con1",
  40. "aux",
  41. "aux1",
  42. "prn",
  43. "PRN",
  44. "AUX"
  45. };
  46. public OnFilterScriptInit()
  47. {
  48.     print("\n-------- Anti Nick --------");
  49.     print("\n     Anti Nick Ligado      ");
  50.     print("\n-------- Anti Nick --------");
  51.     print("\n\n\n\n");
  52.     print("|- - - - FilterScript - - - -|");
  53.     print("|    Criado Por Caio_Freeze  |");
  54.     print("|- - - - FilterScript - - - -|");
  55.     return 1;
  56. }
  57. public OnFilterScriptExit()
  58. {
  59.     print("\n-------- Anti Nick --------");
  60.     print("\n    Anti Nick Desligado    ");
  61.     print("\n-------- Anti Nick --------");
  62.     print("\n\n\n\n");
  63.     print("|- - - - FilterScript - - - -|");
  64.     print("|    Criado Por Caio_Freeze  |");
  65.     print("|- - - - FilterScript - - - -|");
  66.     return 1;
  67. }
  68. public OnPlayerConnect(playerid)
  69. {
  70.     for(new i; i<sizeof(NomesProibidos); i++)
  71.     {
  72.         new String[150],Nick[MAX_PLAYER_NAME];
  73.         new ip[24];
  74.         GetPlayerIp(playerid, ip, 24);
  75.         GetPlayerName(playerid, Nick, sizeof(Nick));
  76.         if(!strcmp(Nick, NomesProibidos[i], true))
  77.         {
  78.             SendClientMessage(playerid, 0xFFFF00AA, "[INFO-NICK] Você Foi Banido/Kickado Do Servidor Por Usar Um Nick Proibido!");
  79.             format(String, sizeof(String), "[Anti Nick's] O Jogador %s Foi Kickado/Banido Por Tentar Entrar Com Nick Proibido IP do FDP: %s", Nick, ip);
  80.             SendClientMessageToAll(0xFF0000AA, String);
  81.             BanEx(playerid, "-=[Nick Proibido]=-");
  82.             Kick(playerid);
  83.             WriteLog("NicksProibidos", String);
  84.         }
  85.     }
  86.     return 1;
  87. }
  88. stock WriteLog(filename[],text[])
  89. {
  90.     printf("%s => %s", filename, text);
  91.     new File:file;
  92.     new filepath[256], string[150], year,day,month, hour,minute,second;
  93.     getdate(year,day,month); gettime(hour,minute,second);
  94.     format(filepath,sizeof(filepath),"/Anti-Nicks/%s.log",filename);
  95.     file = fopen(filepath,io_append);
  96.     format(string,sizeof(string),"[%02d/%02d/%d|%02d:%02d:%02d] %s\r\n",day,month,year,hour,minute,second,text);
  97.     fwrite(file,string);
  98.     fclose(file);
  99.     return 1;
  100. }
  101. /*******************************
  102. *      Criador Caio_Freeze     *
  103. *       Versao 1.1 FINAL       *************************
  104. *        Data 26/05/2012      * NAO RETIRE OS CREDITOS  *
  105. *                              *************************
  106. ********************************/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement