Garry's Mod Wiki

Player:StartSprinting

Player:StartSprinting

  Player:StartSprinting()

Description

We advise against using this. It may be changed or removed in a future update. This appears to be a direct binding to internal functionality that is overridden by the engine every frame so calling these functions may not have any or expected effect.

Doesn't appear to do anything.

Example

An example alternative to this function.

local vDelay = 0 local prevDown = 0 hook.Add( "StartCommand", "TestFunc", function( ply, cmd ) if ( cmd:KeyDown( IN_FORWARD ) and prevDown == false ) then vDelay = CurTime() + 0.4 elseif ( cmd:KeyDown( IN_FORWARD ) ) then if ( vDelay < CurTime() )then cmd:SetButtons( bit.bor( cmd:GetButtons(), IN_SPEED ) ) end end prevDown = cmd:KeyDown( IN_FORWARD ) end )

Special Pages


Wikis

?

Render Time: 47ms

DB GetPage 28
Generate Html 1
SaveChanges (1) 7
Render Body 0
Render Sidebar 9