HLMOD.HU Forrás Megtekintés - www.hlmod.hu
  1. #include <amxmodx>
  2. #include <amxmisc>
  3.  
  4. #define PLUGIN "Disable startup MOTD"
  5. #define VERSION "1.0"
  6. #define AUTHOR "Sn!ff3r"
  7.  
  8. new cvar, bool:saw[33]
  9.  
  10. public plugin_init()
  11. {
  12. register_plugin(PLUGIN, VERSION, AUTHOR)
  13.  
  14. register_message(get_user_msgid("MOTD"), "message_MOTD")
  15.  
  16. cvar = register_cvar("amx_disable_motd", "1")
  17. }
  18.  
  19. public client_connect(id)
  20. {
  21. saw[id] = false
  22. }
  23.  
  24. public message_MOTD(const MsgId, const MsgDest, const MsgEntity)
  25. {
  26. if(!saw[MsgEntity] && get_pcvar_num(cvar))
  27. {
  28. if(get_msg_arg_int(1) == 1)
  29. {
  30. saw[MsgEntity] = true
  31. return PLUGIN_HANDLED
  32. }
  33. }
  34. return PLUGIN_CONTINUE
  35. }