here's a vauge qc reimplementation of player physics that I wrote aaaages ago and never quite polished:
https://sourceforge.net/p/fteqw/code/HE ... n/pmove.qcit has more of an NQ feel than a QW feel, however, as it re-uses some code that LordHavoc originally ported from the nq engine to qc, so its also GPLed as mentioned in the file.
the engine's runstandardplayerphysics builtin is somewhat similar to it, so it should give you a feel for what's going on.
basically, the server sets the input_* globals according to whatever the client sent, then calls your qc function so that you can do whatever you want with it. one trick is to just tweak the inputs and then just forward that on to the engine's implementation of player physics - this prevents prediction getting too broken, at least.
or you can figure out the direction the player appears to want to move in, accelerate towards that according to whatever weights you want, then apply gravity+friction, then try and move the player with tracebox, and clip the velocity according to whichever surfaces you hit. Or you could use movestep for really lame player physics.
the full thing can be a bit fiddly, in part because tracebox isn't aware of steps, requiring special logic to move up over them etc.
just directly hacking the velocity without considering input_timelength will make your player physics highly dependant upon the rate at which your client sends packets at the server. this is not a good situation. you're better off manipulating input_movevalues instead (and probably sv_maxspeed too).
.