Hi
I install this plugin on server for change skin vip & admin but this plugin have bug!
if select the first player from tr or ct show skin and select other player not show skin.
when change team show skin Previous team. example if you are tr and change team to ct show skin tr

plz fix bug this cod!
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#define PLUGIN_NAME "V.I.P Model Changer"
#define PLUGIN_VERSION "1.0.0"
#define PLUGIN_AUTHOR "monister"
public plugin_init() {
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)
register_event("ResetHUD", "resetModel", "b")
return PLUGIN_CONTINUE
}
public plugin_precache() {
precache_model("models/player/VIP/vip_tr.mdl")
precache_model("models/player/VIP/vip_ct.mdl")
return PLUGIN_CONTINUE
}
public resetModel(id, level, cid) {
if (get_user_flags(id) & ADMIN_LEVEL_H) {
new CsTeams:userTeam = cs_get_user_team(id)
if (userTeam == CS_TEAM_T) {
cs_set_user_model(id, "vip_tr")
}
else if (userTeam == CS_TEAM_CT) {
cs_set_user_model(id, "vip_ct")
}
}
return PLUGIN_CONTINUE
}