Jump to content
Snovie

Adding server time/clock in game

Recommended Posts

Yes, it is. Reference: https://www.lua.org/pil/22.1.html

get_local_time = get_local_time or function()
  return os.date("Current time: %X")
end

print(get_local_time())

I'm not sure what lua version top server files run on but I assume it should work, you've got to replace the print statement though with say SystemNotice(role, get_local_time())

Edited by patrick13

Share this post


Link to post
Share on other sites
5 minutes ago, patrick13 said:

Yes, it is. Reference: https://www.lua.org/pil/22.1.html


get_local_time = get_local_time or function()
  return os.date("Current time: %X")
end

print(get_local_time())

I'm not sure what lua version top server files run on but I assume it should work, you've got to replace the print statement though with say SystemNotice(role, get_local_time())

Wait, i mean as its displayed on top of the screen itself as of all the time, like top right next to the map itself, and will tick automaticly (kind of like a mod)

Share this post


Link to post
Share on other sites
30 minutes ago, Satan said:

Hello @Snovie!

 

I think for doing that you must edit game.exe or src and also edit UI in order to display at client. Thought lua is possible doing a ads system, something as like @patrick13 showed.

Not possible to put a Client MOD like v3ctor has added for Discord on it?

Share this post


Link to post
Share on other sites

Oh sorry I misunderstood the question. I reckon it would require edits on both client and server considering that you'd prefer to control it via server.

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.


×
×
  • Create New...