|
register_plugin(PLUGIN, VERSION, AUTHOR)
register_menucmd(register_menuid("自动绑定菜单"), autobindMenuKeys, "autobindmenu")
help_dir = register_cvar("auto_helpdir","/addons/amxmodx/configs/keyhelp.txt")
bind_ver = register_cvar("auto_ver","v1.1")
//这个参数要在你改变键值绑定时 改变,否则 不会改变上次已经绑定好的客户端的键值
load_settings("addons/amxmodx/configs/keys.ini")
register_event("TeamInfo", "task_premenu", "b")
}
public task_premenu(id)
set_task(10.0,"task_autobindmenu",id)
public task_autobindmenu(id) {
new crate[33],ver[33]
get_user_info(id,"autobind",crate,32)
get_cvar_string("auto_ver",ver,31)
if(!equali(crate, ver)){
show_menu(id, autobindMenuKeys, "\r自动绑定菜单^n\w^n1. 自动绑定我!^n2. 帮助 (关于键值) ^n3. 不要自动绑定^n", -1, "");
return PLUGIN_HANDLED;
}
return PLUGIN_HANDLED;
|
|