Garry's Mod Wiki

Revision Difference

Player:StopSprinting#528719

<function name="StopSprinting" parent="Player" type="classfunc"> <description> <deprecated>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.</deprecated> When used in a <page>GM:SetupMove</page> hook, this function will prevent the player from sprinting. When +walk is engaged, the player will still be able to sprint to half speed (normal run speed) as opposed to full sprint speed without this function. </description> <realm>Shared</realm> </function> <example> <description>Example usage, disables sprinting at all times.</description> <code> hook.Add( "SetupMove", "TestFunc", function( ply, mv, cmd ) ply:StopSprinting() end ) </code> ⤶ </example></example>