|
发表于 2008-8-21 08:30:06
|
显示全部楼层
来自 中国–广西–百色–田东县
回复: 帮看看这个插件有没有错
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
public plugin_init() {
register_plugin("AMX Admin Model", "1.1.1", "whitemike | C.H.M")
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")
return PLUGIN_CONTINUE
}
public resetModel(id, level, cid) {
if (get_user_flags(id) & ADMIN_KICK) {
new CsTeams:userTeam = cs_get_user_team(id)
if (userTeam == CS_TEAM_T) {
cs_set_user_model(id, "admin_te")
}
else if(userTeam == CS_TEAM_CT) {
cs_set_user_model(id, "admin_ct")
}
else {
cs_reset_user_model(id)
}
}
return PLUGIN_CONTINUE
} |
|