From 8430e4a6b45428d0079dc85b2221cc899ca1878f Mon Sep 17 00:00:00 2001 From: Nemanja <71012671+NeMyOriginal@users.noreply.github.com> Date: Thu, 31 Mar 2022 01:26:13 +0200 Subject: [PATCH] added date and time in description of photo --- server.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server.lua b/server.lua index 12db8fe..a0da5ac 100644 --- a/server.lua +++ b/server.lua @@ -8,12 +8,13 @@ ESX.RegisterUsableItem("camera", function(source, item) end) RegisterNetEvent("wert-camera:server:add-photo-item", function(url) + local time = os.date('*t') local src = source local ply = ESX.GetPlayerFromId(source) if ply then local info = { photourl = string.gsub(url, '\"', '"'), - description = 'Photo taken with Canon EOS M50' + description = 'Photo taken with Canon EOS M50 \n Date and Time: ' .. time.day .. '/' .. time.month .. '/' .. time.year .. ' - ' .. time.hour .. ':' .. time.min } exports.ox_inventory:AddItem(source, 'photo', 1, info) end