Raised This Month: $ Target: $400
 0% 

Run Effect


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DavidJr
Senior Member
Join Date: Apr 2012
Old 04-14-2012 , 06:22   Run Effect
Reply With Quote #1

I want to make a plugin that if we walk there is a shake effect on the weapon model.. is it right?

Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <engine>

#define PLUGIN "UnKnown."
#define VERSION "1.0"
#define AUTHOR ""

public plugin_init()
{
    register_plugin("run effect","1.0","SubFive")
    register_clcmd("bind "s","cmd_run",ADMIN_USER)
}

public WALKMOVE_NORMAL(id)
{
    {
        set_animation(id, 7)
        set_task(1.2, "revert_back", id)
    }
}

public revert_back(id)
{
    client_cmd(id, "lastinv")
}

public set_animation( id, seq ) 
{
    entity_set_int(id, EV_INT_weaponanim, seq);
    message_begin(MSG_ONE, SVC_WEAPONANIM, {0,0,0}, id);
    write_byte(seq);
    write_byte(entity_get_int(id, EV_INT_body));
    message_end();
}
DavidJr is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-14-2012 , 06:24   Re: Run Effect
Reply With Quote #2

What do you mean by a shake effect ?
__________________
Arkshine is offline
DavidJr
Senior Member
Join Date: Apr 2012
Old 04-14-2012 , 06:27   Re: Run Effect
Reply With Quote #3

it's hard to explain but when we run there's an effect on the view model like this video http://www.youtube.com/watch?v=NkMzR8AjWyc
DavidJr is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-14-2012 , 06:38   Re: Run Effect
Reply With Quote #4

Not sure what effect you're talking about. Maybe the movement up/down ? In CS you have similar effect but more forward/backward. Anyway you can't do nothing that's something fully handled on the client and unrelated to the weapon animations.
__________________
Arkshine is offline
DavidJr
Senior Member
Join Date: Apr 2012
Old 04-14-2012 , 06:47   Re: Run Effect
Reply With Quote #5

Quote:
Originally Posted by Arkshine View Post
Not sure what effect you're talking about. Maybe the movement up/down ? In CS you have similar effect but more forward/backward. Anyway you can't do nothing that's something fully handled on the client and unrelated to the weapon animations.
Yes ! The movement.. i've make the animation is there any plugin to set the animation when run walk and duck?
DavidJr is offline
DavidJr
Senior Member
Join Date: Apr 2012
Old 04-15-2012 , 01:56   Re: Run Effect
Reply With Quote #6

Code:
/* Plugin generated by AweaMXX-Studio */

#include <amxmodx>
#include <engine>

#define PLUGIN "UnKnown."
#define VERSION "1.0"
#define AUTHOR ""


get_weaponid (weapon_mp5[get_weaponid ],native)

stock set_entity_anim( ent, anim ) 
{ 
    if( pev_valid( ent ) )
    {
        entity_set_float( ent, EV_FL_animtime, get_gametime( ) ); 
        entity_set_float( ent, EV_FL_framerate, 1.0 ); 
        entity_set_int( ent, EV_INT_sequence, anim ); 
    }      
}
I'm trying to make a plugin that play a sequence when walk

Last edited by DavidJr; 04-15-2012 at 01:58.
DavidJr is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-15-2012 , 03:59   Re: Run Effect
Reply With Quote #7

You have made a sequence inside a weapon, you have to use SVC_WEAPONANIM.
__________________
Arkshine is offline
DavidJr
Senior Member
Join Date: Apr 2012
Old 04-16-2012 , 00:51   Re: Run Effect
Reply With Quote #8

How to add SVC_WEAPONANIM to that code? thank you very much for your help i'm sorry
DavidJr is offline
DavidJr
Senior Member
Join Date: Apr 2012
Old 04-16-2012 , 00:54   Re: Run Effect
Reply With Quote #9

Code:
/* Plugin generated by AweaMXX-Studio */

#include <amxmodx>
#include <engine>

#define PLUGIN "UnKnown."
#define VERSION "1.0"
#define AUTHOR ""


get_weaponid (weapon_mp5[get_weaponid ],native)

stock set_entity_anim( ent, anim ) 
{ 
    if( pev_valid( ent ) )
    {
        entity_set_float( ent, EV_FL_animtime, get_gametime( ) ); 
        entity_set_float( ent, EV_FL_framerate, 1.0 ); 
        entity_set_int( ent, EV_INT_sequence, anim ); 
    }      
}
public set_animation( id, seq ) 
{
    entity_set_int(id, EV_INT_weaponanim, seq);
    message_begin(MSG_ONE, SVC_WEAPONANIM, {0,0,0}, id);
    write_byte(seq);
    write_byte(entity_get_int(id, EV_INT_body));
    message_end();
}
Like this?
DavidJr is offline
DavidJr
Senior Member
Join Date: Apr 2012
Old 04-16-2012 , 03:40   Re: Run Effect
Reply With Quote #10

it doesn't work
DavidJr 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:45.


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