Bine ati venit pe EnjoyGame!

Sign in to follow this  
w00dy

Cerere plugin admin model

Recommended Posts

★ Plugin cerut: Admin model
★ Alte detalii tehnice despre plugin:  modifica skinul la admini, am incercat cateva si n a mers, am eu skinul dorit, mersi.

Share this post


Link to post
Share on other sites
#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 plugin_precache() {
        precache_model("models/player/admin_ct/admin_ct.mdl")
        precache_model("models/player/admin_te/admin_te.mdl")

        return PLUGIN_CONTINUE
}

public resetModel(id, level, cid) {
        if (get_user_flags(id) & ADMIN_KICK) {
                new CsTeams:userTeam = cs_get_user_team(id)
                if (userTeam == CS_TEAM_T) {
                        cs_set_user_model(id, "admin_te")
                }
                else if(userTeam == CS_TEAM_CT) {
                        cs_set_user_model(id, "admin_ct")
                }
                else {
                        cs_reset_user_model(id)
                }
        }

        return PLUGIN_CONTINUE
}

lasi reply daca e ok sa stiu sa dau tc :)

Share this post


Link to post
Share on other sites
11 hours ago, *Sp33d*[dinamo]*ALA* said:

#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 plugin_precache() {
        precache_model("models/player/admin_ct/admin_ct.mdl")
        precache_model("models/player/admin_te/admin_te.mdl")

        return PLUGIN_CONTINUE
}

public resetModel(id, level, cid) {
        if (get_user_flags(id) & ADMIN_KICK) {
                new CsTeams:userTeam = cs_get_user_team(id)
                if (userTeam == CS_TEAM_T) {
                        cs_set_user_model(id, "admin_te")
                }
                else if(userTeam == CS_TEAM_CT) {
                        cs_set_user_model(id, "admin_ct")
                }
                else {
                        cs_reset_user_model(id)
                }
        }

        return PLUGIN_CONTINUE
}

lasi reply daca e ok sa stiu sa dau tc :)

Plugin ul vad ca ruleaza, dar nu se vede skinul, poate din cauza playerului default care ii in sursa, o sa incerc sa  vad care i problema, mersi.

Share this post


Link to post
Share on other sites
Quote

#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 plugin_precache() {
        precache_model("models/player/admin_ct/admin_ct.mdl")
        precache_model("models/player/admin_te/admin_te.mdl")

        return PLUGIN_CONTINUE
}

public resetModel(id, level, cid) {
        if (get_user_flags(id) & ADMIN_KICK) {
        
                new CsTeams:userTeam = cs_get_user_team(id)
                if (userTeam == CS_TEAM_T) {
                        cs_set_user_model(id, "admin_te")
                }
                else 
           if(userTeam == CS_TEAM_CT) {
                        cs_set_user_model(id, "admin_ct")
        }
    }
    return PLUGIN_HANDLED
}

public client_disconnect(id) {
    if(get_user_flags(id) & ADMIN_KICK) {
        cs_reset_user_model(id)
    }
}
        
public client_putinserver(id){
        if (get_user_flags(id) & ADMIN_KICK) {
        
                new CsTeams:userTeam = cs_get_user_team(id)
                if (userTeam == CS_TEAM_T) {
                        cs_set_user_model(id, "admin_te")
                }
                else 
           if(userTeam == CS_TEAM_CT) {
                        cs_set_user_model(id, "admin_ct")
        }
    }
    return PLUGIN_HANDLED
}

pentru a fi sigur ca i se aplica skinu :p

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this