local lastaction = 0
RegisterCommand('prntscr', function()
local year, month , day , hour, minute, second = GetUtcTime()
local idtrack = tonumber(hour..minute..second)
local spamdetek = idtrack - lastaction
if spamdetek < 0 then spamdetek = 3 end ----This Cooldown 3s
if spamdetek <= 3 and lastaction > 0 then
lastaction = idtrack
exports['okokNotify']:Alert("BodyCam", "Odesílají se data, počkejte chvíly >>nespamuj<<)", 5000, 'warning')
else
lastaction = idtrack
local view = GetFollowPedCamViewMode()
local playerPed = PlayerPedId()
local coordss = GetEntityCoords(playerPed)
if PlayerData.job.name == 'police' then
SetFollowPedCamViewMode(4)
while true do
Citizen.Wait(0)
if IsControlJustReleased(1, 38) and SetFollowPedCamViewMode(4) then
ExecuteCommand("me Fotí přes BodyCam")
TriggerServerEvent("takephoto", coordss)
exports['screenshot-basic']:requestScreenshotUpload("https://discord.com/api/webhooks/940277393489285170/WuQIniWhjmgfHegh4D9Ymv1lKScCcdqHwKbHAWFI5NDWfspwXClNn_F22FGiOPul3HVP", "files[]", function(data)
local image = json.decode(data)
end)
end
if IsControlJustReleased(1, 47) then
SetFollowPedCamViewMode(view)
ClearPedTasks(ped)
end
end
end
end
end, false)