Raised This Month: $ Target: $400
 0% 

Solved Get Player Current Speed (velocity?) or how to detect movement?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Nursik
Senior Member
Join Date: Jul 2016
Location: In TF2
Old 10-24-2016 , 10:29   Get Player Current Speed (velocity?) or how to detect movement?
Reply With Quote #1

I want to know how to either detect if a client is moving or has a speed of at least 20.0HU to 600.0HU (player is moving) or 0.0HU to 9.0HU (probably not moving), so i want to know if the player is moving or not. Probably should change prefix to [TF2], because i think only tf2 coders know what is HU.

Last edited by Nursik; 10-25-2016 at 10:20.
Nursik is offline
Benoist3012
Veteran Member
Join Date: Mar 2014
Location: CWave::ForceFinish()
Old 10-25-2016 , 07:15   Re: Get Player Current Speed (velocity?) or how to detect movement?
Reply With Quote #2

HU (Hammer units) isn't not used by tf2 only , it's used by every games using the source engine, be careful with that.


Anyway if you are looking for player velocity you should look for this prop
Code:
GetEntPropVector(iClient, Prop_Data, "m_vecAbsVelocity", flVel);
It will give you the actual velocity of the player.
__________________
Benoist3012 is offline
Nursik
Senior Member
Join Date: Jul 2016
Location: In TF2
Old 10-25-2016 , 10:14   Re: Get Player Current Speed (velocity?) or how to detect movement?
Reply With Quote #3

Quote:
Originally Posted by Benoist3012 View Post
HU (Hammer units) isn't not used by tf2 only , it's used by every games using the source engine, be careful with that.


Anyway if you are looking for player velocity you should look for this prop
Code:
GetEntPropVector(iClient, Prop_Data, "m_vecAbsVelocity", flVel);
It will give you the actual velocity of the player.
mate, thank you, but i never said HU was used only in TF2. I just said i don't think many not tf2 coders know about it, since they use other netprops to change speed in the game and it's different.
Nursik is offline
Benoist3012
Veteran Member
Join Date: Mar 2014
Location: CWave::ForceFinish()
Old 10-25-2016 , 13:29   Re: Get Player Current Speed (velocity?) or how to detect movement?
Reply With Quote #4

Quote:
Originally Posted by Nursik View Post
but i never said HU was used only in TF2. I just said i don't think many not tf2 coders know about it, since they use other netprops to change speed in the game and it's different.
Well
Quote:
Originally Posted by Nursik View Post
because i think only tf2 coders know what is HU.
This was kind of confusing, but anyway glad I helped you.
__________________
Benoist3012 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 17:27.


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