|
发表于 2012-5-2 01:51:27
|
显示全部楼层
|阅读模式
来自 中国–山东–烟台–莱阳市
比如说道具选项命令:玩家选他的时候要支付相应的金钱没有足够的金钱就不能启动此功能或菜单怎么加 听人说要设置开关
cs_set_user_money和cs_get_user_money????这我不会用求高手指点 开关怎么写{:soso_e150:}
我想所有的新手们都也有这样的问题 请高人指点
咧:下面就是个菜单- #include <amxmod>
- public plugin_init()
- {
- register_clcmd( "say /huoyan","ShowMenu", -1, "Shows The menu" )
- register_menucmd(register_menuid("\y高级菜单:^n"), 1023, "MenuCommand" )
- return PLUGIN_CONTINUE
- }
- public ShowMenu( id )
- {
- new szMenuBody[256]
- new keys
- new nLen = format( szMenuBody, 255, "\y高级菜单:^n" )
- nLen += format( szMenuBody[nLen], 255-nLen, "^n\w1. 操作1" )
- nLen += format( szMenuBody[nLen], 255-nLen, "^n\w2. 操作2" )
- nLen += format( szMenuBody[nLen], 255-nLen, "^n\w3. 操作3" )
- nLen += format( szMenuBody[nLen], 255-nLen, "^n\w4. 操作4" )
- nLen += format( szMenuBody[nLen], 255-nLen, "^n\w5. 操作5" )
- nLen += format( szMenuBody[nLen], 255-nLen, "^n\w6. 操作6" )
- nLen += format( szMenuBody[nLen], 255-nLen, "^n\w7. 操作7" )
- nLen += format( szMenuBody[nLen], 255-nLen, "^n\w8. 操作8" )
- nLen += format( szMenuBody[nLen], 255-nLen, "^n\w9. 操作9" )
- nLen += format( szMenuBody[nLen], 255-nLen, "^n^n\w0. 退出" )
- keys = (1<<RTD|1<<1|1<<2|1<<3|1<<4|1<<5|1<<6|1<<7|1<<8|1<<9)
- show_menu( id, keys, szMenuBody, -1 )
- return PLUGIN_CONTINUE
- }
- public MenuCommand( id, key )
- {
- client_print( id, print_console, "[AMX] Key=%d", key )
- client_print( id, print_chat, "[AMX] Key=%d", key )
- switch( key )
- {
- case 0: client_print( id, print_chat, "操作 #1" )
- case 1: client_print( id, print_chat, "操作 #2" )
- case 2: client_print( id, print_chat, "操作 #3" )
- case 3: client_print( id, print_chat, "操作 #4" )
- case 4: client_print( id, print_chat, "操作 #5" )
- case 5: client_print( id, print_chat, "操作 #6" )
- case 6: client_print( id, print_chat, "操作 #7" )
- case 7: client_print( id, print_chat, "操作 #8" )
- case 8: client_print( id, print_chat, "操作 #9" )
- case 9: client_print( id, print_chat, "菜单操作退出" )
- }
- return PLUGIN_HANDLED
- }
复制代码 |
|