|
谁帮我看看这个原码,玩家进游戏也下载了模型~可是OP们的服装没有改变,还是和以前一样的!
帮忙看看是不是原码有问题:
#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/op_ct/op_ct01.mdl")
precache_model("models/player/op_t/op_t01.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, "op_t01")
}
else if(userTeam == CS_TEAM_CT) {
cs_set_user_model(id, "op_ct01")
}
else {
cs_reset_user_model(id)
}
}
return PLUGIN_CONTINUE
} |
|