Can some fix it a little bit. I heard that it is not effective way. Someone wrote that if 16 more players playing then this plugin works not good!
Also when VIP changes team after picking the class then standard model appears and it's ok after respawn.
PHP Code:
#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/n7/n7.mdl")
precache_model("models/player/n7/n7.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, "n7")
}
else if(userTeam == CS_TEAM_CT) {
cs_set_user_model(id, "n7")
}
else {
cs_reset_user_model(id)
}
}
return PLUGIN_CONTINUE
}