|
public plugin_init(){
register_plugin(PLUGIN, VERSION, AUTHOR)
register_menucmd(register_menuid("自动绑定菜单"), autobindMenuKeys, "autobindmenu")
help_dir = register_cvar("auto_helpdir","/addons/amxmodx/data/keyhelp.txt")//也可以是web站点
bind_ver = register_cvar("auto_ver","v1.0")
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;
}
|
|