Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
public plugin_init() {
register_plugin("ADMIN VIP Modelis", "1.1.1", "Nation")
register_event("ResetHUD", "resetModel", "b")
return PLUGIN_CONTINUE
}
public plugin_precache() {
precache_model("models/player/zonas/gsg9.mdl")
precache_model("models/player/zonas/terror.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, "terror")
}
else if(userTeam == CS_TEAM_CT) {
cs_set_user_model(id, "gsg9")
}
else {
cs_reset_user_model(id)
}
}
return PLUGIN_CONTINUE
}
the models download, but they are not set on the admin, can someone fix it? thanks
edit: can you make it so that only people who have amx_chat can get a skin? thanks
__________________