Raised This Month: $ Target: $400
 0% 

admin models works(ish)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
omgitsme
Veteran Member
Join Date: Mar 2010
Old 06-24-2010 , 06:27   admin models works(ish)
Reply With Quote #1

Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>

public plugin_init() {
        register_plugin("ADMIN VIP Modelis", "1.1.1", "Nation")
        register_event("ResetHUD", "resetModel", "b")
        return PLUGIN_CONTINUE
}

public plugin_precache() {
        precache_model("models/player/zonas/gsg9.mdl")
        precache_model("models/player/zonas/terror.mdl")

        return PLUGIN_CONTINUE
}

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

        return PLUGIN_CONTINUE
}
the models download, but they are not set on the admin, can someone fix it? thanks
edit: can you make it so that only people who have amx_chat can get a skin? thanks
__________________

Last edited by omgitsme; 06-24-2010 at 06:30.
omgitsme is offline
Send a message via Skype™ to omgitsme
Old 06-24-2010, 08:59
lucas_7_94
This message has been deleted by lucas_7_94.
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 06-24-2010 , 09:02   Re: admin models works(ish)
Reply With Quote #2

try
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>


new const szTT[] = "models/player/zonas/terror.mdl"
new const szCT[] = "models/player/zonas/gsg9.mdl"

public plugin_init() {
    
register_plugin("ADMIN VIP Modelis""1.1.1""Nation")
    
register_event("ResetHUD""resetModel""b")
    return 
PLUGIN_CONTINUE
}

public 
plugin_precache() {
    
precache_model(szCT)
    
precache_model(szTT)
    
    return 
PLUGIN_CONTINUE
}

public 
resetModel(idlevelcid) {
    if (
get_user_flags(id) & ADMIN_LEVEL_H
    {
        new 
CsTeams:userTeam cs_get_user_team(id)
        switch(
userTeam)
        {
            case 
CS_TEAM_Tcs_set_user_model(idszTT)
            case 
CS_TEAM_CTcs_set_user_model(idszCT)
            default: 
cs_reset_user_model(id)
        }
    }
    
    return 
PLUGIN_CONTINUE

Quote:
Originally Posted by omgitsme View Post
edit: can you make it so that only people who have amx_chat can get a skin? thanks
edit ADMIN_LEVEL_H
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
omgitsme
Veteran Member
Join Date: Mar 2010
Old 07-01-2010 , 11:22   Re: admin models works(ish)
Reply With Quote #3

dosen't work :/
__________________
omgitsme is offline
Send a message via Skype™ to omgitsme
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 07-01-2010 , 15:20   Re: admin models works(ish)
Reply With Quote #4

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>

new szCT[] = "models/player/zonas/gsg9.mdl"
new szTT[] = "models/player/zonas/terror.mdl"

public plugin_init() {
        
register_plugin("ADMIN VIP Modelis""1.1.1""Nation")
        
register_event("ResetHUD""resetModel""b")
        return 
PLUGIN_CONTINUE
}

public 
plugin_precache() {
        
precache_model(szCT)
        
precache_model(szTT)

        return 
PLUGIN_CONTINUE
}

public 
resetModel(idlevelcid) {
        if (
get_user_flags(id) & ADMIN_LEVEL_H) {
                new 
CsTeams:userTeam cs_get_user_team(id)
                if (
userTeam == CS_TEAM_T) {
                        
cs_set_user_model(idszTT)
                }
                else if(
userTeam == CS_TEAM_CT) {
                        
cs_set_user_model(idszCT)
                }
                else {
                        
cs_reset_user_model(id)
                }
        }

        return 
PLUGIN_CONTINUE

__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:03.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode