Player.SetDuckSpeed
From GMod Wiki
Function | |
Syntax | Player:SetDuckSpeed( Number Time in seconds. ) |
Description: | |
Sets the time in seconds it takes for the player to move from standing upright to ducking. | |
Returns: | nil |
In Object: | Player |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Player.SetDuckSpeed]Player.SetDuckSpeed [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Description | Makes the player take two seconds to duck. |
---|---|
Used on | |
Code | Player:SetDuckSpeed( 2 ) |
Output | N/A |
Additional Notes
- Put this in the gamemode's shared.lua if you want correct crouch prediction. Otherwise, the client's duck speed will be out-of-sync with the server's duck speed and things will get messed up.