AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Weapon animation doesn't show while spectating (https://forums.alliedmods.net/showthread.php?t=129056)

NiHiLaNTh 06-08-2010 10:23

Weapon animation doesn't show while spectating
 
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 :cry:.

Arkshine 06-08-2010 11:38

Re: Weapon animation doesn't show while spectating
 
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.

NiHiLaNTh 06-08-2010 11:41

Re: Weapon animation doesn't show while spectating
 
Hmm, maybe I don't understand you, or you dont understand me.I mean I dont see view model fire animation.

Arkshine 06-08-2010 11:43

Re: Weapon animation doesn't show while spectating
 
Spectating someone in what view ?

NiHiLaNTh 06-08-2010 11:44

Re: Weapon animation doesn't show while spectating
 
Spectating someone in first-person mode.

Arkshine 06-08-2010 11:51

Re: Weapon animation doesn't show while spectating
 
Don't know ; try MSG_ONE to see.

NiHiLaNTh 06-08-2010 11:57

Re: Weapon animation doesn't show while spectating
 
Result is the same ;(
Please help me someone :(


All times are GMT -4. The time now is 05:27.

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