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

How to catch that player jump into the water.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 07-29-2011 , 07:33   How to catch that player jump into the water.
Reply With Quote #1

Hi,

I am working one project, HD and very real cs zombie server.
What i need for now is that how to catch player jump into water.

I want to make this when player jump into the water then server play water splash sound

thanking in advance.
.Dare Devil. is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 07-29-2011 , 08:31   Re: How to catch that player jump into the water.
Reply With Quote #2

It depends whether you want the splash sound to come only in deep water or also from a little puddle. Just notice that there is not a straight forward for this, you how probably have to check some flags in a think forward. If I remember right FL_INWATER is set even if you do not swim but just stand in water.
SnoW is offline
Send a message via MSN to SnoW
Aykay
Senior Member
Join Date: Jul 2009
Location: Australia
Old 07-29-2011 , 08:39   Re: How to catch that player jump into the water.
Reply With Quote #3

Search.
http://forums.alliedmods.net/showthread.php?p=503847
__________________

Aykay is offline
Send a message via MSN to Aykay
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 07-29-2011 , 08:48   Re: How to catch that player jump into the water.
Reply With Quote #4

Quote:
Originally Posted by Aykay View Post
I dont want this.

I want one call if player go to the water.
Now i understands there are no sucks forwad .

I think i need to make this with bool, like when player jump water then

water code
if bool1 = true
bool2 true
if bool2 = true
bool1 = false
bool2 = false
and my code here.

how i reset bool, how i catch when player is not in the water ?

Thanks anyway.
.Dare Devil. is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 07-29-2011 , 08:51   Re: How to catch that player jump into the water.
Reply With Quote #5

That is exactly what you want, you just do not know how to use it. In a player getting water is two subsequent occasions, the first one is that player is not in water and the second is that he is in water.
SnoW is offline
Send a message via MSN to SnoW
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 07-29-2011 , 08:55   Re: How to catch that player jump into the water.
Reply With Quote #6

Quote:
Originally Posted by SnoW View Post
That is exactly what you want, you just do not know how to use it. In a player getting water is two subsequent occasions, the first one is that player is not in water and the second is that he is in water.
Ok yes !water xD
forgot.

So i do it with client_prethink or what?
.Dare Devil. is offline
Aykay
Senior Member
Join Date: Jul 2009
Location: Australia
Old 07-29-2011 , 08:58   Re: How to catch that player jump into the water.
Reply With Quote #7

Quote:
Originally Posted by .Dare Devil. View Post
So i do it with client_prethink or what?
That seems like a pretty good idea.
__________________

Aykay is offline
Send a message via MSN to Aykay
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 07-29-2011 , 09:01   Re: How to catch that player jump into the water.
Reply With Quote #8

Quote:
Originally Posted by Aykay View Post
That seems like a pretty good idea.
Thanks, i will try now.
.Dare Devil. is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-29-2011 , 09:40   Re: How to catch that player jump into the water.
Reply With Quote #9

You can probably avoid prethink, like hooking jump and touch.
__________________
Arkshine is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 07-29-2011 , 09:43   Re: How to catch that player jump into the water.
Reply With Quote #10

Even though he used the expression jump to water, he does not mean that the player actually has to jump. I am sure the splash sound should come if you just fall from a roof to water.
SnoW is offline
Send a message via MSN to SnoW
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 02:29.


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