SyncTime problem +REP
#1

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);
        }
    }
}
Reply
#2

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)
Reply
#3

It doesn't work please help
Reply
#4

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

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.
Reply
#6

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;
}
Reply
#7

Can someone help me please!!!!!
Reply
#8

BUMP!!!
Reply
#9

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

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)
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)