Jump to content
  • 0

Bug Zile


RusKo69

Question

7 answers to this question

Recommended Posts

  • 0

public SyncUp()
{
    foreach(Player, i) {
        if(IsPlayerConnected(i)) {
            if(PlayerTime != 0) PlayerTime --;
            if(PlayerTime2 != 0) PlayerTime2 --;
            if(PlayerTime3 != 0) PlayerTime3 --;
            if(PlayerTime4 != 0) PlayerTime4 --;
            if(PlayerTime5 != 0) PlayerTime5 --;
            if(PlayerTime6 != 0) PlayerTime6 --;
            if(PlayerTime7 != 0) PlayerTime7 --;
            if(PlayerTime8 != 0) PlayerTime8 --;
            if(PlayerTime10 != 0) PlayerTime10 --;
            if(PlayerInfo[pMember] != 0) PlayerInfo[pDays] ++;
        }
    }
    new tmphour;
    new tmpminute;
    new tmpsecond;
    new hour,minn,sec;
    gettime(hour,minn,sec);
    gettime(tmphour, tmpminute, tmpsecond);
    FixHour(tmphour);
    tmphour = shifthour;
    if ((tmphour > ghour) || (tmphour == 0 && ghour == 23))
    {
        ghour = tmphour;
        PayDay();
        if(hour == 0) {
            new query[256];
            format(query, sizeof(query), "UPDATE `users` SET `DayLogin`='0'");
            mysql_query(SQL, query);
            format(query, sizeof(query), "UPDATE `users` SET `Days`=`Days`+1 WHERE `Member`>'0'");
            mysql_query(SQL, query);
            format(query, sizeof(query), "UPDATE `users` SET `ClanDays`=`ClanDays`+1 WHERE `Clan`>'0'");
            mysql_query(SQL, query);
        }
        if(hour == 23)
        {
            new str[256];
            for(new turf = 1; turf < sizeof(TurfInfo); turf++)
            {
                TurfInfo[turf][zTime] = 0;
                format(str,sizeof(str),"UPDATE `turfs` SET `Time`='0' WHERE `ID`='%d'",turf);
                mysql_query(SQL,str);
            }
        }
        
        if (realtime)
        {
            SetWorldTime(hour);
        }
    }    
    return 1;
}

Link to comment
Share on other sites

  • 0
1 oră în urmă, RusKo69 a spus:

public SyncUp()
{
    foreach(Player, i) {
        if(IsPlayerConnected(i)) {
            if(PlayerTime != 0) PlayerTime --;
            if(PlayerTime2 != 0) PlayerTime2 --;
            if(PlayerTime3 != 0) PlayerTime3 --;
            if(PlayerTime4 != 0) PlayerTime4 --;
            if(PlayerTime5 != 0) PlayerTime5 --;
            if(PlayerTime6 != 0) PlayerTime6 --;
            if(PlayerTime7 != 0) PlayerTime7 --;
            if(PlayerTime8 != 0) PlayerTime8 --;
            if(PlayerTime10 != 0) PlayerTime10 --;
            if(PlayerInfo[pMember] != 0) PlayerInfo[pDays] ++;
        }
    }
    new tmphour;
    new tmpminute;
    new tmpsecond;
    new hour,minn,sec;
    gettime(hour,minn,sec);
    gettime(tmphour, tmpminute, tmpsecond);
    FixHour(tmphour);
    tmphour = shifthour;
    if ((tmphour > ghour) || (tmphour == 0 && ghour == 23))
    {
        ghour = tmphour;
        PayDay();
        if(hour == 0) {
            new query[256];
            format(query, sizeof(query), "UPDATE `users` SET `DayLogin`='0'");
            mysql_query(SQL, query);
            format(query, sizeof(query), "UPDATE `users` SET `Days`=`Days`+1 WHERE `Member`>'0'");
            mysql_query(SQL, query);
            format(query, sizeof(query), "UPDATE `users` SET `ClanDays`=`ClanDays`+1 WHERE `Clan`>'0'");
            mysql_query(SQL, query);
        }
        if(hour == 23)
        {
            new str[256];
            for(new turf = 1; turf < sizeof(TurfInfo); turf++)
            {
                TurfInfo[turf][zTime] = 0;
                format(str,sizeof(str),"UPDATE `turfs` SET `Time`='0' WHERE `ID`='%d'",turf);
                mysql_query(SQL,str);
            }
        }
        
        if (realtime)
        {
            SetWorldTime(hour);
        }
    }    
    return 1;
}

Se apeleaza doar odata pe zi acest timer? Eu nu prea cred

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.