SA-MP Forums Archive
SyncTime problem +REP - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: SyncTime problem +REP (/showthread.php?tid=360384)



SyncTime problem +REP - RenSoprano - 17.07.2012

Hello guys this can someone help with synctime it doesn't work please help +REP


pawn Код:
public 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 hours",tmphour);
        SendClientMessageToAll(COLOR_WHITE,string);
        ghour = tmphour;
        Payday();
        if (realtime)
        {
            SetWorldTime(tmphour);
        }
    }
}



Re: SyncTime problem +REP - BlackBank - 17.07.2012

Quote:
Originally Posted by RenSoprano
Посмотреть сообщение
Hello guys this can someone help with synctime it doesn't work please help +REP


pawn Код:
public 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 hours",tmphour);
        SendClientMessageToAll(COLOR_WHITE,string);
        ghour = tmphour;
        Payday();
        if (realtime)
        {
            SetWorldTime(tmphour);
        }
    }
}
Just remove this code:
pawn Код:
|| (tmphour == 0 && ghour == 23)



Re: SyncTime problem +REP - RenSoprano - 17.07.2012

It doesn't work please help


Re: SyncTime problem +REP - TheArcher - 17.07.2012

I think you took that from PR-RP script . However, can you show us whats inside FixHour ?


Re: SyncTime problem +REP - hansen111 - 17.07.2012

Where does shifthour come from? I dont see where it gets any value assigned to it, pretty important because you do: tmphour = shifthour; and tmphour is pretty much the most important value in the script.


Re: SyncTime problem +REP - RenSoprano - 17.07.2012

Here is my FixHour code

pawn Код:
public FixHour(hour)
{
    hour = timeshift+hour;
    if (hour < 0)
    {
        hour = hour+24;
    }
    else if (hour > 23)
    {
        hour = hour-24;
    }
    shifthour = hour;
    return 1;
}



Re: SyncTime problem +REP - RenSoprano - 18.07.2012

Can someone help me please!!!!!


Re: SyncTime problem +REP - RenSoprano - 21.07.2012

BUMP!!!


Re: SyncTime problem +REP - SuperViper - 21.07.2012

You shouldn't be using the NGG leaked script. It's leaked so therefore they didn't want everyone else messing with their code.


Re: SyncTime problem +REP - [A]ndrei - 21.07.2012

lol if its a copied gamemode bring it back to how it was or it will not work...and thats called copy right you have get banned from samp for doing that (i think :P)