Player/StopSprinting

From Garry's Mod
Jump to: navigation, search
 Player:StopSprinting( )

Description

This feature is deprecated.
You should avoid using it as it may be removed in a future version.

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.

When used in a GM:SetupMove 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.

Examples

Example

Example usage, disables sprinting at all times.

hook.Add( "SetupMove", "TestFunc", function( ply, mv, cmd )
	ply:StopSprinting()
end )


Personal tools
Navigation