There are already two threads about this:
https://killtube.org/showthread.php?...how-FPS-in-Hud
However this one won't work with 1.7a, because you can't run libcod and 1.7a together.
https://killtube.org/showthread.php?...l-fps-realtime
Edit:
Originally Posted by
se891
4- unrelated question any one by any change have the speedometer script (the numbers showing in the bottom of the photo are the curent speed which is changing and the max speed reached which changes only if you reach a higher speed then you did before ) ?
Something like this?
PHP Code:
calculatePlayerSpeed() {
speed = distance(self.origin, self.previousorigin); // or DistanceSquared (= cheaper/faster function)
self.previousorigin = self.origin;
return speed;
}
Call this every frame (or in the same time interval) then you will get the distance between current origin and previous origin.