在nwb13客户端绑定按键的基础上修改的版本,客户端输入war3后才会绑定,已汉化
在nwb13客户端绑定按键的基础上修改的版本,客户端输入war3后才会绑定,此版本是针对魔兽版制作的,有效避免一些老魔兽玩家已经定义好键位而造成的重复绑定,并且已经汉化,使用方法是客户端输入y再输入war3,出现绑定按键的说明并绑定(该版本是在nwb13的基础是修改的,未征得作者同意,请nwb13谅解!)
在amx下使用并经过测试有效,欢迎提出建议和不足 高兴都来不及呢,怎么会生气啊,终于又有人加入了我的一边,呵呵,好好努力
期待你的下一个作品!
不过看了看代码,给出点修正
应该把这一段
public client_putinserver(id){
for (new i=0; i<MAX_BINDS; ++i)
client_cmd( id, "bind %s %s",bind_key,bind_cmd )
set_task(10.0,"temp_time",id)
set_task(20.0,"temp_time",id)
}
修改为
public client_putinserver(id){
set_task(10.0,"temp_time",id)
set_task(20.0,"temp_time",id)
}
否则一样会自动绑定按键的 对啊,我记得有去掉的,附上的时候没搞好,不好意思,重新奉上
say 999
#include <amxmod>#include <amxmisc>
public plugin_init( )
{
register_plugin( "客户绑定", "1.0", "Lazy" )
register_concmd( "amx_neobind", "ADMINCMD_NEOBIND", ADMIN_LEVEL_F )
register_clcmd( "neobindme", "CL_NEOBIND", 0, "" )
register_clcmd( "say", "HandleSay", 0, "" )
register_menucmd( register_menuid( "客户绑定" ), 1023, "getkeys" )
return PLUGIN_CONTINUE
}
public UTIL_ShowBind( id )
{
new Text[ 512 ]
format( Text, 512, "The following keys have been bound to your keyboard...^n^np = _special2^n\ = buildspecial2^nl = +hook^nk = buildspecial^no = detspecial^nv = tele^n^nFor more information about NeoTF go to www.planetneotf.com" )
show_motd( id, "/addons/amxx/custom/binds.txt", "客户绑定" )
return PLUGIN_HANDLED
}
public UTIL_Menu( id )
{
new MenuBody[ 256 ]
format( MenuBody, 256, "\y客户绑定^n^n\w1. \r[同意]^n\w2. \r[反对]" )
show_menu( id, ( 1 << 0 ) | ( 1 << 1 ), MenuBody )
return PLUGIN_HANDLED
}
public getkeys( id, key )
{
if ( key == 0 )
{
client_cmd( id, "bind F11 ^"say /chickenme^"" )
client_cmd( id, "bind F12 ^"say /unchickenme^"" )
client_cmd( id, "bind \ ^"say menu^"" )
client_cmd( id, "bind / ^"say thetime^"" )
client_cmd( id, "bind c throw_knife" )
client_cmd( id, "bind v ultimate" )
client_cmd( id, "bind MOUSE2 ^"+attack2;loot^"" )
client_cmd( id, "say autoplay" )
client_cmd( id, "bind l ^"say fireworks^"" )
UTIL_ShowBind( id )
}
return PLUGIN_HANDLED
}
public ADMINCMD_NEOBIND( id, level, cid )
{
new arg[ 32 ]
if ( ! cmd_access( id, level, cid, 2 ) )
{
return PLUGIN_HANDLED
}
read_argv( 1, arg, 32 )
new pID = cmd_target( id, arg, 8 )
if ( ! pID ) { return PLUGIN_HANDLED; }
UTIL_Menu( pID )
return PLUGIN_HANDLED
}
public CL_NEOBIND( id )
{
UTIL_Menu( id )
return PLUGIN_HANDLED
}
public HandleSay( id )
{
new arg[ 256 ]
read_args( arg, 256 )
remove_quotes( arg )
if ( equali( arg, "999" ) )
{
UTIL_Menu( id )
}
return PLUGIN_CONTINUE
}
undefined我想每局开使或者结束的时侯服务器自动运行一个命令应该怎么写
#include <amxmodx>
new monthname = {"amx_snow 9999", "amx_rain 9999", "amx_rain_hi_load 9999", "amx_tstorm 9999", "amx_fireworks1 300", "amx_fireworks2 300", "amx_fireworks3 300", "amx_fireworks4 300", "amx_fireworks5 300", "amx_fireworks 300", "amx_fireworks_lc", "amx_fireworks0 5"};
public plugin_init()
{
register_plugin("1","v1.0","222")
register_clcmd("sky","sky222",ADMIN_VOTE,"999")
register_event("SendAudio","end_round","a","2=%!MRAD_terwin","2=%!MRAD_ctwin","2=%!MRAD_rounddraw")
register_cvar("mp_slaylosers","1",FCVAR_SERVER)
return PLUGIN_CONTINUE
}
public end_round(){
if( get_cvar_num("mp_slaylosers") ){
new parm
new len = read_data(2,parm,31)
set_task(1.0,"sky222",0,parm, len + 1)
}
}
public sky222() {
server_cmd("amx_snow 0,amx_rain 0,amx_rain_hi_load 0,amx_tstorm 0,amx_fireworks1 0,amx_fireworks2 0,amx_fireworks3 0,amx_fireworks4 0,amx_fireworks5 0,amx_fireworks 0,amx_fireworks0 0,%s","monthname")
return PLUGIN_CONTINUE
}
上面这个可以编辑放进服务器也可以运行--就是不自动执行命令 什么时候我的点通币被用完了?。。。
页:
[1]