Raised This Month: $ Target: $400
 0% 

How to catch animation


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 09-02-2013 , 13:13   Re: How to catch animation
Reply With Quote #5

May be easier to just edit the model?
Here's a solution:
Quote:
Originally Posted by bibu View Post
Try something like the following code. I still don't get why you want to replace anim. If you're already using a custom model, then it should show the anim already correctly. Correct me if it's wrong.

PHP Code:
#include <amxmodx>
#include <hamsandwich>

#define ANIM_TO_REPLACE 1
#define REPLACE_ANIM_WITH 1337

public plugin_init()
{
    
RegisterHam(Ham_CS_Weapon_SendWeaponAnim"weapon_entity""WeaponSendWeaponAnim")
}

public 
WeaponSendWeaponAnim(idiAnim/*, skiplocal*/)
{
    
// Check the animation to replace.
    
if(iAnim == ANIM_TO_REPLACE)
    {
        
// Replace animation with the value you want.
        
SetHamParamInteger(2REPLACE_ANIM_WITH)
    }

Requires Hamsandwich Updated.

Quote:
Originally Posted by ConnorMcLeod View Post
Method seems ok, about SVC_WEAPONANIM, you can use Ham_CS_Weapon_SendWeaponAnim from hamsandwich updated.
You can also try to hook it to catch other animations.

I hope this ham version gonna be integrated in amxx, but atm there are no testers for some mods to confirm all is working.
Are there advantages? Otherwise I would definitely use what's included in the default AMXx package.
__________________

Last edited by Black Rose; 09-02-2013 at 13:50.
Black Rose 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 19:14.


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