Wie stelle ich uhr in Gf ein?

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • Guten Tag liebe user habe problem und zwar: ist uhr ingame jeds: 20:15 Uhr. Aber world time steht 22:00 uhr.


    //edit


    Die Uhr:
    InGamemodin
    gettime(ghour, gminute, gsecond);
    FixHour(ghour);
    ghour = shifthour;
    if(!realtime)
    {
    SetWorldTime(wtime);
    }


    if (realtime)
    {
    new tmphour;
    new tmpminute;
    new tmpsecond;
    gettime(tmphour, tmpminute, tmpsecond);
    FixHour(tmphour);
    tmphour = shifthour;
    SetWorldTime(tmphour+1);
    }


    //edit 2


    Sry wegen doppelt edit


    Public:
    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), "Deine Uhr: Es ist %d:00 Uhr",tmphour);
    BroadCast(COLOR_WHITE,string);
    ghour = tmphour;
    PayDay();
    if (realtime)
    {
    SetWorldTime(tmphour);
    }
    }
    }

    2 Mal editiert, zuletzt von GNOM3 ()