13.03.2018, 18:00
The Drunk Level drops by the amount of your FPS per SECOND.
That means using that command 2 times in 3 seconds will show the number of frames for the past 3 seconds in total.
You must calculate the time between 2 checks (eg. GetTickCount) and calculate the fps like this (using float the precision will be higher):
That will give the correct average FPS (frames/second) for a certain time interval.
That means using that command 2 times in 3 seconds will show the number of frames for the past 3 seconds in total.
You must calculate the time between 2 checks (eg. GetTickCount) and calculate the fps like this (using float the precision will be higher):
Код:
new Float:fps = float(drunklvl_difference) / (float(timepassed_in_ms) / 1000.0);