Raised This Month: $ Target: $400
 0% 

How to set animation for player


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
dias
BANNED
Join Date: Jul 2009
Location: South Vietnam
Old 07-09-2012 , 05:33   How to set animation for player
Reply With Quote #1

I have this code. But when i set this, the anim play for 1.0 second then reset to idle anim... How to set long anim for player ?

PHP Code:
public set_player_anim(entanim)
{
    if(!
pev_valid(ent))
        return
    
    
set_pev(entpev_sequenceanim)
    
set_pev(entpev_frame0.0)
    
set_pev(entpev_framerate1.0)

dias is offline
Send a message via Yahoo to dias Send a message via Skype™ to dias
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-09-2012 , 06:54   Re: How to set animation for player
Reply With Quote #2

A player's animation is constantly played through CBasePlayer::SetAnimation() (idle, walk, etc.). If your purpose is to overwrite original animation, you would need to hook this function.
__________________
Arkshine is offline
dias
BANNED
Join Date: Jul 2009
Location: South Vietnam
Old 07-09-2012 , 09:04   Re: How to set animation for player
Reply With Quote #3

how can i do it ?
dias is offline
Send a message via Yahoo to dias Send a message via Skype™ to dias
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-09-2012 , 09:30   Re: How to set animation for player
Reply With Quote #4

Like said, hook the function, with Orpheu or Rage, and change on the fly the sequence, but you should explain what you want to do exactly, what sequence you're talking about, for what, etc etc.
__________________
Arkshine is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 07-09-2012 , 12:32   Re: How to set animation for player
Reply With Quote #5

Which sequence is?
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 07-09-2012 , 18:59   Re: How to set animation for player
Reply With Quote #6

Could look into Arkshine's prone plugin:

http://forums.alliedmods.net/showpos...6&postcount=27
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.
hornet is offline
dias
BANNED
Join Date: Jul 2009
Location: South Vietnam
Old 07-09-2012 , 22:56   Re: How to set animation for player
Reply With Quote #7

well. i make a zombie class for my zombie mod, when do skill -> play player skill anim for 1 ~ 5 second(s)
The Sequence(s) is 151 of 152...

@hornet:
- i don't see?

Last edited by dias; 07-09-2012 at 22:58.
dias is offline
Send a message via Yahoo to dias Send a message via Skype™ to dias
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 07-09-2012 , 23:06   Re: How to set animation for player
Reply With Quote #8

Quote:
Originally Posted by dias View Post
well. i make a zombie class for my zombie mod, when do skill -> play player skill anim for 1 ~ 5 second(s)
The Sequence(s) is 151 of 152...

@hornet:
- i don't see?
As from I know a default CS model has a max of 110 sequences... provide the names of these sequences
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
dias
BANNED
Join Date: Jul 2009
Location: South Vietnam
Old 07-10-2012 , 04:17   Re: How to set animation for player
Reply With Quote #9

My other zombie class can play an anim over 110, but just 1 second(s) that's enough. but this new class need 5 ~ 10 second(s) :-??
dias is offline
Send a message via Yahoo to dias Send a message via Skype™ to dias
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 07-10-2012 , 09:09   Re: How to set animation for player
Reply With Quote #10

Quote:
Originally Posted by dias View Post
My other zombie class can play an anim over 110, but just 1 second(s) that's enough. but this new class need 5 ~ 10 second(s) :-??
But you want to play an specific animation, or do you want to play one as how you were holding a weapon like?
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS 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 15:13.


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