All pastes #376032 Raw Edit

Untitled

public text v1 · immutable
#376032 ·published 2007-02-28 20:13 UTC
rendered paste body
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fakemeta>

#define ctmodel "models/robo.mdl"

public plugin_init() 
{
        register_plugin("","","");
        register_event("ResetHUD", "resetModel", "b")
        return PLUGIN_CONTINUE
}

public plugin_precache() {
        precache_model(ctmodel)

}

public resetModel(id, level, cid) 
{
        if (is_user_admin(id)) 
	{
                new CsTeams:userTeam = cs_get_user_team(id)
                if (userTeam == CS_TEAM_T) {
                        engfunc(EngFunc_SetModel,id,ctmodel)
                }
		
                else if(userTeam == CS_TEAM_CT) {
                        engfunc(EngFunc_SetModel,id,ctmodel)
                }
                else 
	       {
                        cs_reset_user_model(id)
                }
        }

        return PLUGIN_CONTINUE;
}