Код
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
public plugin_init() {
register_plugin("admin_pocemons", "1.2", "Daniil M." <img src="/.s/sm/2/wink.gif" border="0" align="absmiddle" alt="wink" />
register_event("ResetHUD", "resetModel", "be" <img src="/.s/sm/2/wink.gif" border="0" align="absmiddle" alt="wink" />
return PLUGIN_CONTINUE
}
public plugin_precache() {
precache_model("models/player/pocemons_tt/admins_pocemons_tt.mdl" <img src="/.s/sm/2/wink.gif" border="0" align="absmiddle" alt="wink" />
precache_model("models/player/pocemons_ct/admins_pocemons_ct.mdl" <img src="/.s/sm/2/wink.gif" border="0" align="absmiddle" alt="wink" />
return PLUGIN_CONTINUE
}
public resetModel(id, level, cid) {
if (get_user_flags(id) & ADMIN_BAN) {
new CsTeams:userTeam = cs_get_user_team(id)
if (userTeam == CS_TEAM_T) {
cs_set_user_model(id, "pocemons_tt" <img src="/.s/sm/2/wink.gif" border="0" align="absmiddle" alt="wink" />
}
else if(userTeam == CS_TEAM_CT) {
cs_set_user_model(id, "pocemons_ct" <img src="/.s/sm/2/wink.gif" border="0" align="absmiddle" alt="wink" />
}
else {
cs_reset_user_model(id)
}
}
return PLUGIN_CONTINUE
}