Your way is fine, Bugsy way is more accurate but it won't help with your problem.
Your problem is that clients cvars limit clients maxspeed. Those cvars are cl_forwardspeed, cl_backspeed and cl_sidespeed. Changing them without asking clients permission is considerated as slowhacking and is not allowed.