07.06.2013, 00:06
Is it possible to put milliseconds for this
pawn Код:
gettime() + (*Here);
gettime() + (*Here);
#define GetTimeMS() ((GetTickCount() % 1000)-global_syncvalue)
new global_synctimer;
new global_syncvalue;
//In OnGamemodeInit:
new h,m;
gettime(h, m, global_syncvalue);
global_synctimer = SetTimer("TickSync", 10, 1);
//Somewhere
forward TickSync();
public TickSync() {
new h,m,s;
gettime(h, m, s);
// Approximates the millisecond time when GetTime goes up a second
if (s != global_syncvalue) {
global_syncvalue = GetTickCount()%1000-100;
KillTimer(global_synctimer);
}
}