AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to catch that player jump into the water. (https://forums.alliedmods.net/showthread.php?t=163335)

.Dare Devil. 07-29-2011 07:33

How to catch that player jump into the water.
 
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.

SnoW 07-29-2011 08:31

Re: How to catch that player jump into the water.
 
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.

Aykay 07-29-2011 08:39

Re: How to catch that player jump into the water.
 
Search.
http://forums.alliedmods.net/showthread.php?p=503847

.Dare Devil. 07-29-2011 08:48

Re: How to catch that player jump into the water.
 
Quote:

Originally Posted by Aykay (Post 1520974)

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. :)

SnoW 07-29-2011 08:51

Re: How to catch that player jump into the water.
 
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.

.Dare Devil. 07-29-2011 08:55

Re: How to catch that player jump into the water.
 
Quote:

Originally Posted by SnoW (Post 1520993)
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? :)

Aykay 07-29-2011 08:58

Re: How to catch that player jump into the water.
 
Quote:

Originally Posted by .Dare Devil. (Post 1520996)
So i do it with client_prethink or what? :)

That seems like a pretty good idea.

.Dare Devil. 07-29-2011 09:01

Re: How to catch that player jump into the water.
 
Quote:

Originally Posted by Aykay (Post 1520999)
That seems like a pretty good idea.

Thanks, i will try now. :)

Arkshine 07-29-2011 09:40

Re: How to catch that player jump into the water.
 
You can probably avoid prethink, like hooking jump and touch.

SnoW 07-29-2011 09:43

Re: How to catch that player jump into the water.
 
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.


All times are GMT -4. The time now is 00:57.

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