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

Detect players on ground?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
WaZZeR++
Veteran Member
Join Date: Mar 2005
Location: Sweden
Old 10-04-2005 , 16:33   Detect players on ground?
Reply With Quote #1

how do i check if a player is standing on the ground?
or maybe its easier to check if hes not on the ground?
WaZZeR++ is offline
Send a message via MSN to WaZZeR++
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 10-04-2005 , 16:42  
Reply With Quote #2

get -users flags and check against FL_ONGROUND
Freecode is offline
WaZZeR++
Veteran Member
Join Date: Mar 2005
Location: Sweden
Old 10-04-2005 , 16:51  
Reply With Quote #3

Quote:
#define FL_ONGROUND (1<<9) /* At rest / on the ground */
i found that, but what command should i use to check the flag
WaZZeR++ is offline
Send a message via MSN to WaZZeR++
Zenith77
Veteran Member
Join Date: Aug 2005
Old 10-04-2005 , 16:57  
Reply With Quote #4

Code:
if( (get_user_flags(id) &FL_ONGROUND) ) {              // BLA! }





p.s. Where'ya been wazzer ? It like you vanished for the longest time
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
WaZZeR++
Veteran Member
Join Date: Mar 2005
Location: Sweden
Old 10-04-2005 , 17:05  
Reply With Quote #5

Thanks...

Yeah, i know, i dont have time...
School, lot of time.
Traning 17 hours a week.
Use the littel time thats left to have some fun with friends.
And sleep, too little

But when i get time again i will return, see you then.
WaZZeR++ is offline
Send a message via MSN to WaZZeR++
WaZZeR++
Veteran Member
Join Date: Mar 2005
Location: Sweden
Old 10-05-2005 , 11:31  
Reply With Quote #6

hummm...dont work to good
Code:
public movetest(id) {     if(get_user_flags(id) &FL_ONGROUND)         client_print(id,print_chat,"on ground")     else         client_print(id,print_chat,"not on ground") }

dont get_user_flags return the admin flags?
WaZZeR++ is offline
Send a message via MSN to WaZZeR++
Zenith77
Veteran Member
Join Date: Aug 2005
Old 10-05-2005 , 11:43  
Reply With Quote #7

eh eh..


should be

Code:
if( ( get_entity_flags(id) &FL_ONGROUND) ) {            // ZOMG GABEMAIL! }

Be sure to include the extra brackets or else it will give you an invalid expression.
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
WaZZeR++
Veteran Member
Join Date: Mar 2005
Location: Sweden
Old 10-05-2005 , 12:29  
Reply With Quote #8

thx working now
WaZZeR++ is offline
Send a message via MSN to WaZZeR++
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 10-05-2005 , 14:33  
Reply With Quote #9

Code:
if(get_entity_flags(id) & FL_ONGROUND)
is perfectly acceptable, the extra pair of parentheses should only be used if there are multiple conditions in the if statement.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX 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 04:25.


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