Jump to content
Sign in to follow this  
Mesut

Server time

Recommended Posts

i have a issue to start the server time i have found a script on functions this script but is it for server time, pls need some guide to start server time.

Here is the script

 

function CheckTime ( role )
    local now_week= os.date("%w")        -------------���ڼ���ʮ���ƣ� 
    local now_hour= os.date("%H")        -------------ʱ 
    now_week= tonumber(now_week)
    now_hour= tonumber(now_hour)
-- SystemNotice( role, "����".. now_week.." ʱ��".. now_hour)
    if now_week == 6 then
        if now_hour >= 6 and now_hour < 8 then
            return LUA_TRUE
        elseif now_hour >= 18 and now_hour < 20 then
            return LUA_TRUE
        end
    end
end

 

also is there anything else i have to do to start server time?

Share this post


Link to post
Share on other sites

Server time is just the Operating System (OS) local time. You can get it in C++ using std::time/std::chrono libraries.


"Beware of bugs in the above code; I have only proved it correct, not tried it."

- Donald E. Knuth

Share this post


Link to post
Share on other sites
20 hours ago, Mesut said:

U can find it on itemeffect .lua in script server side!!

Mesut, do you have discord? I have a question to ask you

 

Share this post


Link to post
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
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

Sign in to follow this  

×
×
  • Create New...