Hello..i dont know scripting..but i have one friend who made this script:
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
public plugin_init() {
register_plugin("Vip Model", "1.0", "Schultz")
register_event("ResetHUD", "resetModel", "b")
return PLUGIN_CONTINUE
}
public plugin_precache() {
precache_model("models/player/vip_ct/vip_ct.mdl")
precache_model("models/player/vip_te/vip_te.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_te")
}
else if(userTeam == CS_TEAM_CT) {
cs_set_user_model(id, "vip_ct")
}
else {
cs_reset_user_model(id)
}
}
return PLUGIN_CONTINUE
}
The script it`s working..but has a small error occasionally:
PHP Code:
[AMXX] Run time error 10 (plugin "vip_model.amxx") (native "cs_get_user_team") - debug not enabled!
Any clue what`s that about ? It helps if i put the plugin in debug mod ?