Advertisement
Guest User

Untitled

a guest
Jun 7th, 2011
1,253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.38 KB | None | 0 0
  1. #include <a_samp>
  2. #define FILTERSCRIPT
  3. public OnFilterScriptInit()
  4. {
  5.     print("\n--------------------------------------");
  6.     print(" Anti-Palavroes carregado com sucesso!");
  7.     print("           By: SuB_ZeRo0_");
  8.     print("--------------------------------------\n");
  9.     return 1;
  10. }
  11. public OnFilterScriptExit()
  12. {
  13.     print("\n--------------------------------------");
  14.     print(" Anti-Palavroes retirado com sucesso!");
  15.     print("           By: SuB_ZeRo0_");
  16.     print("--------------------------------------\n");
  17.     return 1;
  18. }
  19.  
  20. //==================[ INÍCIO DO CÓDIGO ]================== BY: SuB_ZeRo0_
  21.  
  22. #define MAX_PALAVRAS_SZ 1       //Palavras existentes em PPalavras
  23. // By: SuB_ZeRo0_
  24. new PPalavras[MAX_PALAVRAS_SZ][50] = {
  25. "/q"
  26. };
  27. // By: SuB_ZeRo0_
  28. public OnPlayerText(playerid, text[])
  29. {
  30.     new findsub,subzeropos,subzero[50],sz[128];
  31.     format(sz,128,"%s",text);
  32.     while(subzeropos<=strlen(sz))
  33.     {
  34.         for(new d=0;d<MAX_PALAVRAS_SZ;d++)
  35.         {
  36.             findsub=strfind(sz,PPalavras[d],true,subzeropos);
  37.             if(findsub!=-1&&findsub==subzeropos)
  38.             {
  39.                 strdel(sz,findsub,findsub+strlen(PPalavras[d]));
  40.                 for(new h=0;h<strlen(PPalavras[d]);h++)
  41.                 {
  42.                     strcat(subzero,"*");
  43.                 }
  44.                 strins(sz,subzero,findsub,256);
  45.                 strdel(subzero,0,strlen(subzero));
  46.             }
  47.         }
  48.         subzeropos++;
  49.     }
  50.     SendPlayerMessageToAll(playerid,sz);
  51.     return 0;
  52. }
  53. // By: SuB_ZeRo0_
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement