[Help] Server Date and Time

Results 1 to 9 of 9
  1. #1
    Apprentice 2Hard4You is offline
    MemberRank
    Jan 2017 Join Date
    13Posts

    [Help] Server Date and Time

    Hey i wanted to make a RP Server with a decent story and the Map Should be like 24 H day/night so Real Time .. and this is already Done now i have a Other Problem How do i set the Server Date from for example 18.2.2058 to 12.4.2017 and get the Real Time


  2. #2
    Account Upgraded | Title Enabled! Oosmar02 is offline
    MemberRank
    Sep 2013 Join Date
    FranceLocation
    894Posts

    Re: [Help] Server Date and Time

    Look function like "CompresedTime"

    - - - Updated - - -

    ps : For make zone work for rp use function mission zone :)

  3. #3
    Proficient Member Burak DatLife is offline
    MemberRank
    Jan 2015 Join Date
    inetpub/wwwrootLocation
    173Posts

    Re: [Help] Server Date and Time

    Quote Originally Posted by Oosmar02 View Post
    Look function like "CompresedTime"

    - - - Updated - - -

    ps : For make zone work for rp use function mission zone :)

    Yep , you can do it like that or check isCloseToNPC function for make it fully serverside.

    Also it sounds interesting , if you want to share you development stage you can open thread about it.

  4. #4
    Account Upgraded | Title Enabled! Oosmar02 is offline
    MemberRank
    Sep 2013 Join Date
    FranceLocation
    894Posts

    Re: [Help] Server Date and Time

    I am open to any help to get a RP project!

    - - - Updated - - -

    Other idea :

    - Modifiy loot time pick up for specific objet and make zone for drop item and it gives you another item or money

  5. #5
    Lost in Tha Space Kuchen is offline
    MemberRank
    Apr 2013 Join Date
    GermanyLocation
    476Posts

    Re: [Help] Server Date and Time

    i Guess we should Build a Skype Group and Create a RP server together ^^ would be something complete new

  6. #6
    Account Upgraded | Title Enabled! Oosmar02 is offline
    MemberRank
    Sep 2013 Join Date
    FranceLocation
    894Posts

    Re: [Help] Server Date and Time

    I have ts server for create RP :)

    (is old ts infestationtraining )
    ts1.privateheberg.fr:10028

  7. #7
    Lost in Tha Space Kuchen is offline
    MemberRank
    Apr 2013 Join Date
    GermanyLocation
    476Posts

    Re: [Help] Server Date and Time

    ill join tomorrow need to go sleep ^^

  8. #8
    Apprentice 2Hard4You is offline
    MemberRank
    Jan 2017 Join Date
    13Posts

    Re: [Help] Server Date and Time

    Yeah Would be rly Cool if we Could get a Nice Group of Dev together : ) but let us use discord pls :)) and btw ty @Oosmar02 it Helped me : )) and For the Progress its rly slow due i dont know that much about C++ ^^

  9. #9
    My Status --> LukasCCB is offline
    MemberRank
    Apr 2013 Join Date
    CracolandiaLocation
    1,190Posts

    Re: [Help] Server Date and Time

    Solution: WarZ.sln
    File: HUDPause.cpp
    Search by
    Code:
    void HUDPause::setTime(__int64 utcTime)
    View and study the code shown below
    Code:
    void HUDPause::setTime(__int64 utcTime){    const static char* months[12] = {        "January",        "February",        "March",        "April",        "May",        "June",        "July",        "August",        "September",        "October",        "November",        "December"    };    struct tm* tm = _gmtime64(&utcTime);    char date[128];    char time[128];    sprintf(date, "%s %d, %d", gLangMngr.getString(months[tm->tm_mon]), tm->tm_mday, 1900 + tm->tm_year);    sprintf(time, "%02d:%02d", tm->tm_hour, tm->tm_min);    Scaleform::GFx::Value var[2];    var[0].SetString(date);    var[1].SetString(time);    gfxMovie.Invoke("_root.api.setTime", var, 2);}
    You can make changes, I believe.

    - - - Updated - - -

    Here is the code for 24 hours in game, only change to real time world.

    Code:
    void ClientGameLogic::SetServerGameTime(int hour, int min) {     //SetServerGameTime(12, 0); will set it to 12     __int64 gameUtcTime = gClientLogic().GetServerGameTime();    struct tm* tm = _gmtime64(&gameUtcTime);    r3d_assert(tm);    gClientLogic().gameStartUtcTime_ -= tm->tm_sec;    gClientLogic().gameStartUtcTime_ -= (tm->tm_min) * 60;    gClientLogic().gameStartUtcTime_ += (hour - tm->tm_hour) * 60 * 60;    gClientLogic().gameStartUtcTime_ += (min) * 60;    gClientLogic().lastShadowCacheReset_ = -1; }



Advertisement