Raised This Month: $ Target: $400
 0% 

How to check if a player is in water?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 08-25-2005 , 19:51  
Reply With Quote #2

Code:
if(entity_get_int(id,EV_INT_flags) & FL_INWATER)

Probably, though it may only return if they are fully submerged. This code would see if their is water at their feet (I think):

Code:
new Float:origin[3], Float:mins[3]; entity_get_vector(id,EV_VEC_origin,origin); entity_get_vector(id,EV_VEC_mins,mins); origin[2] += mins[2]; // feet of player theoretically if(PointContents(origin) == CONTENTS_WATER)
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
 



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 14:31.


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