Quote:
Originally Posted by feren02
Hello everyone thanks for all the inputs. It really helped me figure out how to do it and make it work on server side! KUDOS for my learnings via your expertise.
ONE LAST request if granted: When a player for example is in CT, and selected a skin for CT, the moment the player switches to Terrorist Team, the model still appears as is. This goes likewise when a player is on Terrorist Team selecting skin or model then switches to CT Team.
How can I make the skin go off or default when switching teams so they cannot look and appear like the model or skin available from the other teams?
***THE PROBLEM***: For example for CT Team there are three options only to switch models:
1. Assassin
2. Sonic
3. Iron Man
-- A player selects Sonic, when a player switches to Terrorist Team, Sonic still appears, creating confusion to all players because they know Sonic model is only for CT.
Looking forward for all your thoughts.
Regards, keep safe and healthy!
|
There's many ways to do that like:
1. Ham Spawn and use the default skin when user get spawn
2. Reset user skin by this api code "cs_reset_user_model(id)" from ham spawn or event "resetHud" or try something like this:
Code:
new Precache_tList[][] =
{
"models/player/Death/Death.mdl", "models/player/Dobby/Dobby.mdl",
"models/player/Skeleton/Skeleton.mdl", "models/player/Joker/Joker.mdl"
};
new Precache_CtList[][] =
{
"models/player/Asasin/Asasin.mdl", "models/player/Sonic/Sonic.mdl",
"models/player/Iron/Iron.mdl"
};
public plugin_precache()
{
for(new i = 0; i <= charsmax(Precache_tList); i++)
{
if (cs_get_user_team(i) == CS_TEAM_T) {
precache_model(Precache_tList[i]);
}
else if (cs_get_user_team(i) == CS_TEAM_CT) {
precache_model(Precache_CtList[i]);
}
else {
cs_reset_user_model(i)
}
}
}