Raised This Month: $ Target: $400
 0% 

How to check for...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Willmaker
Senior Member
Join Date: Dec 2004
Location: Sydney, Australia
Old 12-22-2005 , 04:24   How to check for...
Reply With Quote #1

I know how FL_ONGROUND checks to see if your on the ground, but I want to know how you would check if your on the ground or at the peak of a jump etc, so basically your not moving along the z-axis, if its possible.
Willmaker is offline
Send a message via ICQ to Willmaker Send a message via AIM to Willmaker Send a message via MSN to Willmaker Send a message via Yahoo to Willmaker
Cheap_Suit
Veteran Member
Join Date: May 2004
Old 12-22-2005 , 05:10  
Reply With Quote #2

Code:
new Float: velocity[3] entity_get_vector(id, EV_VEC_velocity, velocity) if(velocity[2] == 0.0) { /*Insert Code*/ }
__________________
HDD fried, failed to backup files. Sorry folks, just don't have free time anymore. This is goodbye.
Cheap_Suit is offline
Willmaker
Senior Member
Join Date: Dec 2004
Location: Sydney, Australia
Old 12-22-2005 , 05:15  
Reply With Quote #3

Thanks.
Willmaker is offline
Send a message via ICQ to Willmaker Send a message via AIM to Willmaker Send a message via MSN to Willmaker Send a message via Yahoo to Willmaker
Willmaker
Senior Member
Join Date: Dec 2004
Location: Sydney, Australia
Old 12-22-2005 , 06:50  
Reply With Quote #4

While Im at it, how do you check for horizontal speed, like running and strafing etc? It looks like it would be completely different compared to the above. After searching over 100 plugins, there isnt any code I could use as an example.
Willmaker is offline
Send a message via ICQ to Willmaker Send a message via AIM to Willmaker Send a message via MSN to Willmaker Send a message via Yahoo to Willmaker
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 12-22-2005 , 07:10  
Reply With Quote #5

lawl
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Willmaker
Senior Member
Join Date: Dec 2004
Location: Sydney, Australia
Old 12-22-2005 , 07:18  
Reply With Quote #6

Sorry, I should of been more specific in the first place. When checking the horizontal speed, I was thinking more like a specific speed, like if they were travelling slower than a certain amount etc. Thanks for trying.
Willmaker is offline
Send a message via ICQ to Willmaker Send a message via AIM to Willmaker Send a message via MSN to Willmaker Send a message via Yahoo to Willmaker
Cheap_Suit
Veteran Member
Join Date: May 2004
Old 12-22-2005 , 07:49  
Reply With Quote #7

Here is an simple example. It checks the velocity of X, Y, and Z and prints them.

Code:
    new Float: Velocity[3]     entity_get_vector(id, EV_VEC_velocity, Velocity)     set_hudmessage(255, 255, 255, 0.02, 0.15, 0, 0.0, 0.1)     show_hudmessage(id, "^nVelocity^nX: %i Y: %i Z: %i", Velocity[0], Velocity[1], Velocity[2]) }

Edit:

This one add the velocity of X, Y, and Z. Thought it might be helpful.
Code:
new Speed = get_speed(id)
__________________
HDD fried, failed to backup files. Sorry folks, just don't have free time anymore. This is goodbye.
Cheap_Suit is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 12-22-2005 , 13:44  
Reply With Quote #8

http://forums.alliedmods.net/showthread.php?t=21815
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Willmaker
Senior Member
Join Date: Dec 2004
Location: Sydney, Australia
Old 12-22-2005 , 20:18  
Reply With Quote #9

Thanks everyone. +karma for you all
Willmaker is offline
Send a message via ICQ to Willmaker Send a message via AIM to Willmaker Send a message via MSN to Willmaker Send a message via Yahoo to Willmaker
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 15:45.


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