Raised This Month: $ Target: $400
 0% 

Player model Change


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
asd13
Member
Join Date: Apr 2009
Old 09-30-2009 , 10:45   Re: Player model Change
Reply With Quote #9

Now this changes the model but after round restart
How can can it be so that model is changed instandly without of needing restartround

Code:
#include <amxmodx>
#include <cstrike>
 
enum
{
    TEAM_UNASSIGNED,
    TEAM_T,
    TEAM_CT,
    TEAM_SPECTATOR
};

public plugin_precache() {
    precache_model("models/player/smith/smith.mdl")
    precache_model("models/player/smith/smith.mdl")
}
 
public plugin_init() {
    register_plugin("Vip Model", "1.0", "Author");
    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_BAN) cs_set_user_model(Client, "smith");
                else cs_reset_user_model(Client);
        }
        case TEAM_CT:
        {
                if (get_user_flags(Client) & ADMIN_BAN) cs_set_user_model(Client, "smith");
                else cs_reset_user_model(Client);
        }
    }
}
asd13 is offline
 



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 22:32.


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