hlmod.hu
https://hlmod.hu/

Hírdető tíltó
https://hlmod.hu/viewtopic.php?f=9&t=19966
Oldal: 1 / 1

Szerző:  Be$t.# [ 2015.03.21. 20:08 ]
Hozzászólás témája:  Hírdető tíltó

csá!
Valaki adna egy olyan hirdetés tíltót hogy max a szövegben és a nevedben csak 3 számot írhatsz? :)

Szerző:  danone [ 2015.03.21. 20:27 ]
Hozzászólás témája:  Re: Hírdető tíltó

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3.  
  4. #define PLUGIN "Hirdetes ellen"
  5. #define VERSION "1.0"
  6. #define AUTHOR "IrOn"
  7.  
  8. new message[192]
  9. new pont;
  10. new kettospont;
  11. new szam;
  12.  
  13. public plugin_init() {
  14. register_plugin(PLUGIN, VERSION, AUTHOR)
  15.  
  16. register_clcmd("say", "sayhook")
  17. register_clcmd("say_team", "sayhook")
  18. }
  19.  
  20. public sayhook(id)
  21. {
  22. read_args (message, 191)
  23. remove_quotes (message)
  24. new hossz = strlen(message);
  25.  
  26. new i=0;
  27. pont=0;
  28. kettospont=0;
  29. szam=0;
  30.  
  31. while(i < hossz)
  32. {
  33. if(message[i] == '.')
  34. pont++;
  35. if(message[i] == ':')
  36. kettospont++;
  37. if(message[i] == '1' || message[i] == '2' || message[i] == '3' || message[i] == '4' || message[i] == '5' || message[i] == '6' || message[i] == '7' || message[i] == '8' || message[i] == '9' || message[i] == '0')
  38. szam++;
  39. ++i;
  40. }
  41.  
  42. if(pont >= 3 && kettospont >= 1 && szam >= 3)
  43. {
  44. client_print(id, print_chat, "Ne hirdess!")
  45. return PLUGIN_HANDLED;
  46. }
  47. return PLUGIN_CONTINUE;
  48. }

Oldal: 1 / 1 Minden időpont UTC+02:00 időzóna szerinti
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/