hlmod.hu
https://hlmod.hu/

Admin Help [Színezése]
https://hlmod.hu/viewtopic.php?f=29&t=19188
Oldal: 1 / 1

Szerző:  Be$t.# [ 2015.01.29. 16:48 ]
Hozzászólás témája:  Admin Help [Színezése]

Halli!
Adminhelpet megszinezné valaki? Igy legyen: !tÍrj !n'!gamx_help!n' !t-t a konzolba hogy láthasd a parancsokat
Megköszöném..

Szerző:  excitedboy [ 2015.02.04. 13:10 ]
Hozzászólás témája:  Re: Admin Help [Színezése]

Szia!

cstrike/addons/amxmodx/data/lang/adminhelp.txt -be színezd kedved szerint.

Színek: !g = Zöld , !t = Csapat színek !n = Sárga (Alapértelmezett)

Tessék:
Ezt alakítsd át .amxx kiterjesztésre, és írd felül a meglévőt.
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <colorchat>
  3.  
  4. #define DISPLAY_MSG // Comment to disable message on join
  5. #define HELPAMOUNT 10 // Number of commands per page
  6.  
  7. public plugin_init()
  8. {
  9. register_plugin("Admin Help", AMXX_VERSION_STR, "AMXX Dev Team")
  10. register_dictionary_colored("adminhelp.txt")
  11. register_concmd("amx_help", "cmdHelp", 0, "<page> [nr of cmds (only for server)] - displays this help")
  12. }
  13.  
  14. #if defined DISPLAY_MSG
  15. public client_putinserver(id)
  16. {
  17. if (is_user_bot(id))
  18. return
  19.  
  20. set_task(15.0, "dispInfo", id)
  21. }
  22.  
  23. public client_disconnect(id)
  24. {
  25. remove_task(id)
  26. }
  27. #endif
  28.  
  29. public cmdHelp(id, level, cid)
  30. {
  31. new arg1[8], flags = get_user_flags(id)
  32. new start = read_argv(1, arg1, 7) ? str_to_num(arg1) : 1
  33. new lHelpAmount = HELPAMOUNT
  34.  
  35. // HACK: ADMIN_ADMIN is never set as a user's actual flags, so those types of commands never show
  36. if (flags > 0 && !(flags & ADMIN_USER))
  37. {
  38. flags |= ADMIN_ADMIN;
  39. }
  40.  
  41. if (id == 0 && read_argc() == 3)
  42. lHelpAmount = read_argv(2, arg1, 7) ? str_to_num(arg1) : HELPAMOUNT
  43.  
  44. if (--start < 0)
  45. start = 0
  46.  
  47. new clcmdsnum = get_concmdsnum(flags, id)
  48.  
  49. if (start >= clcmdsnum)
  50. start = clcmdsnum - 1
  51.  
  52. console_print(id, "^n----- %L -----", id, "HELP_COMS")
  53.  
  54. new info[128], cmd[32], eflags
  55. new end = start + lHelpAmount // HELPAMOUNT
  56.  
  57. if (end > clcmdsnum)
  58. end = clcmdsnum
  59.  
  60. for (new i = start; i < end; i++)
  61. {
  62. get_concmd(i, cmd, 31, eflags, info, 127, flags, id)
  63. console_print(id, "%3d: %s %s", i + 1, cmd, info)
  64. }
  65.  
  66. console_print(id, "----- %L -----", id, "HELP_ENTRIES", start + 1, end, clcmdsnum)
  67.  
  68. if (end < clcmdsnum)
  69. console_print(id, "----- %L -----", id, "HELP_USE_MORE", end + 1)
  70. else
  71. console_print(id, "----- %L -----", id, "HELP_USE_BEGIN")
  72.  
  73. return PLUGIN_HANDLED
  74. }
  75.  
  76. #if defined DISPLAY_MSG
  77. public dispInfo(id)
  78. {
  79. client_print_color(id, print_chat, "%L", id, "TYPE_HELP")
  80.  
  81. new nextmap[32]
  82. get_cvar_string("amx_nextmap", nextmap, 31)
  83.  
  84. if (get_cvar_float("mp_timelimit"))
  85. {
  86. new timeleft = get_timeleft()
  87.  
  88. if (timeleft > 0)
  89. {
  90. client_print_color(id, print_chat, "%L", id, "TIME_INFO_1", timeleft / 60, timeleft % 60, nextmap)
  91. } else {
  92. client_print_color(id, print_chat, "%L", id, "TIME_INFO_2", nextmap)
  93.  
  94. }
  95. }
  96. }
  97. #endif
  98.  


Csatolmány:
colorchat.inc [4.87 KiB]
Letöltve 28 alkalommal.

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