Raised This Month: $ Target: $400
 0% 

Call Knife showoff / idle animation


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
fcastro16
Member
Join Date: Mar 2009
Old 05-09-2016 , 12:17   Call Knife showoff / idle animation
Reply With Quote #1

EDIT: I figured it out, the showoff animation is included in the idle animation.

Hello, I'm trying to call the knife idle animation when pressing the USE button, similarly to what CS:GO does when you press the F button.
The problem is it doesn't work while other sequences work just fine. From my understanding the show off animation is sequence 0;
I used the cvar so I can change between sequences while in game for testing purposes.

PHP Code:
public fwd_CmdStart(iduc_handle)
{
    if(!
is_user_alive(id))
        return 
FMRES_IGNORED
    
    
if((pev(id,pev_button) & IN_USE))
    {
        new 
iCvar get_pcvar_numg_pCvar2 );
        
        if( 
get_user_weapon(id)== CSW_KNIFE )
            
UTIL_PlayWeaponAnimation(idiCvar)
    }
    return 
FMRES_HANDLED
}


stock UTIL_PlayWeaponAnimation(const Player, const Sequence)
{
    
message_begin(MSG_ONE_UNRELIABLESVC_WEAPONANIM, {000}, Player);
    
write_byte(Sequence);
    
write_byte(pev(Playerpev_body))
    
message_end();


sequences
PHP Code:
enum generic_e 
{
    
GENERIC_IDLE1 0,
    
GENERIC_IDLE2,
    
GENERIC_IDLE3,
    
GENERIC_SHOOT,
    
GENERIC_SHOOT2,
    
GENERIC_RELOAD,
    
GENERIC_RELOAD2,
    
GENERIC_DRAW,
    
GENERIC_HOLSTER,
    
GENERIC_SPECIAL
}; 

Last edited by fcastro16; 05-09-2016 at 12:59.
fcastro16 is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:44.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode