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

Animation


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Kowalsky
Senior Member
Join Date: Mar 2015
Location: Poland
Old 04-11-2016 , 16:15   Animation
Reply With Quote #1

How can I switch a model's animation? For example I have a model and have in-duck animation (in this model). How can I make the default animation switch to that and repeat over and over?
__________________
I ONLY LOVE STEAM, NON-STEAM IS VERY BAD FOR YOUR HEALTH!

Last edited by Kowalsky; 04-11-2016 at 16:15.
Kowalsky is offline
Freezo Begin
BANNED
Join Date: Mar 2014
Location: Morocco
Old 04-11-2016 , 18:23   Re: Animation
Reply With Quote #2

What do you mean bi in-duck animation?
Freezo Begin is offline
Kowalsky
Senior Member
Join Date: Mar 2015
Location: Poland
Old 04-12-2016 , 03:38   Re: Animation
Reply With Quote #3

Doesn't matter what the animation is, some random move. How can I activate in game?
__________________
I ONLY LOVE STEAM, NON-STEAM IS VERY BAD FOR YOUR HEALTH!
Kowalsky is offline
Freezo Begin
BANNED
Join Date: Mar 2014
Location: Morocco
Old 04-12-2016 , 06:14   Re: Animation
Reply With Quote #4

Code:
#include <amxmodx> #include <fakemeta> #define PLUGIN "New Plug-In" #define VERSION "1.0" #define AUTHOR "author" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)         register_event( "CurWeapon", "event_CurrWeapon", "be", "1=1" );     } public event_CurrWeapon(id){         new wpID = read_data(2);         if(wpID == CSW_KNIFE /* CSW_* */)     {         set_pev(id, pev_bInDuck, 1)     } }

Edit: as you can see the weapon is KNIFE, you can change it by changing the CSW_*

Last edited by Freezo Begin; 04-12-2016 at 06:19.
Freezo Begin is offline
Kowalsky
Senior Member
Join Date: Mar 2015
Location: Poland
Old 04-12-2016 , 06:24   Re: Animation
Reply With Quote #5

I don't want player to become in duck.

Imagine the following case - I have a custom model with custom animations.
I want to activate one of the animations via a plugin. How can I do it?
__________________
I ONLY LOVE STEAM, NON-STEAM IS VERY BAD FOR YOUR HEALTH!
Kowalsky is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 04-12-2016 , 07:18   Re: Animation
Reply With Quote #6

you can't unless you modify .MDL .I think so.
siriusmd99 is offline
SpeeDeeR
Veteran Member
Join Date: Mar 2010
Location: Bulgaria
Old 04-12-2016 , 07:43   Re: Animation
Reply With Quote #7

Quote:
Originally Posted by Kowalsky View Post
I don't want player to become in duck.

Imagine the following case - I have a custom model with custom animations.
I want to activate one of the animations via a plugin. How can I do it?
I'm assuming you know the animation index:
If its a weapon model use pev_weaponanim; if its player model use pev_gaitsequence
SpeeDeeR is offline
safetymoose
Senior Member
Join Date: Feb 2015
Old 04-12-2016 , 17:44   Re: Animation
Reply With Quote #8

here you go
PHP Code:
stock UTIL_PlayPlayerAnimation(const id, const Sequence Float:frame 1.0 Float:framerate 1.0)
{
    
entity_set_int(idEV_INT_sequenceSequence)
    
entity_set_int(idEV_INT_gaitsequence1)
    
entity_set_float(idEV_FL_frameframe)
    
entity_set_float(idEV_FL_framerateframerate)

safetymoose 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 16:00.


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