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

give player npc animations


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Master53
Veteran Member
Join Date: Dec 2009
Old 11-28-2010 , 20:55   give player npc animations
Reply With Quote #1

is it possable in sourcemod to be able to set an animation to a player. for an example, having a player but with zombie animations or so.
__________________
Master(d)



Master53 is offline
Leonardo
Veteran Member
Join Date: Feb 2010
Location: 90's
Old 11-29-2010 , 03:40   Re: give player npc animations
Reply With Quote #2

can't play animation from another models. and I guess, any animatons is a client-side.
__________________
Leonardo is offline
Master53
Veteran Member
Join Date: Dec 2009
Old 11-29-2010 , 08:48   Re: give player npc animations
Reply With Quote #3

i have found some offsets in the net props

Code:
    -Member: m_bClientSideAnimation (offset 968) (type integer) (bits 1)


      Sub-Class Table (6 Deep): DT_ServerAnimationData
      -Member: m_flCycle (offset 848) (type float) (bits 15)


       Sub-Class Table (7 Deep): DT_Animationlayer
       -Member: m_nSequence (offset 8) (type integer) (bits 12)
       -Member: m_flCycle (offset 12) (type float) (bits 15)
       -Member: m_flPrevCycle (offset 16) (type float) (bits 15)
       -Member: m_flWeight (offset 20) (type float) (bits 8)
       -Member: m_nOrder (offset 60) (type integer) (bits 4)
__________________
Master(d)



Master53 is offline
FaTony
Veteran Member
Join Date: Aug 2008
Old 11-29-2010 , 21:10   Re: give player npc animations
Reply With Quote #4

Quote:
Originally Posted by Leonardo View Post
and I guess, any animatons is a client-side.
Nope.
__________________
FaTony is offline
Master53
Veteran Member
Join Date: Dec 2009
Old 11-29-2010 , 21:21   Re: give player npc animations
Reply With Quote #5

Quote:
Originally Posted by FaTony View Post
Nope.
hum. so there is a way of setting the an animation for a player?
__________________
Master(d)



Master53 is offline
Andersso
Member
Join Date: Nov 2009
Location: E8 2A 2A 2A 2A
Old 11-30-2010 , 13:45   Re: give player npc animations
Reply With Quote #6

Vtable dump:
PHP Code:
CTerrorPlayer::HandleAnimEvent(animevent_t *)
CCSPlayer::SetAnimation(PLAYER_ANIM
From HL2SDK:
PHP Code:
struct animevent_t
{
        
int event;
        const 
char *options;
        
float cycle;
        
float eventtime;
        
int type;
        
CBaseAnimating *pSource;
}; 
PHP Code:
enum PLAYER_ANIM
{
        
PLAYER_IDLE,
        
PLAYER_WALK,
        
PLAYER_JUMP,
        
PLAYER_SUPERJUMP,
        
PLAYER_DIE,
        
PLAYER_ATTACK1,
        
PLAYER_IN_VEHICLE,

        
// TF Player animations
        
PLAYER_RELOAD,
        
PLAYER_START_AIMING,
        
PLAYER_LEAVE_AIMING,
}; 
Those are the best candidates I've found in the vtable dump. You can probably create an SDKCall on "SetAnimation", and put the first param as an int. Then play around with it and see if anything happens
Andersso is offline
Master53
Veteran Member
Join Date: Dec 2009
Old 11-30-2010 , 20:44   Re: give player npc animations
Reply With Quote #7

well dont those only set the animation of what the player is actually dont not a custom animation?
__________________
Master(d)



Master53 is offline
Andersso
Member
Join Date: Nov 2009
Location: E8 2A 2A 2A 2A
Old 12-01-2010 , 07:57   Re: give player npc animations
Reply With Quote #8

Yes, sorry. I meant playermodel animations, but I think it's the same with NPC's, but then you will have to make a dump on its class.

If you want to have custom animations you will have to recompile the models with the animations you want.
Andersso is offline
Master53
Veteran Member
Join Date: Dec 2009
Old 12-01-2010 , 09:33   Re: give player npc animations
Reply With Quote #9

sounds alot of work but it could be possable
__________________
Master(d)



Master53 is offline
Mecha the Slag
Veteran Member
Join Date: Jun 2009
Location: Denmark
Old 12-03-2010 , 17:10   Re: give player npc animations
Reply With Quote #10

does the above work for TF2 also?
__________________
Mecha the Slag 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 07:21.


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