hlmod.hu
https://hlmod.hu/

Hirdetes tilto MOTD
https://hlmod.hu/viewtopic.php?f=29&t=8192
Oldal: 1 / 1

Szerző:  laki5000 [ 2013.04.20. 20:13 ]
Hozzászólás témája:  Hirdetes tilto MOTD

Hello. Egz olzan plugin keresnek, hogy amikor valaki egy ip cimet kiir, akkor egy motd ablakot hoz fel, aminek az utja:
plugins/motd/nohirdetes.txt (a txt tartalmat megcsinalom)

Koszonom

Szerző:  tomy3231 [ 2013.04.21. 12:28 ]
Hozzászólás témája:  Re: Hirdetes tilto MOTD

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 >= 8)
  43. {
  44. show_motd( id, "addons/amxmodx/plugins/modt/nohirdetes.txt");
  45. }
  46. return PLUGIN_CONTINUE;
  47. }

Teszt nemvolt!

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