If you would like to add this HUD in your project, feel free to do so, remember to add the credit to me.
- FiveM HUD - show the actual time in life
- No any dependencies files or framework
- Can be use for any framework in FiveM
- My first project for FiveM
- Show the actual time in life
- Changeable time zone and format of the time (Setting, Language of the HUD)
- The HUD will be hide when the pause menu is showing
- Extract the file
- Rename it to
rockjai_time_hud
- Drop it into you resouces file
- Add
ensure rockjai_time_hud
in yourserver.cfg
orresouces.cfg
or whatever you call it
- No dependencies are required for this hud
You can change the time zone, language and format of the time in this hud easily.
- You can look up the
timezone_and_format_list
to check what format and time zone is avaliable
Change the for format in this code: script.js
-
function setDatetime(){ if(isOpen == true){ document.getElementById("datetime").innerHTML = new Date().toLocaleString("zh-hk", { timeZone: "Asia/Hong_Kong" }); setTimeout(setDatetime, 500); } }
Change the
zh-hk
andAsia/Hong_Kong
to your one in thetimezone_and_format_list
The default language of this HUD are Chinese Traditional(Hong Kong), you can easily change the language in the ui.html
<body>
<p id="time">現正時間為: <span id="datetime"></span></p>
<!--"現正時間為:" = "now time is", translate this to your language-->
</body>
現正時間為
in the second line means Current time is
in Cantonese, you can easily change this to you language.
<body>
<p id="time">Current time is: <span id="datetime"></span></p>
<!--"現正時間為:" = "now time is", translate this to your language-->
</body>
Scorpion01 for helping me to improve the HUD, which makes the HUD a lot better❤️