Skip to content

Commit

Permalink
added date and time in description of photo
Browse files Browse the repository at this point in the history
  • Loading branch information
NeMyOriginal authored Mar 30, 2022
1 parent 2f7161f commit 8430e4a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8430e4a

Please sign in to comment.