AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Custom models (https://forums.alliedmods.net/showthread.php?t=98374)

iNf1k 07-24-2009 20:50

Custom models
 
I have some problems with custom models...
I'm using this method to give custom model to a player:
Code:

register_event("ResetHUD", "spawn", "b");
...
public spawn(id)
{
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);
                }   
}

But, when I change team, I have previous model.
For ex, i'm playing CT, with model "admin_ct", changing team,
And still have model "admin_ct"
What is wrong?
Maybe you can correct my code?
Thanks!

padilha007 07-24-2009 21:38

Re: Custom models
 
http://forums.alliedmods.net/showthread.php?t=69386


All times are GMT -4. The time now is 18:20.

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