Raised This Month: $ Target: $400
 0% 

in water


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ownage
BANNED
Join Date: Jul 2007
Location: I don't know
Old 07-14-2007 , 01:49   in water
Reply With Quote #1

how do u detect is user is in water?
Ownage is offline
Drak
Veteran Member
Join Date: Jul 2005
Old 07-14-2007 , 06:07   Re: in water
Reply With Quote #2

Code:
stock is_user_in_water(id) {     if(is_user_alive(id)) {         if(pev(id,pev_waterlevel) >= 4) {             return 1;         } else {             return 0;         }     } }

Umm, you might wanna tweak the waterlevel value, I think it may be different..

Look here: http://forums.alliedmods.net/showpos...13&postcount=3
__________________
Oh yeah

Last edited by Drak; 07-14-2007 at 06:12.
Drak is offline
Send a message via MSN to Drak
Howdy!
Senior Member
Join Date: Feb 2007
Old 07-14-2007 , 06:43   Re: in water
Reply With Quote #3

Code:
// waterlevel 0 - not in water
// waterlevel 1 - feet in water
// waterlevel 2 - waist in water
// waterlevel 3 - head in water
With engine module: if (entity_get_int(player, EV_INT_waterlevel))
With fakemeta module: if (pev(player, pev_waterlevel))
__________________
[IMG]http://img221.**************/img221/5608/howdyfinnishhq2.jpg[/IMG]
Howdy! is offline
Ownage
BANNED
Join Date: Jul 2007
Location: I don't know
Old 07-15-2007 , 23:51   Re: in water
Reply With Quote #4

great thanks ++
Ownage 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 22:04.


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