GetSpeed() not working?
#11
No sorry, but it's basically just the speedCheck function above called in the movement hook
Reply
Thanks given by:
#12
Decent, need to accomplish something like this with mine.<p><br></p>
Reply
Thanks given by:
#13
BTW, the way you are calculating speed is wrong, you have to use pythagoras to get the value instead of just x + z.
The function can be used like this:
Code:
function OnPlayerMove(aPlayer, OldPosition, NewPosition)
    Displacement = math.sqrt(((NewPosition.x-OldPosition.x)*(NewPosition.x-OldPosition.x))+((NewPosition.z-OldPosition.z)*(NewPosition.z-OldPosition.z)))
end
I am developing an anticheat that uses onplayermoving so i had to go through this process too.
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)