Player.SetMaxSpeed
From GMod Wiki
Function | |
Syntax | Player:SetMaxSpeed( Integer MaxSpeed ) |
Description: | |
Sets the player's maximum speed. Sprinting resets maximum speed. | |
Returns: | nil |
In Object: | Player |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Player.SetMaxSpeed]Player.SetMaxSpeed [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Example
Description | Makes everyone run like crazy |
---|---|
Used on | |
Code | for i, ply in pairs(player.GetAll()) do if ( ply:IsValid() ) then ply:SetMaxSpeed(5000) end end |
Output | N/A |
Additional Notes
- Default is 200.
- Sprinting resets this.
- This function doesn't seem to work, the players speed does not change. Use GAMEMODE:SetPlayerSpeed instead
- GAMEMODE:SetPlayerSpeed uses this function.