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


Messages In This Thread
Hour-function payday not working - by DaRoderick - 28.11.2012, 15:17
Re: Hour-function payday not working - by PlayLSX_Founder - 28.11.2012, 15:20
Re: Hour-function payday not working - by DaRoderick - 28.11.2012, 15:47

Forum Jump:


Users browsing this thread: 2 Guest(s)