Hour-function payday not working
#1

Hi,

As many of other servers I'm trying to make a payday. But I have an issue; with this code the payday isn't loading at all. It should load at every :00. What's the problem?

pawn Код:
new ghour = 0;
new gdebug = 1;
new shifthour;
new realtime = 1;

forward SyncUp();
forward SyncTime();

public SyncUp()
{
if (gdebug >= 3){printf("DEBUG SyncUp()");}
SyncTime();
ScoreUpdate();
}

public SyncTime()
{
    if (gdebug >= 3){printf("DEBUG SyncTime()");}
    new string[64];
    new tmphour;
    new tmpminute;
    new tmpsecond;
    gettime(tmphour, tmpminute, tmpsecond);
    FixHour(tmphour);
    tmphour = shifthour;
    if ((tmphour > ghour) || (tmphour == 0 && ghour == 23))
    {
        format(string, sizeof(string), "SERVER: The time is now %d:00",tmphour);
        SendClientMessageToAll(blue,string);
        if (gdebug){printf("DEBUG tmphour=%d ghour=%d",tmphour,ghour);}
        ghour = tmphour;
        PayDay();
        if (realtime)
        {
            SetWorldTime(tmphour);
        }
    }
}
Reply
#2

How are you calling the "SyncUp" function?
Reply
#3

pawn Код:
synctimer = SetTimer("SyncUp", 60000, 1);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)