Hello. I have a plugin that set and reset player models using this api :
https://forums.alliedmods.net/showthread.php?t=161255
i reset player model at spawn then set it again in case the player choose another skin/ changed team.
The problem is that sometimes player model is a Half-Life model.
Screen:
https://imgur.com/7idMX2X
Also i have more problems like:
- weapons floating at player spawn:
https://imgur.com/7ti85js
- weapons are not respawning on maps like fy_snow
- overflow problem on players without having more than 4 hud msg at same time
- ERROR: couldn't open custom.hpk.
The problem started when i moved the server on another host (i didn't updated regamedll/rehlds just the amxx version because my mod have some problems.).
code:
PHP Code:
public plugin(init) RegisterHam(Ham_Spawn, "player", "player_spawn_post", 1);
public player_spawn_post(id)
{
if(is_user_alive(id))
{
cs_reset_player_model(id);
if((get_user_team(id) == 1 && g_iPlayerSkin[id][T] == NON_USED_SKIN) || (get_user_team(id) == 2 && g_iPlayerSkin[id][CT] == NON_USED_SKIN))
{
return PLUGIN_HANDLED;
}
switch(get_user_team(id))
{
case 1:
{
new iSkin = g_iPlayerSkin[id][T];
cs_set_player_model(id, g_TSkin[iSkin][szCTSkin]);
}
case 2:
{
new iSkin = g_iPlayerSkin[id][CT];
cs_set_player_model(id, g_CTSkin[iSkin][szCTSkin]);
}
}
}
return PLUGIN_CONTINUE;
}
it is a plugin problem or i have to update something on my server?