AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Block jump in water (https://forums.alliedmods.net/showthread.php?t=317165)

mashinata619 06-30-2019 14:10

Block jump in water
 
I have a problem and I can not find a solution.
I want to block the action of jumping when a player is in the water. I've tried with Ham_Player_Jump and Ham_Player_Duck and there's no way.

To know if the player is in the water I use pev (id, pev_waterlevel)

edon1337 06-30-2019 15:16

Re: Block jump in water
 
Add
PHP Code:

if( pevidpev_waterlevel ) ) 

to this
https://forums.alliedmods.net/showpo...9&postcount=16

mashinata619 07-01-2019 06:45

Re: Block jump in water
 
Not work...
I need that the players do not gain speed in the water doing bunny hop

wilianmaique 07-02-2019 01:26

Re: Block jump in water
 
It is only possible using orpheu

Check: https://forums.alliedmods.net/showpo...7&postcount=10

thEsp 07-02-2019 03:51

Re: Block jump in water
 
Quote:

Originally Posted by edon1337 (Post 2657308)
PHP Code:

if( pevidpev_waterlevel ) ) 


:down:
Quote:

/**
* 0 - Not in water
* 1 - Waiding
* 2 - Mostly submerged
* 3 - Completely submerged
*
* Type: integer
*/
pev_waterlevel
Code:
#define WATER_CHECK 1 if(pev(id,pev_waterlevel) == WATER_CHECK)

edon1337 07-02-2019 04:16

Re: Block jump in water
 
Quote:

Originally Posted by thEsp (Post 2657438)
:down:

Code:
if(pev(id,pev_waterlevel) != 0)

What is your point?

if(pev(id,pev_waterlevel) != 0) and if(pev(id,pev_waterlevel)) would do the same thing.

thEsp 07-02-2019 04:18

Re: Block jump in water
 
I did a mistake but that checks when can't players jump (Waiding, submerged etc).

Krtola 07-02-2019 07:09

Re: Block jump in water
 
Quote:

Originally Posted by mashinata619 (Post 2657371)
Not work...
I need that the players do not gain speed in the water doing bunny hop

Which bunny hop version do you use?
Post link here.

Natsheh 07-02-2019 07:18

Re: Block jump in water
 
Quote:

Originally Posted by Krtola (Post 2657459)
Which bunny hop version do you use?
Post link here.

You don't need a bhop plugin inorder to do water bhop jumps

OP "Also just do what edon suggested"

wilianmaique 07-02-2019 21:28

Re: Block jump in water
 
he wants to block the bunny hop in the water.


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

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