forked from Simnation/Main
ed
This commit is contained in:
parent
11f13737e3
commit
61abf09cd9
12 changed files with 4602 additions and 0 deletions
23
resources/[tools]/cc-chat-1/client/main.lua
Normal file
23
resources/[tools]/cc-chat-1/client/main.lua
Normal file
|
@ -0,0 +1,23 @@
|
|||
function getTimestamp()
|
||||
local meridiem = 'AM'
|
||||
year , month , day , hour , minute , second = ''
|
||||
if GetGameName() == 'fivem' then
|
||||
year , month , day , hour , minute , second = GetLocalTime()
|
||||
elseif GetGameName() == 'redm' then
|
||||
year , month , day , hour , minute , second = GetPosixTime()
|
||||
end
|
||||
if hour >= 13 then
|
||||
hour = hour - 12
|
||||
meridiem = 'PM'
|
||||
end
|
||||
if hour == 12 then
|
||||
meridiem = 'PM'
|
||||
end
|
||||
if minute <= 9 then
|
||||
minute = '0' .. minute
|
||||
end
|
||||
timestamp = hour .. ':' .. minute .. ' ' .. meridiem
|
||||
return timestamp
|
||||
end
|
||||
|
||||
exports('getTimestamp', getTimestamp)
|
Loading…
Add table
Add a link
Reference in a new issue