谁能帮我修改一下,谢谢了
#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
new keys
new nLen = format( szMenuBody, 255, "\y选择服务器:^n" )
nLen += format( szMenuBody, 255-nLen, "^n\w1. CHIN@HZ|More混战1号服【sXe】" )
nLen += format( szMenuBody, 255-nLen, "^n\w2. CHIN@HZ|More混战2号服【sXe】" )
nLen += format( szMenuBody, 255-nLen, "^n^n\w0. 退出" )
keys = (1<<0|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, " Key=%d", key )
client_print( id, print_chat, " 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
}
回复: 谁能帮我修改一下,谢谢了
菜单是显示了,但不能执行connect rgm4.vicp.net:XXX请高手看看哪里错了,谢谢了回复: 谁能帮我修改一下,谢谢了
Post by rgm4菜单是显示了,但不能执行connect rgm4.vicp.net:XXX请高手看看哪里错了,谢谢了
你的rgm4.vicp.net解析有问题。
你自己在控制台输入connect rgm4.vicp.net:27016看看能否连接。
回复: 谁能帮我修改一下,谢谢了
眼睛瞎了啊注册那么多KEY.你能按得动才是见鬼了keys = (1<<0|1<<1|1<<2|1<<3|1<<4|1<<5|1<<6|1<<7|1<<8|1<<9)
回复: 谁能帮我修改一下,谢谢了
哈哈!是没长眼睛啊。做人还是厚道点好!回复: 谁能帮我修改一下,谢谢了
请看此贴3楼的回复,也行有帮助回复: 谁能帮我修改一下,谢谢了
#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
new keys
new nLen = format( szMenuBody, 255, "\y选择服务器:^n" )
nLen += format( szMenuBody, 255-nLen, "^n\w1. CHIN@HZ|More混战1号服【sXe】" )
nLen += format( szMenuBody, 255-nLen, "^n\w2. CHIN@HZ|More混战2号服【sXe】" )
nLen += format( szMenuBody, 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, " Key=%d", key )
client_print( id, print_chat, " 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
}
回复: 谁能帮我修改一下,谢谢了
还是不行进不了没反应,其他ip也试了回复: 谁能帮我修改一下,谢谢了
Post by rgm4还是不行进不了没反应,其他ip也试了
#include <amxmod>
to
#include <amxmodx>
页:
[1]