Gamemode.Move

From GMod Wiki

Jump to: navigation, search
Event Hook
Hook NameMove
SyntaxGM:Move( Player ply, Cmovedata move )
DescriptionThis basically overrides the NOCLIP, PLAYERMOVE movement stuff. It's what actually performs the move. This function returns CMoveData, so return the data argument. The movement effects you get are based on how you modify the CMoveData. Return data to use normal movements.
ReturnsCmovedata
Lua StateNewerShared.png
BBCode[b][url=wiki.garrysmod.com/?title=Gamemode.Move]Gamemode.Move [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]

Examples

DescriptionMakes all players fly upwards.
Used onNewerServer.png
Code
function Weeeee(ply, data)
	data:SetVelocity(Vector(0, 0, 1000))
end
hook.Add("Move", "Weeeeeeeeeeee!!", Weeeee)
OutputN/A


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox