Raised This Month: $ Target: $400
 0% 

Weapon animation doesn't show while spectating


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
NiHiLaNTh
Way Past Expiration
Join Date: May 2009
Location: Latvia
Old 06-08-2010 , 10:23   Weapon animation doesn't show while spectating
Reply With Quote #1

Well, I've created weapon and to play animations I use this stock(thanks Arkshine)
Code:
stock UTIL_PlayWeaponAnimation ( const Player, const Sequence )
{
    set_pev ( Player, pev_weaponanim, Sequence )
    
    message_begin ( MSG_ONE_UNRELIABLE, SVC_WEAPONANIM, .player = Player )
    write_byte ( Sequence )
    write_byte ( pev ( Player, pev_body ) )
    message_end ( )
}
And when I'm spectating someone who's firing this new weapon, I dont see weapon animations.I hear fire sounds, but no animations.Please help me to fix that .
__________________

NiHiLaNTh is offline
Send a message via Skype™ to NiHiLaNTh
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-08-2010 , 11:38   Re: Weapon animation doesn't show while spectating
Reply With Quote #2

If you mean the animation on what you see on a player, what you use is to animate the view model ( v_ ) of the weapon, nothing to do with p_ model which is handled by the player's model. Since it's a custom weapon, you have to force to play an animation on the player. ( animation which is near on what you need ). Basically hooking CBasePlayer::SetAnimation() in post, then playing with pev_sequence, pev_frame and ResetSequenceInfo(). There is a plugin I've posted in the resquest section ( Prone Position ) which use such forward.
__________________
Arkshine is offline
NiHiLaNTh
Way Past Expiration
Join Date: May 2009
Location: Latvia
Old 06-08-2010 , 11:41   Re: Weapon animation doesn't show while spectating
Reply With Quote #3

Hmm, maybe I don't understand you, or you dont understand me.I mean I dont see view model fire animation.
__________________

NiHiLaNTh is offline
Send a message via Skype™ to NiHiLaNTh
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-08-2010 , 11:43   Re: Weapon animation doesn't show while spectating
Reply With Quote #4

Spectating someone in what view ?
__________________
Arkshine is offline
NiHiLaNTh
Way Past Expiration
Join Date: May 2009
Location: Latvia
Old 06-08-2010 , 11:44   Re: Weapon animation doesn't show while spectating
Reply With Quote #5

Spectating someone in first-person mode.
__________________

NiHiLaNTh is offline
Send a message via Skype™ to NiHiLaNTh
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-08-2010 , 11:51   Re: Weapon animation doesn't show while spectating
Reply With Quote #6

Don't know ; try MSG_ONE to see.
__________________
Arkshine is offline
NiHiLaNTh
Way Past Expiration
Join Date: May 2009
Location: Latvia
Old 06-08-2010 , 11:57   Re: Weapon animation doesn't show while spectating
Reply With Quote #7

Result is the same ;(
Please help me someone
__________________


Last edited by NiHiLaNTh; 06-08-2010 at 14:38.
NiHiLaNTh is offline
Send a message via Skype™ to NiHiLaNTh
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 11:57.


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