22.09.2015, 16:11
The client doesn't update it's time in case if we've paused the game. I noticed this when I ran a repeating timer to display some message. If we're paused, the timestamp keeps showing the same value for messages until we're back into game. I was quite confused whether my timer got spammed and debugged it using GetTickCount function.
I paused my game when it showed the first debug message and after few minutes, when I resumed, this is what I've got. The last debug message was received when I was active in game. This issue is also there on Chatlog.txt.
Chatlog:
The script that I used to debug :
EDIT : Just found that this same issue was reported 5 years ago, yet the problem persists!
I paused my game when it showed the first debug message and after few minutes, when I resumed, this is what I've got. The last debug message was received when I was active in game. This issue is also there on Chatlog.txt.
Chatlog:
Code:
[21:30:12] Connected. Joining the game... [21:30:12] Connected to {B9C9BF}SA-MP 0.3 Server [21:30:30] Testing | Tick : 273871639 [21:33:53] Testing | Tick : 273892594 [21:33:53] Testing | Tick : 273913417 [21:33:53] Testing | Tick : 273934344 [21:33:53] Testing | Tick : 273955272 [21:33:53] Testing | Tick : 273976129 [21:33:53] Testing | Tick : 273997079 [21:33:53] Testing | Tick : 274018018 [21:33:53] Testing | Tick : 274038805 [21:33:53] Testing | Tick : 274059755 [21:33:59] Testing | Tick : 274080729
pawn Code:
#include <a_samp>
new
g_Timer;
public OnFilterScriptInit() {
g_Timer = SetTimer("CTimeStamp", 1000 * 20, true);
print("Loaded CTimeStamp");
return 1;
}
public OnFilterScriptExit() {
KillTimer(g_Timer);
return 1;
}
forward CTimeStamp();
public CTimeStamp() {
new
temp_String[50];
format(temp_String, sizeof(temp_String), "Testing | Tick : %d", GetTickCount());
SendClientMessageToAll(-1, temp_String);
return 1;
}