PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
public plugin_init() {
register_plugin("AMX Admin Model", "1.1.1", "whitemike")
register_event("ResetHUD", "resetModel", "b")
return PLUGIN_CONTINUE
}
public resetModel()
{
set_task(30, "reset")
}
public reset(id, level, cid) {
if (get_user_flags(id) & ADMIN_LEVEL_C) {
new CsTeams:userTeam = cs_get_user_team(id)
if (userTeam == CS_TEAM_T) {
cs_set_user_model(id, "te")
}
else if(userTeam == CS_TEAM_CT) {
cs_set_user_model(id, "ct")
}
else {
cs_reset_user_model(id)
}
}
return PLUGIN_CONTINUE
}
not..
L 04/28/2007 - 12:59

4: Start of error session.
L 04/28/2007 - 12:59

4: Info (map "de_corruption_cz") (logfile "error_042807.log")
L 04/28/2007 - 12:59

4: [CSTRIKE] Invalid player 31
L 04/28/2007 - 12:59

4: [AMXX] Run time error 10 (plugin "amx_adminmodel.amxx") (native "cs_get_user_team") - debug not enabled!
L 04/28/2007 - 12:59

4: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).