27.05.2014, 18:48
tudo que eu achei dela
pawn Код:
forward @TimerOneSecond();
//========================== [TIMERS] ================================
SetTimer("@TimerOneSecond", 1000, 1);
@TimerOneSecond()
{
// printf("GetTickCount: %d", GetTickCount());
// printf("Now: %d", Now());
gSeconds++;
gSecondsCurTime ++;
gettime(ClockTime[tHour], ClockTime[tMinute], ClockTime[tSecond]);
getdate(ClockTime[dYear], ClockTime[dMonth], ClockTime[dDay]);
#if TEMPO_REAL == 1
new wtime;
if(ClockTime[tHour] == 16) wtime = 20;
else if(ClockTime[tHour] == 17) wtime = 21;
else if(ClockTime[tHour] == 18) wtime = 21;
else if(ClockTime[tHour] == 19) wtime = 23;
else if(ClockTime[tHour] == 20) wtime = 24;
else if(ClockTime[tHour] == 21) wtime = 24;
else if(ClockTime[tHour] >= 22 && ClockTime[tHour] <= 23) wtime = 24;
else wtime = ClockTime[tHour];
#endif
for(new i; i <= HighestID; i++)
{
if(IsPlayerConnected(i))
{
Player[i][pOnlineTime] += 1;
#if TEMPO_REAL == 1
SetPlayerTime(i, wtime, 0);
#endif