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

Solved Block Idle Animation


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hellmonja
Senior Member
Join Date: Oct 2015
Old 09-01-2017 , 08:10   Block Idle Animation
Reply With Quote #1

Hi guys. I'm making my own inspect plugin which works well for most weapons. When it comes to shotguns, the inspect animation plays out for a split second then to goes to idle. After that I can't play inspect anymore unless I switch from one gear then back to it again.

I was thinking if the shotguns have a higher cycle rate with regards to their idle anims. I was wondering how to block this long enough for the inspect to play out...
__________________

Last edited by hellmonja; 09-22-2017 at 12:27. Reason: Solved...
hellmonja is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 09-01-2017 , 08:18   Re: [HELP]Block Idle Animation
Reply With Quote #2

CBasePlayerWeapon::SendWeaponAnim
__________________

Last edited by HamletEagle; 09-01-2017 at 08:42. Reason: wrong class...
HamletEagle is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 09-01-2017 , 08:18   Re: [HELP]Block Idle Animation
Reply With Quote #3

You can try increase the next call time of weapon idle (set_pdata_float(weapon, m_flTimeWeaponIdle = 48, 4...))

P.S: I didn't see Hamlet post.
__________________









Last edited by CrazY.; 09-01-2017 at 08:20.
CrazY. is offline
hellmonja
Senior Member
Join Date: Oct 2015
Old 09-01-2017 , 08:28   Re: [HELP]Block Idle Animation
Reply With Quote #4

Quote:
Originally Posted by HamletEagle View Post
CBasePlayer::SendWeaponAnim
I've seen this before. How exactly do I use it? It says on some sites I need to hook it to a Ham function. So I hook it on Ham_Weapon_WeaponIdle?...
__________________
hellmonja is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 09-01-2017 , 08:42   Re: [HELP]Block Idle Animation
Reply With Quote #5

If you can send the model and a test plugin(preferably with only the animation, no unrelated stuff) I can take a look.
__________________
HamletEagle is offline
hellmonja
Senior Member
Join Date: Oct 2015
Old 09-14-2017 , 20:58   Re: [HELP]Block Idle Animation
Reply With Quote #6

Quote:
Originally Posted by HamletEagle View Post
If you can send the model and a test plugin(preferably with only the animation, no unrelated stuff) I can take a look.
Hi! Sorry I didn't come back soon enough. I don't pass here very often. Setting the idle call times like CrazY. said worked. But I would like to know more about the CbasePlayer and how to use them. I've been seeing them for some time now in codes but never fully understood what exactly they are or how to use them (my first attempt from scratch ended up in errors)...
__________________
hellmonja is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 09-14-2017 , 22:43   Re: [HELP]Block Idle Animation
Reply With Quote #7

Well, I won't know how to explain the same as Hamlet, so I'm going to leave a list of offsets for you to take a look at.

https://wiki.alliedmods.net/Category:CS_Class_List
__________________








CrazY. is offline
hellmonja
Senior Member
Join Date: Oct 2015
Old 09-15-2017 , 12:30   Re: [HELP]Block Idle Animation
Reply With Quote #8

Quote:
Originally Posted by CrazY. View Post
Well, I won't know how to explain the same as Hamlet, so I'm going to leave a list of offsets for you to take a look at.

https://wiki.alliedmods.net/Category:CS_Class_List
Thank you. I've seen this before but made very little sense back then. Perhaps if I cross-reference it now with some of the codes I downloaded. Again, thank you for reminding me this...
__________________
hellmonja is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 09-15-2017 , 15:08   Re: [HELP]Block Idle Animation
Reply With Quote #9

What crazy gave you are called offsets. If you remember your thread about reloading I've explained a bit about them, go re read it.
What I was saying is to hook with orpheu(or hamsandwich in amxx 1.8.3 - Ham_CS_Weapon_SendWeaponAnim) the CBasePlayer::SendWeaponAnim function. This functions plays the animations, so it was a way to block the idle animation as much as you want. But using WeaponIdle is fine too.

You know that in your plugins you have some variables that control certain parts of the code. For example, if you would like to know if a player has access to something you would use a bool and set it to true/false. This offsets are variables from the game code and by using their address we can change their values and basically change the way in which the game acts.

For example, m_bHasPrimary offset is set to true when a player has a primary weapon.
__________________

Last edited by HamletEagle; 09-15-2017 at 15:10.
HamletEagle is offline
hellmonja
Senior Member
Join Date: Oct 2015
Old 09-22-2017 , 12:25   Re: [HELP]Block Idle Animation
Reply With Quote #10

Quote:
Originally Posted by HamletEagle View Post
What crazy gave you are called offsets. If you remember your thread about reloading I've explained a bit about them, go re read it.
What I was saying is to hook with orpheu(or hamsandwich in amxx 1.8.3 - Ham_CS_Weapon_SendWeaponAnim) the CBasePlayer::SendWeaponAnim function. This functions plays the animations, so it was a way to block the idle animation as much as you want. But using WeaponIdle is fine too.

You know that in your plugins you have some variables that control certain parts of the code. For example, if you would like to know if a player has access to something you would use a bool and set it to true/false. This offsets are variables from the game code and by using their address we can change their values and basically change the way in which the game acts.

For example, m_bHasPrimary offset is set to true when a player has a primary weapon.
Ah yes, OFFSETS. I know this one. I think I just started tinkering with them on my own 2 months ago. It's been very helpful and I've quite a few things that I thought I couldn't do then.

However, if I may, I was referring to something like this:
PHP Code:
public CBasePlayerWeapon_Reload(WeaponEntity
Is this just a naming preference or is it specifically named so, like client_disconnect?...
__________________
hellmonja is offline
Reply



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 04:01.


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