Player.SetJumpPower
From GMod Wiki
Function | |
Syntax | Player:SetJumpPower( Number power ) |
Description: | |
Set the player's "jump power" (how much upwards velocity is added when jumping). The default is 200. | |
Returns: | nil |
In Object: | Player |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Player.SetJumpPower]Player.SetJumpPower [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Example
Description | This example will make the player jump like The Incredible Hulk. |
---|---|
Used on | |
Code | ply:SetJumpPower( 1500 ) |
Output | N/A |
Notes
- This function merely changes the Z velocity applied to the player when they jump. To disable jumping you'll also have to alter the player's input using the CreateMove hook.
- Because the maximum velocity in Source is 2000in/s, a value greater than 2000 for the power will not have any more effect than if the power was 2000 unless the player is falling downwards.
- For some reason, when you run GetJumpPower on a player at server start, it returns 160, even though it's been proven that the default jump power is actually 200. Bug?