Raised This Month: $12 Target: $400
 3% 

[HELP] Writing a module hooking CBasePlayer::SetAnimation


Post New Thread Reply   
 
Thread Tools Display Modes
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 08-25-2018 , 06:02   Re: [HELP] Writing a module hooking CBasePlayer::SetAnimation
Reply With Quote #21

Quote:
Originally Posted by Arkshine View Post
Try that.

Unzip setanimation-files in /dlls (1.8.2) or /modules (1.8.3-dev)

In your plugin use the OnSetAnimation forward:

Code:
public OnSetAnimation(player, anim) {     // return PLUGIN_HANDLED to block the call }

EDIT: I guess I could add a native later.
Any chance you could add the ability to call SetAnimation with a native? I tried to add it but I get a crash as soon as it gets called.
PHP Code:
 cell AMX_NATIVE_CALL CallSetAnimation(AMX Handlecell Parameter)
{

    
int id       Parameter[1];
    
int anim   Parameter[2];

    const 
void *pvPlayer reinterpret_cast<const void*>((INDEXENT(id)->pvPrivateData));

    
SetAnimationDetour->DisableDetour();
    
SetAnimationOrig(pvPlayeranim);
    
SetAnimationDetour->EnableDetour();

    return 
1;

Testing on windows.
__________________

Last edited by HamletEagle; 08-25-2018 at 06:05.
HamletEagle is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 09-04-2018 , 19:22   Re: [HELP] Writing a module hooking CBasePlayer::SetAnimation
Reply With Quote #22

Quote:
Originally Posted by Arkshine View Post
Try that.

Unzip setanimation-files in /dlls (1.8.2) or /modules (1.8.3-dev)

In your plugin use the OnSetAnimation forward:

Code:
public OnSetAnimation(player, anim) {     // return PLUGIN_HANDLED to block the call }

EDIT: I guess I could add a native later.
There is a mistake in a include file called setanimation.h line 10.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
1xAero
Member
Join Date: Feb 2018
Location: Sakha, Russia
Old 09-30-2022 , 05:25   Re: [HELP] Writing a module hooking CBasePlayer::SetAnimation
Reply With Quote #23

Quote:
Originally Posted by Arkshine View Post
Try that.

Unzip setanimation-files in /dlls (1.8.2) or /modules (1.8.3-dev)

In your plugin use the OnSetAnimation forward:

Code:
public OnSetAnimation(player, anim) {     // return PLUGIN_HANDLED to block the call }

EDIT: I guess I could add a native later.
BIG thanks, this is insane job. We can replace default CS animations now
The superiority of this - it can play any animation (fox example some broken animations with hand reference bound to GaitSequence)

Last edited by 1xAero; 09-30-2022 at 05:38.
1xAero is offline
baneado
Veteran Member
Join Date: Dec 2012
Location: amxmodx-es.com
Old 12-27-2022 , 18:05   Re: [HELP] Writing a module hooking CBasePlayer::SetAnimation
Reply With Quote #24

Quote:
Originally Posted by 1xAero View Post
BIG thanks, this is insane job. We can replace default CS animations now
The superiority of this - it can play any animation (fox example some broken animations with hand reference bound to GaitSequence)
Not need to use it right now, we have 'RG_CBasePlayer_SetAnimation' hook on ReAPI.

Also 'rg_set_animation' native to call SetAnimation function.
baneado is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 12-28-2022 , 08:35   Re: [HELP] Writing a module hooking CBasePlayer::SetAnimation
Reply With Quote #25

Quote:
Originally Posted by baneado View Post
Not need to use it right now, we have 'RG_CBasePlayer_SetAnimation' hook on ReAPI.

Also 'rg_set_animation' native to call SetAnimation function.
Not everyone uses regamedll and rehlds. If you do, great. But don't assume everyone has the same exact setup. It is foolish to claim there is no need for this module.
__________________
HamletEagle is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 12-28-2022 , 17:12   Re: [HELP] Writing a module hooking CBasePlayer::SetAnimation
Reply With Quote #26

Actually this module is so helpful, i highly agree with hamletEagle not everyone uses regamedll but the module surely works with rehlds.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
1xAero
Member
Join Date: Feb 2018
Location: Sakha, Russia
Old 12-29-2022 , 06:51   Re: [HELP] Writing a module hooking CBasePlayer::SetAnimation
Reply With Quote #27

Quote:
Originally Posted by baneado View Post
Not need to use it right now, we have 'RG_CBasePlayer_SetAnimation' hook on ReAPI.

Also 'rg_set_animation' native to call SetAnimation function.
I don't use REAPI or REHLDS
1xAero is offline
HITLER
Member
Join Date: Jul 2018
Location: www
Old 05-01-2023 , 03:00   Re: [HELP] Writing a module hooking CBasePlayer::SetAnimation
Reply With Quote #28

Quote:
Originally Posted by 1xAero View Post
I don't use REAPI or REHLDS
Why not ? It gives you many advantages, and there is no disadvantages
__________________
HITLER is offline
Send a message via Skype™ to HITLER
1xAero
Member
Join Date: Feb 2018
Location: Sakha, Russia
Old 05-06-2023 , 12:25   Re: [HELP] Writing a module hooking CBasePlayer::SetAnimation
Reply With Quote #29

Quote:
Originally Posted by HITLER View Post
Why not ? It gives you many advantages, and there is no disadvantages
Because my server host owner does not allows to use reapi or rehlds or regame usage.
Only default amxmodx and latest hlds.
Actually everything can be done without reapi, fakemeta + hamsandwich + orpheu is enough for me.
1xAero is offline
Reply


Thread Tools
Display Modes

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 05:23.


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