Hello, I was breaking my head to fix a little problem. I believed the problem was in the models, until I realized that the problem only occurs when I have both weapons.
Basically, when I have just the knife, the body of it changes without problems, now if I buy a p228, only the body of the pistol changes and the knife remains the default. I believe there's been some sort of conflict between weapons. Does anyone have any ideas?
EDIT2: I have found that the problem is relating to the FM_UpdateClientData and not a conflict between weapons.
Code:
public CBaseWeapon_SendWeaponAnim(const this, iAnim, iSkipLocal)
{
new pevOwner = get_member(this, m_pPlayer);
if (!avp_is_user_yautja(pevOwner))
return HAM_IGNORED;
if (!CheckPlayerBit(g_fCloak, pevOwner))
set_entvar(this, var_body, 0);
new szWeapon[32];
get_entvar(this, var_classname, szWeapon, charsmax(szWeapon));
if (get_entvar(this, var_body) != 1)
return HAM_IGNORED;
client_print(pevOwner, print_chat, " -> CBaseWeapon_SendWeaponAnim(%s, %d)", szWeapon, get_entvar(this, var_body))
UTIL_SendWeaponAnim(this, iAnim);
return HAM_SUPERCEDE;
}
Code:
UTIL_SendWeaponAnim(const this, iAnim)
{
new pevOwner = get_member(this, m_pPlayer);
set_entvar(pevOwner, var_weaponanim, iAnim);
message_begin(MSG_ONE, SVC_WEAPONANIM, .player = pevOwner)
{
write_byte(iAnim);
write_byte(get_entvar(this, var_body));
}
message_end();
}