View Single Post
Author Message
eat1k
Senior Member
Join Date: Apr 2018
Old 02-13-2019 , 13:46   Weapon Animation Speed
Reply With Quote #1

Is there any way to change weapon animation speed? Specifically reload animation.

I tried setting m_flFrameRate/var_framerate in Ham_Weapon_SendWeaponAnim but it didn't work. The speed hasn't changed.

PHP Code:
// Thanks to Vaqtincha
new const g_iReloadAnims[any:WEAPON_P90 1] = {
    -
15, -13, -16, -111, -1144231113741361113, -1411, -11
};

public 
hamfwd_SendWeaponAnim_Pre(pWeaponiAnimiSkipLocaliBody)
{
    if(!
IsCustomWeapon(pWeapon))
        return 
HAM_IGNORED;

    new 
WeaponIdType:iId get_member(pWeaponm_iId);
    if(
iAnim == g_iReloadAnims[iId])
        
set_entvar(iAnimvar_framerate3.0); // 3x faster

    
return HAM_IGNORED;

__________________
eat1k is offline