用ADM服裝插件就可以了呀
資料夾的設定要和插件的一樣
不然會讀不到
複製程式
#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") //ADM為CT
precache_model("models/player/admin_te/admin_te.mdl") //ADM為Ts
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
}