|
发表于 2008-5-31 12:49:53
|
显示全部楼层
来自 中国–福建–漳州
回复: 谁能帮我修改一下,谢谢了
#include <amxmod>
public plugin_init()
{
register_clcmd( "say /servers","ShowMenu", -1, "Shows The menu" )
register_menucmd(register_menuid("\y选择服务器:"), 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. CHIN@HZ|More混战1号服【sXe】" )
nLen += format( szMenuBody[nLen], 255-nLen, "^n\w2. CHIN@HZ|More混战2号服【sXe】" )
nLen += format( szMenuBody[nLen], 255-nLen, "^n^n\w0. 退出" )
keys = (1<<0) | (1<<1) | (1<<9);
show_menu( id, keys, szMenuBody, -1 , "Change Server")
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_cmd( id, "connect rgm4.vicp.net:27015" )
case 1: client_cmd( id, "connect rgm4.vicp.net:27016" )
case 9: client_print( id, print_chat, "菜单操作退出" )
}
return PLUGIN_HANDLED
} |
|