View Single Post
andyt0621
New Member
Join Date: May 2013
Old 05-11-2013 , 09:45   Re: How can i change the shot animation
Reply With Quote #4

Quote:
Originally Posted by bibu View Post
Could you upload the model?
i think it is not related to the model animation order

Quote:
Originally Posted by Bos93 View Post
- ClientUpdatePost
- Check your animation and set new animation with CD_WeaponAnim
i see this: http://forums.alliedmods.net/showthread.php?t=88823 and try the following code
Code:
register_forward(FM_UpdateClientData , "UpdateClientData");

public UpdateClientData( id, iSendWeapons, cd_handle )
{
    new anim = get_cd( cd_handle , CD_WeaponAnim );
    if(3<= anim <= 5 ) // shot animation number
    {
        set_cd( cd_handle , CD_WeaponAnim , 3);
        return FMRES_OVERRIDE;
    }
    return FMRES_IGNORED;
}
it is not working because CD_WeaponAnim/pev_weaponanim cant return shot anim(3-5) but it can return idle,reload,draw
and then i tried this
Code:
register_forward(FM_UpdateClientData , "UpdateClientData");

public UpdateClientData( id, iSendWeapons, cd_handle )
{
    if(g_attack[id]) // return 1 when Ham_Weapon_PrimaryAttack and be 0 in Post
    {
        set_cd( cd_handle , CD_WeaponAnim , 3);
        return FMRES_OVERRIDE;
    }
    return FMRES_IGNORED;
}
it also not working
i think CD_WeaponAnim is a useless thing
andyt0621 is offline