Okay, I’m trying to use **[Player.GetCurrentCommand
http://wiki.garrysmod.com/favicon.ico](http://wiki.garrysmod.com/?title=Player.GetCurrentCommand)** to get when a player moves their mouse serverside, although it works fine anywhere clientside, serverside it seems to give this error when used:
] lua_run print( player.GetAll():GetCurrentCommand():GetMouseX() ) > print( player.GetAll():GetCurrentCommand():GetMouseX() )... [@lua_run:1] Tried to use invalid object (type CUserCmd) (Object was NULL or not of the right type)
However it does seem to work when used in **[Gamemode.Move
http://wiki.garrysmod.com/favicon.ico](wiki.garrysmod.com/?title=Gamemode.Move)**, this worked fine on my listen server, however on my dedicated server everything was extremely laggy when done like this. Putting my movement code in a Think hook worked fine because I could use **[Player.KeyDown
Any suggestions on how I could do this without it lagging so much?