|
- /* Plugin generated by AMXX-Studio */
- #include <amxmodx>
- #include <amxmisc>
- #define PLUGIN "ServerMenu"
- #define VERSION "1.3"
- #define AUTHOR "[email]Cr@zyTreE[/email]"
- public plugin_init()
- {
- register_plugin(PLUGIN, VERSION, AUTHOR)
- register_clcmd( "say /menu","ShowMenu", -1, "Shows The Server Menu" )
- register_menucmd(register_menuid("\y【\r惩罚与奖励菜单\y】"), 1023, "MenuCommand" )
-
- return PLUGIN_CONTINUE
- }
- public plugin_precache()
- {
- precache_sound("/player/plmenu.wav")
-
- return PLUGIN_CONTINUE
- }
- public ShowMenu( id )
- {
- new szMenuBody[256]
- new keys
-
- new nLen = format( szMenuBody, 255, "\y【\r惩罚与奖励菜单y】^n" )
-
- nLen += format( szMenuBody[nLen], 255-nLen, "^n\r1. \w玩家奖励与惩罚" )
- nLen += format( szMenuBody[nLen], 255-nLen, "^n\r2. \w队伍奖励" )
- nLen += format( szMenuBody[nLen], 255-nLen, "^n\r3. \w队伍惩罚" )
- nLen += format( szMenuBody[nLen], 255-nLen, "^n\r4. \w给与队伍武器" )
- nLen += format( szMenuBody[nLen], 255-nLen, "^n^n\r0. \w退出" )
-
- keys = (1<<0|1<<1|1<<2|1<<3|1<<9)
-
- show_menu( id, keys, szMenuBody, -1 )
- client_cmd(id,"spk /player/plmenu")
- return PLUGIN_CONTINUE
- }
- public MenuCommand( id, key )
- {
- //client_cmd(id,"spk /player/plmenu")
-
- switch( key )
- {
- case 0: {
- client_cmd(id, "amx_clcmdmenu" )
- }
- case 1: {
- client_cmd(id, "amx_tmpunishmenu" )
- }
- case 2: {
- client_cmd(id, "amx_tmbnsmenu" )
- }
- case 3: {
- client_cmd(id, "amx_tmwpmenu" )
- }
- case 9: {
- client_print( id, print_chat, "菜单操作退出" )
- }
- }
-
- return PLUGIN_HANDLED
- }
- /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
- *{\\ rtf1\\ ansi\\ ansicpg936\\ deff0{\\ fonttbl{\\ f0\\ fnil\\ fcharset134 Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang2052\\ f0\\ fs16 \n\\ par }
- */
复制代码
照某位大大修改的,因为我设置的一些命令在那些菜单里,所以想做个总菜单方便其它op用.
那四个命令在控制台输入有用,在这插件中点了没有反应,编译是成功的
谁能指导下不 |
|