AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   +jump (https://forums.alliedmods.net/showthread.php?t=21805)

SubFive 12-10-2005 22:00

+jump
 
I would have used this from the doc:
Code:
public MovePlayer(id) {     new origin[3]     get_user_origin(id, origin, 0)  // Gets the current location the player is at     origin[2] = origin[2] + 10    // Adds + 10 to the player's height     set_user_origin(id, origin)   // Moves the player to the location stored in origin }
But that could be abused so people went through the ceilings when the ceilings are low. I searched and looked through bunny hop scripts, #define IN_JUMP, #define FL_ONGROUND, #define FL_WATERJUMP, and couldn't piece it together to make it work.

What I'm trying to do is that when the function is executed, it makes the player jump, so this way he can't go through the ceiling.

watch 12-10-2005 22:13

what about just running a command on the client i.e.

Code:
client_cmd(id,"+jump")

you might also have to do -jump, so try this is the above isnt working right
Code:
client_cmd(id,"+jump;-jump")

SubFive 12-10-2005 22:34

Quote:

Originally Posted by watch
what about just running a command on the client i.e.

Code:
client_cmd(id,"+jump")

you might also have to do -jump, so try this is the above isnt working right
Code:
client_cmd(id,"+jump;-jump")

:oops:

I made it a lot more complicated than it needed to be. Thanks!

SubFive 12-10-2005 22:36

One last thing, is there anyway to tell at what part a person is of a jump. I'd like to execute a function but only if hes at the peak of the jump, right before he starts decending, and not anytime before hand.

Xanimos 12-10-2005 23:13

Nope. You can make a command so the user needs to have good timing....I'm guessing a double jump type of thing?

SubFive 12-10-2005 23:18

Trying to lower the users gravity, but I only want it to be lowered if its at about the middle of the jump (peak), or anytime afterwards. If hes not even in the air, the function will exec a +jump.

SubFive 12-10-2005 23:43

So theres no way to detect if someone used +jump, and then wait a few seconds and exec a function?

Twilight Suzuka 12-11-2005 01:23

Oh, there are plenty ways to do this.

XxAvalanchexX 12-11-2005 01:24

Check if a player is not on the ground and if his fall velocity is close to 0.


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

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