Raised This Month: $ Target: $400
 0% 

IN_RUN button wont work


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 06-03-2013 , 16:59   IN_RUN button wont work
Reply With Quote #1

Hello Allied Modders!
im having troubles hooking IN_RUN

Code:
PHP Code:
pn_print1"gaitsequence:%d/3 forward:%d run:%d"pevidpev_gaitsequence ), (pev(idpev_button) & IN_FORWARD), (pev(idpev_button) & IN_RUN)  ) 
run is always 0, forward is working fine...
code runs in engine client_postthink.
Any solutions?

And as always, thanks!
.Dare Devil. is offline
TheDS1337
Veteran Member
Join Date: Jun 2012
Old 06-03-2013 , 17:13   Re: IN_RUN button wont work
Reply With Quote #2

Try make a global variable and use it in client_postthink:
Code:
new g_InForward;
new g_InRun;

public client_postthink( Client )
{
        g_InForward = pev( Client, pev_button ) & IN_FORWARD;
        g_InRun = pev( Client, pev_button ) & IN_RUN;
}
TheDS1337 is offline
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 06-03-2013 , 17:28   Re: IN_RUN button wont work
Reply With Quote #3

Quote:
Originally Posted by DeagLe.Studio View Post
Try make a global variable and use it in client_postthink:
Code:
new g_InForward;
new g_InRun;

public client_postthink( Client )
{
        g_InForward = pev( Client, pev_button ) & IN_FORWARD;
        g_InRun = pev( Client, pev_button ) & IN_RUN;
}
youre serious?
.Dare Devil. is offline
TheDS1337
Veteran Member
Join Date: Jun 2012
Old 06-03-2013 , 17:29   Re: IN_RUN button wont work
Reply With Quote #4

Quote:
Originally Posted by .Dare Devil. View Post
youre serious?
Not yet, i am noob
TheDS1337 is offline
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 06-03-2013 , 17:31   Re: IN_RUN button wont work
Reply With Quote #5

Quote:
Originally Posted by DeagLe.Studio View Post
Not yet, i am noob
Its the same what i did...
.Dare Devil. is offline
TheDS1337
Veteran Member
Join Date: Jun 2012
Old 06-03-2013 , 17:33   Re: IN_RUN button wont work
Reply With Quote #6

Quote:
Originally Posted by .Dare Devil. View Post
Its the same what i did...
Sorry then
TheDS1337 is offline
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 06-03-2013 , 17:36   Re: IN_RUN button wont work
Reply With Quote #7

Doing some research i found that IN_RUN is not working at all and my problem is normal.
My question is that is there anyway to check walk button with pev_maxspeed 1.0 or less?
Even when client is not pressing forward or back or side buttons it will catch walk, ive found already on way here: http://forums.alliedmods.net/showthr...hlight=walking
but this only work when player is pressing anyohter speed button not only walk.

Last edited by .Dare Devil.; 06-03-2013 at 17:44.
.Dare Devil. is offline
TheDS1337
Veteran Member
Join Date: Jun 2012
Old 06-03-2013 , 18:01   Re: IN_RUN button wont work
Reply With Quote #8

Maybe some think like that works, btw i go sleep good night
Code:
static Float:Velocity[ 3 ];
pev( Client, pev_velocity, Velocity );
if( vector_lenght( Velocity ) > 250.0 )
        client_print( Client, print_center, "WALKING" );
else
        client_print( Client, print_center, "RUNNING" );
TheDS1337 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:21.


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