Player.SetRunSpeed

From GMod Wiki

Jump to: navigation, search
Function
Syntax Player:SetRunSpeed( Number Speed )
Description:
Set the run speed of the player.
Returns: nil
In Object: Player
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Player.SetRunSpeed]Player.SetRunSpeed [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionThis will make all admins run very fast.
Used onNewerServer.png
Code
function PlayerHasSpawned(ply)
	if ply:IsAdmin() then
		ply:SetRunSpeed(2000)
	else
		ply:SetRunSpeed(500)
	end
end
hook.Add("PlayerSpawn", "PlayerSpawnHook", PlayerHasSpawned)
OutputN/A


Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox