take my old version of halo skins for example...
Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
public plugin_init() {
register_plugin("Halo Skins", "0.2", "Front Line")
register_event("ResetHUD", "resetModel", "b")
return PLUGIN_CONTINUE
}
public plugin_precache() {
precache_model "models/player/halo_t/halo_t.mdl"
precache_model "models/player/halo_ct/halo_ct.mdl"
return PLUGIN_CONTINUE
}
public resetModel(id) {
if (cs_get_user_team(id) == 1) {
cs_set_user_model(id, "halo_t")
}
else if(cs_get_user_team(id) == 2) {
cs_set_user_model(id, "halo_ct")
}
return PLUGIN_CONTINUE
}
Althought i was told that doesn't work anymore...
So try this way...
Code:
#include <amxmodx>
#include <cstrike>
public plugin_init() {
register_plugin("Halo Skins", "0.5", "Front Line")
register_event("ResetHUD", "resetModel", "b")
return PLUGIN_CONTINUE
}
public plugin_precache() {
precache_model("models/player/halo_t/halo_t.mdl")
precache_model("models/player/halo_ct/halo_ct.mdl")
return PLUGIN_CONTINUE
}
public resetModel(id)
{
new CsTeams:userTeam = cs_get_user_team(id)
if (userTeam == CS_TEAM_T) {
cs_set_user_model(id,"halo_t")
}
else if(userTeam == CS_TEAM_CT) {
cs_set_user_model(id,"halo_ct")
}
else {
cs_reset_user_model(id)
}
return PLUGIN_CONTINUE
}
FL.
__________________