CMoveData.GetForwardSpeed

From GMod Wiki

Jump to: navigation, search
Function
Syntax MoveData:GetForwardSpeed( )
Description:
Returns the players forward speed
Returns: Number
In Object: Cmovedata
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=CMoveData.GetForwardSpeed]CMoveData.GetForwardSpeed [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionMake the player move up as they increase in speed.
Used onNewerShared.png
Code
 
function GM:SetupMove( PLAYER, MOVE )
    if (MOVE:GetForwardSpeed() > 100) then
        MOVE:SetUpSpeed(100) // make the player move up as they increase in speed.
    end
end
 
OutputNothing


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox