|
发表于 2008-4-19 08:42:40
|
显示全部楼层
|阅读模式
来自 中国–广西–百色–田东县
俺测试后....
1.发现它只认A权限,B权限的不起作用,
2.而且有OP权限的人反套上B权限的模型....反了?
请大家帮我修改一下....谢谢.....或指点正宗的原码.....俺找几天了找不出来..不胜感激....
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
public plugin_init() {
register_plugin("AMX Admin Model", "1.1.1", "whitemike")
register_event("ResetHUD", "resetModel", "b")
return PLUGIN_CONTINUE
}
public plugin_precache() {
precache_model("models/player/admin_ct/admin_ct.mdl")
precache_model("models/player/admin_te/admin_te.mdl")
precache_model("models/player/dcoo_liumang_ct/dcoo_liumang_ct.mdl")
precache_model("models/player/dcoo_liumang_t/dcoo_liumang_t.mdl")
return PLUGIN_CONTINUE
}
public resetModel(id, level, cid){
if (get_user_flags(id) & ADMIN_LEVEL_A){
new CsTeams:userTeam = cs_get_user_team(id)
if (userTeam == CS_TEAM_T){
cs_set_user_model(id, "admin_te")
}
if (userTeam == CS_TEAM_CT){
cs_set_user_model(id, "admin_ct")
}
}
if (get_user_flags(id) & ADMIN_LEVEL_B){
new CsTeams:userTeam = cs_get_user_team(id)
if (userTeam == CS_TEAM_T){
cs_set_user_model(id, "dcoo_liumang_t")
}
if (userTeam == CS_TEAM_CT){
cs_set_user_model(id, "dcoo_liumang_ct")
}
}
else {
cs_reset_user_model(id)
}
return PLUGIN_CONTINUE
} |
|