•  
     

Plugin amx_adminmodel atualizado e sem o erro BAD

Código: Selecionar todos

#include <amxmodx>
#include <cstrike>
 
enum
{
        TEAM_UNASSIGNED,
        TEAM_T,
        TEAM_CT,
        TEAM_SPECTATOR
};
 
public plugin_precache()
{
    precache_model("models/player/acemprol_cttop15/acemprol_cttop15.mdl")
    precache_model("models/player/acemprol_ttop15/acemprol_ttop15.mdl")
}
 
public plugin_init()
{
        register_plugin("Admin Models", "1.0", "hleV");
        register_event("ResetHUD", "ResetHUD", "be");
}
 
public ResetHUD(Client)
{
        if (!is_user_alive(Client))
                return;
 
        new CsTeams:Team = cs_get_user_team(Client);
 
        switch (Team)
        {
                case TEAM_T:
                {
                        if (get_user_flags(Client) & ADMIN_KICK) cs_set_user_model(Client, "acemprol_ttop15");
                        else cs_reset_user_model(Client);
                }
                case TEAM_CT:
                {
                        if (get_user_flags(Client) & ADMIN_KICK) cs_set_user_model(Client, "acemprol_cttop15");
                        else cs_reset_user_model(Client);
                }
        }
        
}


amx_adminmodel.sma
(1.13 KiB) Transferido 64 vezes