diff --git a/resources/[inventory]/cs_shops/config/config.lua b/resources/[inventory]/cs_shops/config/config.lua index cd58b52b4..bded64345 100644 --- a/resources/[inventory]/cs_shops/config/config.lua +++ b/resources/[inventory]/cs_shops/config/config.lua @@ -1311,8 +1311,18 @@ CodeStudio.Products = { itemPrice = 50, itemInfo = "", }, - - + ['Bodycam'] = { + itemName = "Bodycam", + itemStock = 150, + itemPrice = 50, + itemInfo = "", + }, + ['Dashcam'] = { + itemName = "Dashcam", + itemStock = 150, + itemPrice = 50, + itemInfo = "", + }, } diff --git a/resources/[inventory]/cs_shops/ui/image/bodycam.png b/resources/[inventory]/cs_shops/ui/image/bodycam.png new file mode 100644 index 000000000..3cbd45566 Binary files /dev/null and b/resources/[inventory]/cs_shops/ui/image/bodycam.png differ diff --git a/resources/[inventory]/cs_shops/ui/image/dashcam.png b/resources/[inventory]/cs_shops/ui/image/dashcam.png new file mode 100644 index 000000000..6457a6949 Binary files /dev/null and b/resources/[inventory]/cs_shops/ui/image/dashcam.png differ diff --git a/resources/[inventory]/inventory_images/images/bodycam.png b/resources/[inventory]/inventory_images/images/bodycam.png new file mode 100644 index 000000000..3cbd45566 Binary files /dev/null and b/resources/[inventory]/inventory_images/images/bodycam.png differ diff --git a/resources/[inventory]/inventory_images/images/dashcam.png b/resources/[inventory]/inventory_images/images/dashcam.png new file mode 100644 index 000000000..6457a6949 Binary files /dev/null and b/resources/[inventory]/inventory_images/images/dashcam.png differ diff --git a/resources/[inventory]/tgiann-inventory/items/items.lua b/resources/[inventory]/tgiann-inventory/items/items.lua index e752b096f..307492aa9 100644 --- a/resources/[inventory]/tgiann-inventory/items/items.lua +++ b/resources/[inventory]/tgiann-inventory/items/items.lua @@ -10401,5 +10401,28 @@ itemsData = { image = 'kq_winch.png', name = 'kq_winch', }, + bodycam = { + shouldClose = true, + type = 'item', + description = '', + weight = 500, + label = 'Bodycam', + unique = true, + useable = true, + image = 'bodycam.png', + name = 'bodycam', + }, + dashcam = { + shouldClose = true, + type = 'item', + description = '', + weight = 500, + label = 'Dashcam', + unique = true, + useable = true, + image = 'dashcam.png', + name = 'dashcam', + }, + } diff --git a/resources/[jobs]/[police]/[spy-bodycam]/spy-bodycam/client/client.lua b/resources/[jobs]/[police]/[spy-bodycam]/spy-bodycam/client/client.lua new file mode 100644 index 000000000..4104bbc54 --- /dev/null +++ b/resources/[jobs]/[police]/[spy-bodycam]/spy-bodycam/client/client.lua @@ -0,0 +1,1223 @@ +PlayerJob = nil +local bodycam = nil +local targetPed = nil +local targetPedId = nil +local goBackCoords = nil +local PlyInCam = false +local PlyInSelfCam = false +local PlyInCarCam = false +local bcamstate = false +local carCam = false +local onRec = false + +-- for prop and ped +local propNetID = nil +local pedProps = {} +local charPed = {} + +--------Resource Start +AddEventHandler('onResourceStart', function(resourceName) + if (GetCurrentResourceName() ~= resourceName) then return end + PlayerJob = GetPlayerDataCore().job +end) +AddEventHandler('onResourceStop', function(resourceName) + if GetCurrentResourceName() == resourceName then + if propNetID and DoesEntityExist(NetworkGetEntityFromNetworkId(propNetID)) then + local propEntity = NetworkGetEntityFromNetworkId(propNetID) + DeleteEntity(propEntity) + propNetID = nil + end + if PlyInCam or PlyInCarCam then + ForceQuitBodyCam() + end + if PlyInSelfCam then + ForceQuitBodyCamSelf() + end + for k,v in pairs(pedProps)do + if v and DoesEntityExist(v) then + DeleteEntity(v) + end + end + for k,v in pairs(charPed)do + if v then + if DoesEntityExist(v) then + DeleteEntity(v) + end + end + end + end +end) + +if Config.Framework == 'qb' then + ---------PlayerLoaded + RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function() + PlayerJob = GetPlayerDataCore().job + end) + + ---------Job Update + RegisterNetEvent('QBCore:Client:OnJobUpdate', function(JobInfo) + PlayerJob = JobInfo + end) +else + -- PlayerLoaded + RegisterNetEvent('esx:playerLoaded') + AddEventHandler('esx:playerLoaded',function(xPlayer, isNew, skin) + PlayerJob = xPlayer.job + end) + + -- Job Update + RegisterNetEvent('esx:setJob') + AddEventHandler('esx:setJob', function(JobInfo) + PlayerJob = JobInfo + end) +end + +RegisterNetEvent('spy-bodycam:startWatchingDashcam',function(netId) + local targetCoords = lib.callback.await('spy-bodycam:servercb:getCarCoords', false, netId) + if not targetCoords then + NotifyPlayer('Car not found!', 'error', 2500) + SetTimeout(3000, function() + OpenWatch(false) + end) + return + end + targetPedId = netId + LocalPlayer.state:set("inv_busy", true, true) TriggerEvent('inventory:client:busy:status', true) TriggerEvent('canUseInventoryAndHotbar:toggle', false) + DoScreenFadeOut(1000) + while not IsScreenFadedOut() do + Wait(100) + end + FreezeEntityPosition(cache.ped, true) + SetEntityVisible(cache.ped, false) -- Set invisible + SetEntityCollision(cache.ped, false, false) -- Set collision + SetEntityInvincible(cache.ped, true) -- Set invincible + NetworkSetEntityInvisibleToNetwork(cache.ped, true) -- Set invisibility + SetEntityCoords(cache.ped, targetCoords.x, targetCoords.y, targetCoords.z - 100.0) + if Config.Framework == 'qb' then + TriggerServerEvent('spy-bodycam:server:ReqDecoyPed',GetPlayerDataCore().citizenid,goBackCoords) + elseif Config.Framework == 'esx' then + TriggerServerEvent('spy-bodycam:server:ReqDecoyPed',GetPlayerDataCore().identifier,goBackCoords) + end + Wait(500) + bodycam = CreateCam("DEFAULT_SCRIPTED_FLY_CAMERA", true) + targetPed = NetworkGetEntityFromNetworkId(netId) + if DoesEntityExist(targetPed) then + local boneIndex = GetEntityBoneIndexByName(vehicle, "windscreen") + local vehOffset = Config.VehCamOffset[GetEntityModel(targetPed)] + if vehOffset then + AttachCamToVehicleBone(bodycam, targetPed, boneIndex, true, 0.0, 0.0, 0.0, vehOffset[1], vehOffset[2], vehOffset[3], true) + else + AttachCamToVehicleBone(bodycam, targetPed, boneIndex, true, 0.0, 0.0, 0.0, 0.000000, 0.350000, 0.790000, true) + end + end + SetCamFov(bodycam,80.0) + PlyInCarCam = true + RenderScriptCams(true, false, 0, 1, 0) + SetTimecycleModifier(Config.CameraEffect.dashcam) + SetTimecycleModifierStrength(1.0) + DoScreenFadeIn(1000) + Citizen.CreateThread(function() + SetPlayerNearTarget() + end) + if Config.DebugCamera then + Citizen.CreateThread(function() + local offsetX, offsetY, offsetZ = 0.000000, 0.350000, 0.790000 + while PlyInCarCam do + Citizen.Wait(0) + DisableAllControlActions(0) + if IsDisabledControlJustReleased(0, 35) then -- A + offsetX = offsetX + 0.01 + end + if IsDisabledControlJustReleased(0, 34) then -- D + offsetX = offsetX - 0.01 + end + if IsDisabledControlJustReleased(0, 44) then -- Q + offsetY = offsetY + 0.01 + end + if IsDisabledControlJustReleased(0, 38) then -- E + offsetY = offsetY - 0.01 + end + if IsDisabledControlJustReleased(0, 32) then -- W + offsetZ = offsetZ + 0.01 + end + if IsDisabledControlJustReleased(0, 33) then -- S + offsetZ = offsetZ - 0.01 + end + AttachCamToVehicleBone(bodycam, targetPed, boneIndex, true, 0.0, 0.0, 0.0, offsetX, offsetY, offsetZ, true) + end + print(string.format("[`putspawncode`] = {%f, %f, %f},", offsetX, offsetY, offsetZ)) + end) + end +end) + +RegisterNetEvent('spy-bodycam:startWatching',function(targetId) + local ownId = GetPlayerServerId(PlayerId()) + if targetId == ownId then return TriggerEvent('spy-bodycam:startSelfWatching',targetId) end + local targetCoords = lib.callback.await('spy-bodycam:servercb:getPedCoords', false, targetId) + if not targetCoords then return NotifyPlayer('Player not found!', 'error', 2500) end + targetPedId = targetId + LocalPlayer.state:set("inv_busy", true, true) TriggerEvent('inventory:client:busy:status', true) TriggerEvent('canUseInventoryAndHotbar:toggle', false) + DoScreenFadeOut(1000) + while not IsScreenFadedOut() do + Wait(100) + end + FreezeEntityPosition(cache.ped, true) + SetEntityVisible(cache.ped, false) -- Set invisible + SetEntityCollision(cache.ped, false, false) -- Set collision + SetEntityInvincible(cache.ped, true) -- Set invincible + NetworkSetEntityInvisibleToNetwork(cache.ped, true) -- Set invisibility + SetEntityCoords(cache.ped, targetCoords.x, targetCoords.y, targetCoords.z - 100.0) + if Config.Framework == 'qb' then + TriggerServerEvent('spy-bodycam:server:ReqDecoyPed',GetPlayerDataCore().citizenid,goBackCoords) + elseif Config.Framework == 'esx' then + TriggerServerEvent('spy-bodycam:server:ReqDecoyPed',GetPlayerDataCore().identifier,goBackCoords) + end + Wait(500) + local targetPlayer = GetPlayerFromServerId(targetId) + targetPed = GetPlayerPed(targetPlayer) + bodycam = CreateCam("DEFAULT_SCRIPTED_FLY_CAMERA", true) + AttachCamToPedBone(bodycam, targetPed, 46240, 0.1, 0.025, 0.1, true) + SetCamFov(bodycam, 100.0) + pedHeading = GetEntityHeading(targetPed) + PlyInCam = true + SetCamRot(bodycam, 0, 0, pedHeading, 2) + RenderScriptCams(true, false, 0, 1, 0) + ShakeCam(bodycam, "HAND_SHAKE", 1.0) + SetCamShakeAmplitude(bodycam, 2.0) + SetTimecycleModifier(Config.CameraEffect.bodycam) + SetTimecycleModifierStrength(0.5) + DoScreenFadeIn(1000) + Citizen.CreateThread(function() + SetPlayerNearTarget() + end) + Citizen.CreateThread(function() + SetCamRotation() + end) + Citizen.CreateThread(function() + SetCarCam() + end) +end) + +RegisterNetEvent('spy-bodycam:startSelfWatching',function(targetId) + targetPed = cache.ped + targetPedId = targetId + LocalPlayer.state:set("inv_busy", true, true) TriggerEvent('inventory:client:busy:status', true) TriggerEvent('canUseInventoryAndHotbar:toggle', false) + DoScreenFadeOut(1000) + while not IsScreenFadedOut() do + Wait(100) + end + PlayWatchAnim(cache.ped,true) + FreezeEntityPosition(targetPed, true) + Wait(500) + bodycam = CreateCam("DEFAULT_SCRIPTED_FLY_CAMERA", true) + AttachCamToPedBone(bodycam, targetPed, 46240, 0.1, 0.025, 0.1, true) + SetCamFov(bodycam, 100.0) + pedHeading = GetEntityHeading(targetPed) + PlyInSelfCam = true + SetCamRot(bodycam, 0, 0, pedHeading, 2) + RenderScriptCams(true, false, 0, 1, 0) + ShakeCam(bodycam, "HAND_SHAKE", 1.0) + SetCamShakeAmplitude(bodycam, 2.0) + SetTimecycleModifier(Config.CameraEffect.bodycam) + SetTimecycleModifierStrength(0.5) + DoScreenFadeIn(1000) +end) + +RegisterNetEvent('spy-bodycam:bodycamstatus',function() + local isJobUse = CheckAllowedJob() + if not isJobUse then return NotifyPlayer('You are not authorized!', 'error', 2500) end + local acvstring + if bcamstate then acvstring = 'Deactivating' else acvstring = 'Activating' end + if Config.Dependency.UseProgress == 'ox' then + if lib.progressBar({ + duration = 2500, + label = acvstring..' Bodycam...', + useWhileDead = false, + canCancel = true, + disable = { + combat = true, + }, + anim = { + dict = 'clothingtie', + clip = 'try_tie_positive_a' + }, + }) then + bcamstate = not bcamstate + BodyOverlay(bcamstate) + TriggerServerEvent('spy-bodycam:server:toggleList',bcamstate) + toggleProp(bcamstate) + if bcamstate then + Citizen.CreateThread(function() + CheckForItem() + end) + else + SendNUIMessage({action = "cancel_rec_force"}) + end + else + NotifyPlayer('Cancelled!', 'error') + end + elseif Config.Dependency.UseProgress == 'qb' then + QBCore.Functions.Progressbar('spy_bdycam', acvstring..' Bodycam...', 2500, false, true, { + disableMovement = false, + disableCarMovement = false, + disableMouse = false, + disableCombat = true, + }, { + animDict = 'clothingtie', + anim = 'try_tie_positive_a', + flags = 49 + }, {}, {}, function() -- Done + StopAnimTask(cache.ped, 'clothingtie', 'try_tie_positive_a', 1.0) + bcamstate = not bcamstate + BodyOverlay(bcamstate) + TriggerServerEvent('spy-bodycam:server:toggleList',bcamstate) + toggleProp(bcamstate) + if bcamstate then + Citizen.CreateThread(function() + CheckForItem() + end) + else + SendNUIMessage({action = "cancel_rec_force"}) + end + end, function() + StopAnimTask(cache.ped, 'clothingtie', 'try_tie_positive_a', 1.0) + NotifyPlayer('Cancelled!', 'error') + end) + elseif Config.Dependency.UseProgress == 'esx' then + ESX.Progressbar(acvstring..' Bodycam...', 2500,{ + FreezePlayer = false, + animation ={ + type = "anim", + dict = "clothingtie", + lib ="try_tie_positive_a" + }, + onFinish = function() + StopAnimTask(cache.ped, 'clothingtie', 'try_tie_positive_a', 1.0) + bcamstate = not bcamstate + BodyOverlay(bcamstate) + TriggerServerEvent('spy-bodycam:server:toggleList',bcamstate) + toggleProp(bcamstate) + if bcamstate then + Citizen.CreateThread(function() + CheckForItem() + end) + else + SendNUIMessage({action = "cancel_rec_force"}) + end + end, onCancel = function() + StopAnimTask(cache.ped, 'clothingtie', 'try_tie_positive_a', 1.0) + NotifyPlayer('Cancelled!', 'error') + end + }) + end +end) + +RegisterNetEvent('spy-bodycam:toggleCarCam', function() + local isJobUse = CheckAllowedJob() + if not isJobUse then return NotifyPlayer('You are not authorized!', 'error', 2500) end + if not IsPedInAnyVehicle(cache.ped, false) then return NotifyPlayer('Not in a vehicle!', 'error') end + local veh = GetVehiclePedIsIn(cache.ped, false) + local driverPed = GetPedInVehicleSeat(veh, -1) + if driverPed ~= cache.ped then return NotifyPlayer('Not in the driver\'s seat!', 'error') end + if not isCarAuth(veh) then return NotifyPlayer('Vehicle not authorized!', 'error') end + if DoesEntityExist(veh) then + local netId = NetworkGetNetworkIdFromEntity(veh) + local acvstring = GlobalState.CarsOnBodycam[netId] and 'Deactivating' or 'Activating' + local donestr = GlobalState.CarsOnBodycam[netId] and 'Deactivated' or 'Activated' + + if Config.Dependency.UseProgress == 'ox' then + if lib.progressBar({ + duration = 2500, + label = acvstring .. ' Dashcam...', + useWhileDead = false, + canCancel = true, + disable = { + car = true, + move = true, + combat = true, + sprint = true, + }, + anim = { + dict = 'veh@submersible@ds@base', + clip = 'change_station', + flags = 49 + }, + }) then + ToggleCarCam(netId, veh) + NotifyPlayer('Dashcam '..donestr, 'success') + else + NotifyPlayer('Cancelled!', 'error') + end + elseif Config.Dependency.UseProgress == 'qb' then + QBCore.Functions.Progressbar('spy_bdycam', acvstring .. ' Dashcam...', 2500, false, true, { + disableMovement = true, + disableCarMovement = true, + disableMouse = false, + disableCombat = true, + }, { + animDict = 'veh@submersible@ds@base', + anim = 'change_station', + flags = 49 + }, {}, {}, function() + ToggleCarCam(netId, veh) + StopAnimTask(cache.ped, 'veh@submersible@ds@base', 'change_station', 1.0) + NotifyPlayer('Dashcam '..donestr, 'success') + end, function() + StopAnimTask(cache.ped, 'veh@submersible@ds@base', 'change_station', 1.0) + NotifyPlayer('Cancelled!', 'error') + end) + elseif Config.Dependency.UseProgress == 'esx' then + ESX.Progressbar(acvstring .. ' Dashcam...', 2500,{ + FreezePlayer = false, + animation ={ + type = "anim", + dict = "veh@submersible@ds@base", + lib ="change_station" + }, + onFinish = function() + ToggleCarCam(netId, veh) + StopAnimTask(cache.ped, 'veh@submersible@ds@base', 'change_station', 1.0) + NotifyPlayer('Dashcam '..donestr, 'success') + end, onCancel = function() + StopAnimTask(cache.ped, 'veh@submersible@ds@base', 'change_station', 1.0) + NotifyPlayer('Cancelled!', 'error') + end + }) + + end + end +end) + +RegisterNetEvent('spy-bodycam:updatelisteffect',function() + if PlyInSelfCam or PlyInCam then + if (not GlobalState.PlayerOnBodycam[targetPedId]) then + if PlyInSelfCam then + QuitBodyCamSelf() + elseif PlyInCam then + QuitBodyCam() + end + end + end +end) + +RegisterNetEvent('spy-bodycam:updatelisteffectcar',function() + if PlyInCarCam then + if (not GlobalState.CarsOnBodycam[targetPedId]) then + QuitBodyCam() + end + end +end) + +RegisterNetEvent('spy-bodycam:openActiveMenu', function(locId) + local optionsMenu = {} + if Config.Dependency.UseMenu == 'qb' then + optionsMenu[#optionsMenu+1] = { header = 'Camera Portal',isMenuHeader = true} + optionsMenu[#optionsMenu+1] = { icon = "fas fa-circle-xmark", header = "Close", params = { event = "spy:close" } } + end + if Config.Dependency.UseMenu == 'ox' then + optionsMenu[#optionsMenu+1] = { + title = 'Active Bodycams', + icon = 'user', + onSelect = function() + TriggerEvent('spy-bodycam:openActiveMenuJob', locId) + end + } + optionsMenu[#optionsMenu+1] = { + title = 'Active Dashcams', + icon = 'car', + onSelect = function() + TriggerEvent('spy-bodycam:openActiveMenuCars', locId) + end + } + elseif Config.Dependency.UseMenu == 'qb' then + optionsMenu[#optionsMenu+1] = { + header = 'Active Bodycams', + icon = 'fas fa-user', + params = { + isAction = true, + event = function() + TriggerEvent('spy-bodycam:openActiveMenuJob', locId) + end + } + } + optionsMenu[#optionsMenu+1] = { + header = 'Active Dashcams', + icon = 'fas fa-car', + params = { + isAction = true, + event = function() + TriggerEvent('spy-bodycam:openActiveMenuCars', locId) + end + } + } + elseif Config.Dependency.UseMenu == 'esx' then + optionsMenu[#optionsMenu+1] = {unselectable= true, title="Camera Portal", name = 'e1'} + optionsMenu[#optionsMenu+1] = {icon="fas fa-user", title="Active Bodycams", name = 'e2'} + optionsMenu[#optionsMenu+1] = {icon="fas fa-car", title="Active Dashcams", name = 'e3'} + ESX.OpenContext("right" , optionsMenu, + function(menu,element) + if element.name == "e2" then + TriggerEvent('spy-bodycam:openActiveMenuJob', locId) + end + if element.name == "e3" then + TriggerEvent('spy-bodycam:openActiveMenuCars', locId) + end + end) + end + if Config.Dependency.UseMenu == 'ox' then + lib.registerContext({ + id = 'spy_bdcam_list', + title = 'Camera Portal', + options = optionsMenu + }) + lib.showContext('spy_bdcam_list') + elseif Config.Dependency.UseMenu == 'qb' then + exports['qb-menu']:openMenu(optionsMenu) + end +end) + +RegisterNetEvent('spy-bodycam:openActiveMenuJob', function(locId) + local optionsMenu = {} + if Config.Dependency.UseMenu == 'qb' then + optionsMenu[#optionsMenu+1] = { header = 'Active Bodycams',isMenuHeader = true} + optionsMenu[#optionsMenu+1] = { icon = "fas fa-circle-xmark", header = "Close", params = { event = "spy:close" } } + optionsMenu[#optionsMenu+1] = { + icon = "fas fa-left-long", + header = "Go Back", + params = { + isAction = true, + event = function() + TriggerEvent('spy-bodycam:openActiveMenu',locId) + end + } + } + elseif Config.Dependency.UseMenu == 'ox' then + optionsMenu[#optionsMenu+1] = { + title = 'Go Back', + icon = 'left-long', + onSelect = function() + TriggerEvent('spy-bodycam:openActiveMenu',locId) + end + } + elseif Config.Dependency.UseMenu == 'esx' then + optionsMenu[#optionsMenu+1] = {unselectable= true, title="Active Bodycams", name = 'e1'} + optionsMenu[#optionsMenu+1] = {icon="fas fa-left-long", title="Go Back", name = 'back'} + end + for k, v in pairs(GlobalState.PlayerOnBodycam) do + if Config.WatchLoc[locId].jobCam then + if isLocFilterTrue(locId,v.jobkey) then + if Config.Dependency.UseMenu == 'ox' then + optionsMenu[#optionsMenu+1] = { + title = v.name, + description = v.job.." | "..v.rank, + icon = 'video', + onSelect = function() + TriggerEvent('spy-bodycam:startWatching',k) + local coord = GetEntityCoords(cache.ped) + goBackCoords = vector4(coord.x, coord.y, coord.z -1 , GetEntityHeading(cache.ped)) + SetTimeout(2000, function() + OpenWatch(true,k,v.name,true) + end) + end + } + elseif Config.Dependency.UseMenu == 'qb' then + optionsMenu[#optionsMenu+1] = { + header = v.name, + txt = v.job.." | "..v.rank, + icon = 'fas fa-video', + params = { + isAction = true, + event = function() + TriggerEvent('spy-bodycam:startWatching',k) + local coord = GetEntityCoords(cache.ped) + goBackCoords = vector4(coord.x, coord.y, coord.z -1 , GetEntityHeading(cache.ped)) + SetTimeout(2000, function() + OpenWatch(true,k,v.name,true) + end) + end + } + } + elseif Config.Dependency.UseMenu == 'esx' then + optionsMenu[#optionsMenu+1] = { + icon="fas fa-video", + title = v.name, + description = v.job.." | "..v.rank, + name = k + } + end + end + else + if Config.Dependency.UseMenu == 'ox' then + optionsMenu[#optionsMenu+1] = { + title = v.name, + description = v.job.." | "..v.rank, + icon = 'video', + onSelect = function() + TriggerEvent('spy-bodycam:startWatching',k) + local coord = GetEntityCoords(cache.ped) + goBackCoords = vector4(coord.x, coord.y, coord.z -1 , GetEntityHeading(cache.ped)) + SetTimeout(2000, function() + OpenWatch(true,k,v.name,true) + end) + end + } + elseif Config.Dependency.UseMenu == 'qb' then + optionsMenu[#optionsMenu+1] = { + header = v.name, + txt = v.job.." | "..v.rank, + icon = 'fas fa-video', + params = { + isAction = true, + event = function() + TriggerEvent('spy-bodycam:startWatching',k) + local coord = GetEntityCoords(cache.ped) + goBackCoords = vector4(coord.x, coord.y, coord.z -1 , GetEntityHeading(cache.ped)) + SetTimeout(2000, function() + OpenWatch(true,k,v.name,true) + end) + end + } + } + elseif Config.Dependency.UseMenu == 'esx' then + optionsMenu[#optionsMenu+1] = { + icon="fas fa-video", + title = v.name, + description = v.job.." | "..v.rank, + name = k + } + end + end + end + if Config.Dependency.UseMenu == 'ox' then + lib.registerContext({ + id = 'spy_bcam_list', + title = 'Active Bodycams', + options = optionsMenu + }) + lib.showContext('spy_bcam_list') + elseif Config.Dependency.UseMenu == 'qb' then + exports['qb-menu']:openMenu(optionsMenu) + elseif Config.Dependency.UseMenu == 'esx' then + ESX.OpenContext("right" , optionsMenu, + function(menu,element) + if element.name == 'back' then TriggerEvent('spy-bodycam:openActiveMenu',locId) return end + TriggerEvent('spy-bodycam:startWatching',element.name) + local coord = GetEntityCoords(cache.ped) + goBackCoords = vector4(coord.x, coord.y, coord.z -1 , GetEntityHeading(cache.ped)) + SetTimeout(2000, function() + OpenWatch(true,element.name,element.title,true) + end) + ESX.CloseContext() + end) + end +end) + +RegisterNetEvent('spy-bodycam:openActiveMenuCars', function(locId) + local optionsMenu = {} + if Config.Dependency.UseMenu == 'qb' then + optionsMenu[#optionsMenu+1] = { header = 'Active Dashcams',isMenuHeader = true} + optionsMenu[#optionsMenu+1] = { icon = "fas fa-circle-xmark", header = "Close", params = { event = "spy:close" } } + optionsMenu[#optionsMenu+1] = { + icon = "fas fa-left-long", + header = "Go Back", + params = { + isAction = true, + event = function() + TriggerEvent('spy-bodycam:openActiveMenu',locId) + end + } + } + elseif Config.Dependency.UseMenu == 'ox' then + optionsMenu[#optionsMenu+1] = { + title = 'Go Back', + icon = 'left-long', + onSelect = function() + TriggerEvent('spy-bodycam:openActiveMenu',locId) + end + } + elseif Config.Dependency.UseMenu == 'esx' then + optionsMenu[#optionsMenu+1] = {unselectable= true, title="Active Dashcams", name = 'e1'} + optionsMenu[#optionsMenu+1] = {icon="fas fa-left-long", title="Go Back", name = 'back'} + end + for k, v in pairs(GlobalState.CarsOnBodycam) do + if Config.WatchLoc[locId].carCam then + if isCarCamJobTrue(locId,v.jobkey) or isCarCamClassTrue(locId,v.carclass) then + if Config.Dependency.UseMenu == 'ox' then + optionsMenu[#optionsMenu+1] = { + title = v.carname, + description = "Plate: "..v.plate.." | "..v.name, + icon = 'car', + onSelect = function() + StartDashCamWatch(k,v.plate,v.carname) + end + } + elseif Config.Dependency.UseMenu == 'qb' then + optionsMenu[#optionsMenu+1] = { + header = v.carname, + txt = "Plate: "..v.plate.." | "..v.name, + icon = 'fas fa-car', + params = { + isAction = true, + event = function() + StartDashCamWatch(k,v.plate,v.carname) + end + } + } + elseif Config.Dependency.UseMenu == 'esx' then + optionsMenu[#optionsMenu+1] = { + icon="fas fa-car", + title = v.carname, + description = "Plate: "..v.plate.." | "..v.name, + value = {k,v.plate,v.carname} + } + end + end + else + if Config.Dependency.UseMenu == 'ox' then + optionsMenu[#optionsMenu+1] = { + title = v.carname, + description = "Plate: "..v.plate.." | "..v.name, + icon = 'car', + onSelect = function() + StartDashCamWatch(k,v.plate,v.carname) + end + } + elseif Config.Dependency.UseMenu == 'qb' then + optionsMenu[#optionsMenu+1] = { + header = v.carname, + txt = "Plate: "..v.plate.." | "..v.name, + icon = 'fas fa-car', + params = { + isAction = true, + event = function() + StartDashCamWatch(k,v.plate,v.carname) + end + } + } + elseif Config.Dependency.UseMenu == 'esx' then + optionsMenu[#optionsMenu+1] = { + icon="fas fa-car", + title = v.carname, + description = "Plate: "..v.plate.." | "..v.name, + value = {k,v.plate,v.carname} + } + end + end + end + if Config.Dependency.UseMenu == 'ox' then + lib.registerContext({ + id = 'spy_dcam_list', + title = 'Active Dashcams', + options = optionsMenu + }) + lib.showContext('spy_dcam_list') + elseif Config.Dependency.UseMenu == 'qb' then + exports['qb-menu']:openMenu(optionsMenu) + elseif Config.Dependency.UseMenu == 'esx' then + ESX.OpenContext("right" , optionsMenu, + function(menu,element) + if element.name == 'back' then TriggerEvent('spy-bodycam:openActiveMenu',locId) return end + StartDashCamWatch(element.value[1],element.value[2],element.value[3]) + ESX.CloseContext() + end) + end +end) + +RegisterNetEvent('spy-bodycam:client:createDecoyPed', function(model, data, pVec4, plyId) + if not Config.Dependency.UseAppearance then return end + RequestModel(model) + local timeout = 0 + while not HasModelLoaded(model) and timeout < 500 do + Wait(10) + timeout = timeout + 1 + end + if not HasModelLoaded(model) then + print('Error: Model could not be loaded:', model) + return + end + -- Create the ped + charPed[plyId] = CreatePed(2, model, pVec4.x, pVec4.y, pVec4.z, pVec4.w, false, true) + if not DoesEntityExist(charPed[plyId]) then + print('Error: Ped could not be created.') + return + end + SetPedComponentVariation(charPed[plyId], 0, 0, 0, 2) + FreezeEntityPosition(charPed[plyId], true) + SetEntityInvincible(charPed[plyId], true) + SetBlockingOfNonTemporaryEvents(charPed[plyId], true) + if data then + if Config.Dependency.UseAppearance == 'qb' then + TriggerEvent('qb-clothing:client:loadPlayerClothing', data, charPed[plyId]) + elseif Config.Dependency.UseAppearance == 'illenium' then + exports['illenium-appearance']:setPedAppearance(charPed[plyId], data) + end + end + PlayWatchAnim(charPed[plyId],false) +end) + +RegisterNetEvent('spy-bodycam:client:deleteDecoyPed',function(plyId) + if not Config.Dependency.UseAppearance then return end + if charPed[plyId] then + if DoesEntityExist(charPed[plyId]) then + StopWatchAnim(charPed[plyId]) + DeleteEntity(charPed[plyId]) + charPed[plyId] = nil + end + end +end) + +RegisterNetEvent('spy-bodycam:client:startRec',function(webhook,serviceUsed) + SendNUIMessage({ + action = "toggle_record", + hook = webhook, + service = serviceUsed, + recTiming = Config.RecordTime, + }) + if Config.ForceViewCam then + SetTimecycleModifier(Config.CameraEffect.bodycam) + SetTimecycleModifierStrength(0.5) + CreateThread(function() + onRec = true + while onRec do + SetFollowPedCamViewMode(4) + Wait(0) + end + end) + end +end) + +RegisterNetEvent('spy-bodycam:client:openRecords',function(records,jobTitle,isBoss) + SetNuiFocus(true, true) + PlayWatchAnim(cache.ped,true) + SendNUIMessage({ + action = "show_records", + recordData = records, + jobTitle = jobTitle, + isBoss = isBoss + }) +end) + +RegisterNetEvent('spy-bodycam:client:refreshRecords',function(records,isBoss) + SendNUIMessage({ + action = "refreshrec", + recordData = records, + isBoss = isBoss + }) +end) + +RegisterKeyMapping('bodycamexit', 'Exit bodycam spectate', 'keyboard', Config.ExitCamKey) +RegisterCommand('bodycamexit', function() + if PlyInCam or PlyInCarCam then + QuitBodyCam() + elseif PlyInSelfCam then + QuitBodyCamSelf() + end +end) + +RegisterNUICallback('exitBodyCam', function(data, cb) + if not Config.ForceViewCam then return end + onRec = false + SetFollowPedCamViewMode(1) + SetTimecycleModifier('default') + SetTimecycleModifierStrength(1.0) +end) + +RegisterNUICallback('videoLog', function(data, cb) + if data then + local videoUrl = data.vidurl + local pos = GetEntityCoords(cache.ped) + local s1, s2 = GetStreetNameAtCoord(pos.x, pos.y, pos.z) + TriggerServerEvent('spy-bodycam:server:logVideoDetails', videoUrl,GetStreetNameFromHashKey(s1)) + end +end) + +RegisterNUICallback('deleteVideo', function(data, cb) + if data then + local videoUrl = data.vidurl + TriggerServerEvent('spy-bodycam:server:deleteVideoDB', videoUrl) + end +end) + +RegisterNUICallback('closeRecUI', function(data, cb) + StopWatchAnim(cache.ped) + SetNuiFocus(false, false) +end) + +--- STANDALONE FUNCTIONS +function StartDashCamWatch(k,plate,carname) + local targetCoords = lib.callback.await('spy-bodycam:servercb:getCarCoords', false, k) + if not targetCoords then NotifyPlayer('Car not found!', 'error', 2500) return end + TriggerEvent('spy-bodycam:startWatchingDashcam',k) + local coord = GetEntityCoords(cache.ped) + goBackCoords = vector4(coord.x, coord.y, coord.z -1 , GetEntityHeading(cache.ped)) + SetTimeout(2000, function() + OpenWatch(true,plate,carname,false) + end) +end + +function isCarAuth(veh) + local vehClass = GetVehicleClass(veh) + for k,v in ipairs(Config.AllowedClass) do + if tonumber(vehClass) == tonumber(v) then return true end + end + return false +end + +function ToggleCarCam(netId, veh) + if not GlobalState.CarsOnBodycam[netId] then + local carPlate = GetVehicleNumberPlateText(veh) + local carName = GetVehDisplayName(GetEntityModel(veh)) + local carClass = GetVehicleClass(veh) + TriggerServerEvent('spy-bodycam:server:toggleListCars', true, netId, carPlate, carName,carClass) + else + TriggerServerEvent('spy-bodycam:server:toggleListCars', false, netId) + end +end + +function GetVehDisplayName(model) + local vehName = GetLabelText(GetDisplayNameFromVehicleModel(model)) + if vehName == 'NULL' then + vehName = GetDisplayNameFromVehicleModel(model) + end + return vehName +end + +function SetCamRotation() + while PlyInCam do + SetCamRot(bodycam, 0, 0, GetEntityHeading(targetPed), 2) + Wait(1) + end +end + +function SetCarCam() + while PlyInCam or PlyInSelfCam do + if (IsPedInAnyVehicle(targetPed,false) and not carCam) then + AttachCamToPedBone(bodycam, targetPed, 46240, 0.1, 0.25, -0.1, true) + carCam = true + elseif (not IsPedInAnyVehicle(targetPed,false) and carCam) then + AttachCamToPedBone(bodycam, targetPed, 46240, 0.1, 0.025, 0.1, true) + carCam = false + end + Wait(2000) + end +end + +function SetPlayerNearTarget() + while PlyInCam or PlyInCarCam do + local ownCoords = GetEntityCoords(cache.ped) + if DoesEntityExist(targetPed) then + local targetCoords = GetEntityCoords(targetPed) + local distance = #(ownCoords - targetCoords) + + if distance > 150 then + SetEntityCoords(cache.ped, targetCoords.x, targetCoords.y, targetCoords.z - 100.0, false, false, false, true) + end + else + QuitBodyCam() + end + Wait(2500) -- Check the distance every given second + end +end + +function QuitBodyCamSelf() + DoScreenFadeOut(1000) + while not IsScreenFadedOut() do + Wait(100) + end + SetTimeout(1000, function() + OpenWatch(false) + end) + StopWatchAnim(cache.ped) + FreezeEntityPosition(cache.ped, false) + RenderScriptCams(false, false, 0, 1, 0) + SetTimecycleModifier('default') + SetTimecycleModifierStrength(1.0) + PlyInSelfCam = false + DoScreenFadeIn(1000) + LocalPlayer.state:set("inv_busy", false, true) TriggerEvent('inventory:client:busy:status', false) TriggerEvent('canUseInventoryAndHotbar:toggle', true) +end + +function QuitBodyCam() + DoScreenFadeOut(1000) + while not IsScreenFadedOut() do + Wait(100) + end + SetTimeout(1000, function() + OpenWatch(false) + end) + TriggerServerEvent('spy-bodycam:server:ReqDeleteDecoyPed') + SetEntityVisible(cache.ped, true) -- Set invisible + SetEntityCollision(cache.ped, true, true) -- Set collision + SetEntityInvincible(cache.ped, false) -- Set invincible + NetworkSetEntityInvisibleToNetwork(cache.ped, false) -- Set invisibility + FreezeEntityPosition(cache.ped, false) + SetEntityCoords(cache.ped, goBackCoords.x, goBackCoords.y, goBackCoords.z) + SetEntityHeading(cache.ped, goBackCoords.w) + RenderScriptCams(false, false, 0, 1, 0) + SetTimecycleModifier('default') + SetTimecycleModifierStrength(1.0) + PlyInCam = false + PlyInCarCam = false + DoScreenFadeIn(1000) + LocalPlayer.state:set("inv_busy", false, true) TriggerEvent('inventory:client:busy:status', false) TriggerEvent('canUseInventoryAndHotbar:toggle', true) +end + +function ForceQuitBodyCamSelf() + OpenWatch(false) + StopWatchAnim(cache.ped) + FreezeEntityPosition(cache.ped, false) + RenderScriptCams(false, false, 0, 1, 0) + SetTimecycleModifier('default') + SetTimecycleModifierStrength(1.0) + LocalPlayer.state:set("inv_busy", false, true) TriggerEvent('inventory:client:busy:status', false) TriggerEvent('canUseInventoryAndHotbar:toggle', true) +end + +function ForceQuitBodyCam() + SetEntityVisible(cache.ped, true) -- Set invisible + SetEntityCollision(cache.ped, true, true) -- Set collision + SetEntityInvincible(cache.ped, false) -- Set invincible + NetworkSetEntityInvisibleToNetwork(cache.ped, false) -- Set invisibility + FreezeEntityPosition(cache.ped, false) + SetEntityCoords(cache.ped, goBackCoords.x, goBackCoords.y, goBackCoords.z) + SetEntityHeading(cache.ped, goBackCoords.w) + RenderScriptCams(false, false, 0, 1, 0) + SetTimecycleModifier('default') + SetTimecycleModifierStrength(1.0) + LocalPlayer.state:set("inv_busy", false, true) TriggerEvent('inventory:client:busy:status', false) TriggerEvent('canUseInventoryAndHotbar:toggle', true) +end + +function BodyOverlay(bool) + if bool then + if Config.Framework == 'qb' then + local bodyId = GetPlayerServerId(PlayerId()) + local playerName = GetPlayerDataCore().charinfo.firstname .. " " .. GetPlayerDataCore().charinfo.lastname + local randomBodyNum = "BODY "..bodyId.. " | ".."X"..tostring(math.random(100000, 999999)) .. "N" + local callsign = "("..GetPlayerDataCore().metadata["callsign"]..") " .. playerName + SendNUIMessage({ + action = 'open', + bodyname = randomBodyNum, + callsign = callsign, + }) + else + local bodyId = GetPlayerServerId(PlayerId()) + local playerName = lib.callback.await('spy-bodycam:servercb:getNamESX', true) + local randomBodyNum = "BODY "..bodyId.. " | ".."X"..tostring(math.random(100000, 999999)) .. "N" + local callsign = "("..GetPlayerDataCore().job.grade_label..") " .. playerName + SendNUIMessage({ + action = 'open', + bodyname = randomBodyNum, + callsign = callsign, + }) + end + else + SendNUIMessage({ + action = 'close' + }) + end +end + +function OpenWatch(bool,bodyId,name,isbodycam) + if bool then + SendNUIMessage({ + action = 'openWatch', + bodyId = bodyId, + name = name, + isbodycam = isbodycam, + exitKey = Config.ExitCamKey, + debug = Config.DebugCamera, + }) + else + SendNUIMessage({ + action = 'closeWatch' + }) + end +end + +function PlayWatchAnim(ped,isNet) + local x, y, z = table.unpack(GetEntityCoords(ped)) + local tabletprop = `prop_cs_tablet` + RequestModel(tabletprop) + while not HasModelLoaded(tabletprop) do + Citizen.Wait(10) + end + local prop = CreateObject(tabletprop, x, y, z + 0.2, isNet, true, false) + AttachEntityToEntity(prop, ped, GetPedBoneIndex(ped, 28422), -0.05, 0.0, 0.0, 0.0, 0.0, 0.0, true, true, false, true, 1, true) + local animDict = 'amb@code_human_in_bus_passenger_idles@female@tablet@idle_a' + RequestAnimDict(animDict) + while not HasAnimDictLoaded(animDict) do + Citizen.Wait(10) + end + TaskPlayAnim(ped, animDict, "idle_a", 3.0, -8.0, -1, 49, 0, false, false, false) + pedProps[ped] = prop +end + +function StopWatchAnim(ped) + local prop = pedProps[ped] + ClearPedTasks(ped) + if prop and DoesEntityExist(prop) then + DetachEntity(prop, true, true) + DeleteEntity(prop) + else + print("Error: Prop does not exist or is not attached to the ped.") + end + pedProps[ped] = nil +end + +function toggleProp(state) + local gender = nil + local coords = nil + local rotation = nil + local boneId = nil + local propName = "rj_bodycam" + if Config.Framework == 'qb' then + local Player = GetPlayerDataCore() + gender = Player.charinfo.gender + else + local xPlayer = GetPlayerDataCore() + gender = xPlayer.sex + end + if gender == 0 or gender == 'm' then + coords = Config.PropLoc.male.pos + rotation = Config.PropLoc.male.rot + boneId = Config.PropLoc.male.bone + else + coords = Config.PropLoc.female.pos + rotation = Config.PropLoc.female.rot + boneId = Config.PropLoc.female.bone + end + if state then + if not propNetID or not DoesEntityExist(NetworkGetEntityFromNetworkId(propNetID)) then + RequestModel(propName) + while not HasModelLoaded(propName) do + Wait(1) + end + local propEntity = CreateObject(GetHashKey(propName), 0.0, 0.0, 0.0, true, true, true) + AttachEntityToEntity(propEntity, cache.ped, GetPedBoneIndex(cache.ped, boneId), coords.x, coords.y, coords.z, rotation.x, rotation.y, rotation.z, true, true, false, true, 1, true) + propNetID = NetworkGetNetworkIdFromEntity(propEntity) + SetNetworkIdExistsOnAllMachines(propNetID, true) + end + else + if propNetID and DoesEntityExist(NetworkGetEntityFromNetworkId(propNetID)) then + local propEntity = NetworkGetEntityFromNetworkId(propNetID) + DeleteEntity(propEntity) + propNetID = nil + end + end +end + +--- FRAMEWORK FUNCTIONS +function isCarCamJobTrue(locId, jobKey) + if not Config.WatchLoc[locId].carCam.job then return false end + for _, v in ipairs(Config.WatchLoc[locId].carCam.job) do + if jobKey == v then + return true + end + end + return false +end + +function isCarCamClassTrue(locId, vehClass) + if not Config.WatchLoc[locId].carCam.class then return false end + for _, v in ipairs(Config.WatchLoc[locId].carCam.class) do + if tonumber(vehClass) == tonumber(v) then + return true + end + end + return false +end + +function CheckForItem() + while bcamstate do + local hasItem = HasItemsCheck('bodycam') + if not hasItem then + TriggerServerEvent('spy-bodycam:server:toggleList',false) + BodyOverlay(false) + toggleProp(false) + bcamstate = false + SendNUIMessage({action = "cancel_rec_force"}) + break + end + Wait(2500) + end +end + +function CheckAllowedJob() + for k,v in ipairs(Config.AllowedJobs) do + if PlayerJob.name == v then return true end + end + return false +end + +function isLocFilterTrue(locId,jobkey) + if not Config.WatchLoc[locId].jobCam then return true end + for k,v in ipairs(Config.WatchLoc[locId].jobCam) do + if jobkey == v then return true end + end + return false +end + +function targetAuth(locId,jobkey) + if not Config.WatchLoc[locId].targetAuth then return true end + for k,v in ipairs(Config.WatchLoc[locId].targetAuth) do + if jobkey == v then return true end + end + return false +end + +function NotifyPlayer(msg,type,time) + if Config.Dependency.UseNotify == 'ox' then + lib.notify({ + title = '', + description = msg, + duration = time, + type = type + }) + elseif Config.Dependency.UseNotify == 'qb' then + QBCore.Functions.Notify(msg,type,time) + elseif Config.Dependency.UseNotify == 'esx' then + ESX.ShowNotification(msg, type, time) + end +end + +function GetPlayerDataCore() + if Config.Framework == 'qb' then + if QBCore.Functions.GetPlayerData() then + return QBCore.Functions.GetPlayerData() + else + return false + end + elseif Config.Framework == 'esx' then + if ESX.GetPlayerData() then + return ESX.GetPlayerData() + else + return false + end + end +end + +function HasItemsCheck(itemname) + if Config.Dependency.UseInventory == 'qb' then + return QBCore.Functions.HasItem(itemname) + elseif Config.Dependency.UseInventory == 'esx' then + local hasItem = ESX.SearchInventory(itemname, 1) + if hasItem >= 1 then + return true + else + return false + end + elseif Config.Dependency.UseInventory == 'ox' then + local chkItem = exports.ox_inventory:Search('count', itemname) + if type(chkItem) == 'table' then + for _, v in pairs(chkItem) do + if v >= 1 then + return true + end + end + else + return chkItem >= 1 + end + end + return false +end + + diff --git a/resources/[jobs]/[police]/[spy-bodycam]/spy-bodycam/client/target.lua b/resources/[jobs]/[police]/[spy-bodycam]/spy-bodycam/client/target.lua new file mode 100644 index 000000000..1ab85d92e --- /dev/null +++ b/resources/[jobs]/[police]/[spy-bodycam]/spy-bodycam/client/target.lua @@ -0,0 +1,86 @@ +CreateThread(function() + if Config.Dependency.UseTarget == 'qb' then + for k,v in ipairs(Config.WatchLoc) do + exports['qb-target']:AddCircleZone("spycam_watch"..k,v.coords,v.rad, { + name = "spycam_watch"..k, + useZ=true, + debugPoly = v.debug, + }, { + options = { + { + type = "client", + icon = "fas fa-sign-in-alt", + label = 'Open Camera Portal', + action = function(entity) + TriggerEvent('spy-bodycam:openActiveMenu',k) + end, + canInteract = function(entity) + return targetAuth(k,PlayerJob.name) + end, + + }, + { + type = "client", + icon = "fas fa-list", + label = 'Records Database', + action = function(entity) + TriggerServerEvent('spy-bodycam:server:showrecordingUI') + end, + canInteract = function(entity) + return targetAuth(k,PlayerJob.name) + end, + + }, + }, + distance = 2.5 + }) + end + else + for k,v in ipairs(Config.WatchLoc) do + exports.ox_target:addSphereZone( + { + coords = v.coords, + radius = v.rad, + debug = v.debug, + drawSprite = false, + options = { + { + name = "spycam_watch"..k, + label = 'Open Camera Portal', + icon = "fas fa-sign-in-alt", + distance = 2.5, + onSelect = function(data) + TriggerEvent('spy-bodycam:openActiveMenu',k) + end, + canInteract = function(entity, distance, coords, name, bone) + return targetAuth(k,PlayerJob.name) + end, + }, + { + name = "spycam_watch"..k, + label = 'Records Database', + icon = "fas fa-list", + distance = 2.5, + onSelect = function(data) + TriggerServerEvent('spy-bodycam:server:showrecordingUI') + end, + canInteract = function(entity, distance, coords, name, bone) + return targetAuth(k,PlayerJob.name) + end, + }, + } + } + ) + end + end +end) + +AddEventHandler('onResourceStop', function(resourceName) + if GetCurrentResourceName() == resourceName then + if Config.Dependency.UseTarget == 'qb' then + for k,v in ipairs(Config.WatchLoc) do + exports['qb-target']:RemoveZone("spycam_watch"..k) + end + end + end +end) \ No newline at end of file diff --git a/resources/[jobs]/[police]/[spy-bodycam]/spy-bodycam/config.lua b/resources/[jobs]/[police]/[spy-bodycam]/spy-bodycam/config.lua new file mode 100644 index 000000000..50915256f --- /dev/null +++ b/resources/[jobs]/[police]/[spy-bodycam]/spy-bodycam/config.lua @@ -0,0 +1,102 @@ +-- ███████╗██████╗ ██╗ ██╗ ██████╗ ██████╗ ██████╗ ██╗ ██╗ ██████╗ █████╗ ███╗ ███╗ +-- ██╔════╝██╔══██╗╚██╗ ██╔╝ ██╔══██╗██╔═══██╗██╔══██╗╚██╗ ██╔╝██╔════╝██╔══██╗████╗ ████║ +-- ███████╗██████╔╝ ╚████╔╝ ██████╔╝██║ ██║██║ ██║ ╚████╔╝ ██║ ███████║██╔████╔██║ +-- ╚════██║██╔═══╝ ╚██╔╝ ██╔══██╗██║ ██║██║ ██║ ╚██╔╝ ██║ ██╔══██║██║╚██╔╝██║ +-- ███████║██║ ██║ ██████╔╝╚██████╔╝██████╔╝ ██║ ╚██████╗██║ ██║██║ ╚═╝ ██║ +-- ╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ + +Config = Config or {} + +Config.Framework = 'qb' -- qb | esx + +if Config.Framework == 'qb' then -- Dont touch this part + QBCore = exports["qb-core"]:GetCoreObject() +elseif Config.Framework == 'esx' then + ESX = exports.es_extended:getSharedObject() +end + +Config.Dependency = { + UseTarget = 'qb', -- qb | ox + UseInventory = 'qb', -- qb | ox | esx + UseProgress = 'qb', -- qb | ox | esx + UseMenu = 'qb', -- qb | ox | esx + UseNotify = 'qb', -- qb | ox | esx + UseAppearance = 'illenium', -- qb | illenium | false +} + +Config.ExitCamKey = 'BACK' + +Config.CameraEffect = { + bodycam = 'Island_CCTV_ChannelFuzz', + dashcam = 'TinyRacerMoBlur', +} + +Config.ForceViewCam = false -- Forces cam view to first person when recording. +Config.RecordTime = 30 --Recording Time | 30 = 30 seconds | [*note: Dont increase the time too much or it may not upload to any service you are using for example - discord.] + +Config.PropLoc = { -- Change prop position according to ur clothing pack. + male = { + bone = 24818, + pos = vector3(0.16683200771922, 0.11320925137666, 0.11986595654326), + rot = vector3(-14.502323044318, 82.191095946679, -164.22066869048), + }, + female = { + bone = 24818, + pos = vector3(0.16683200771922, 0.11320925137666, 0.11986595654326), + rot = vector3(-14.502323044318, 82.191095946679, -164.22066869048), + }, +} + +Config.AllowedJobs = { -- Only these jobs can use bodycam/dashcam item. + 'police', + 'ambulance', +} + +Config.AllowedClass = {18} -- Vehicle classes allowed to use the dashcam feature. + +Config.WatchLoc = { + [1] = { + coords = vector3(440.149445, -979.437378, 30.453491), + rad = 1.5, + debug = false, + jobCam = {'police','ambulance'}, -- jobs mentioned here are shown in the list | false = able to view all the bodycams + carCam = { -- false = able to view all the dashcams + job = {'police'}, -- Jobs that activate dashcams shown in the list | false excludes. + class = {18} -- Dashcam activated on these vehicleclass shown in the list | false excludes. + }, + targetAuth = {'police'}, -- jobs mentioned here can use this location from target | false = everyone can access this location + + }, -- You can add more locations +} + +Config.DebugCamera = false -- Make it true if you want to get new camera offset for some vehicle. +Config.VehCamOffset = { + [`police2`] = {0.000000, 0.330000, 0.530000}, + -- [`18chgr2`] = {0.000000, 0.510000, 0.630000}, -- Example vehicle. The script comes with its own offset finder just set DebugCamera to true and get the offset. + -- [`vehiclespawncode`] = {0.000000, 0.510000, 0.630000}, +} + +-- Vehicle Classes: +-- 0: Compacts +-- 1: Sedans +-- 2: SUVs +-- 3: Coupes +-- 4: Muscle +-- 5: Sports Classics +-- 6: Sports +-- 7: Super +-- 8: Motorcycles +-- 9: Off-road +-- 10: Industrial +-- 11: Utility +-- 12: Vans +-- 13: Cycles +-- 14: Boats +-- 15: Helicopters +-- 16: Planes +-- 17: Service +-- 18: Emergency +-- 19: Military +-- 20: Commercial +-- 21: Trains +-- 22: Open Wheel \ No newline at end of file diff --git a/resources/[jobs]/[police]/[spy-bodycam]/spy-bodycam/fxmanifest.lua b/resources/[jobs]/[police]/[spy-bodycam]/spy-bodycam/fxmanifest.lua new file mode 100644 index 000000000..11c675e65 --- /dev/null +++ b/resources/[jobs]/[police]/[spy-bodycam]/spy-bodycam/fxmanifest.lua @@ -0,0 +1,29 @@ +fx_version 'cerulean' + +game "gta5" + +author "Spy-Script" +version '2.5.6' + +lua54 'yes' + +ui_page 'web/index.html' + +shared_script { + "config.lua", + '@ox_lib/init.lua', +} + +server_script { + "server/**", + '@oxmysql/lib/MySQL.lua', +} + +client_script { + 'client/**', +} + +files { + 'web/**', + "node_modules/fivem-game-view/**/*", +} diff --git a/resources/[jobs]/[police]/[spy-bodycam]/spy-bodycam/installfiles/inv_images/bodycam.png b/resources/[jobs]/[police]/[spy-bodycam]/spy-bodycam/installfiles/inv_images/bodycam.png new file mode 100644 index 000000000..3cbd45566 Binary files /dev/null and b/resources/[jobs]/[police]/[spy-bodycam]/spy-bodycam/installfiles/inv_images/bodycam.png differ diff --git a/resources/[jobs]/[police]/[spy-bodycam]/spy-bodycam/installfiles/inv_images/dashcam.png b/resources/[jobs]/[police]/[spy-bodycam]/spy-bodycam/installfiles/inv_images/dashcam.png new file mode 100644 index 000000000..6457a6949 Binary files /dev/null and b/resources/[jobs]/[police]/[spy-bodycam]/spy-bodycam/installfiles/inv_images/dashcam.png differ diff --git a/resources/[jobs]/[police]/[spy-bodycam]/spy-bodycam/installfiles/spy_bodycam.sql b/resources/[jobs]/[police]/[spy-bodycam]/spy-bodycam/installfiles/spy_bodycam.sql new file mode 100644 index 000000000..49cc76c78 --- /dev/null +++ b/resources/[jobs]/[police]/[spy-bodycam]/spy-bodycam/installfiles/spy_bodycam.sql @@ -0,0 +1,24 @@ +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET NAMES utf8 */; +/*!50503 SET NAMES utf8mb4 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +CREATE TABLE IF NOT EXISTS `spy_bodycam` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `job` varchar(255) NOT NULL, + `videolink` longtext NOT NULL, + `street` varchar(255) NOT NULL, + `date` varchar(255) NOT NULL, + `playername` varchar(255) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=42 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci; + +/*!40103 SET TIME_ZONE=IFNULL(@OLD_TIME_ZONE, 'system') */; +/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */; +/*!40014 SET FOREIGN_KEY_CHECKS=IFNULL(@OLD_FOREIGN_KEY_CHECKS, 1) */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40111 SET SQL_NOTES=IFNULL(@OLD_SQL_NOTES, 1) */; diff --git a/resources/[jobs]/[police]/[spy-bodycam]/spy-bodycam/server/server.lua b/resources/[jobs]/[police]/[spy-bodycam]/spy-bodycam/server/server.lua new file mode 100644 index 000000000..bf4ee74dc --- /dev/null +++ b/resources/[jobs]/[police]/[spy-bodycam]/spy-bodycam/server/server.lua @@ -0,0 +1,373 @@ +PlayerOnBodycam = {} +GlobalState.PlayerOnBodycam = PlayerOnBodycam +CarsOnBodycam = {} +GlobalState.CarsOnBodycam = CarsOnBodycam + +lib.callback.register('spy-bodycam:servercb:getPedCoords', function(source, targetId) + local targetPed = GetPlayerPed(targetId) + if targetPed == 0 then return false end + local targetCoords = GetEntityCoords(targetPed) + if targetCoords then return targetCoords end + +end) + +lib.callback.register('spy-bodycam:servercb:getCarCoords', function(source, netId) + local veh = NetworkGetEntityFromNetworkId(netId) + if DoesEntityExist(veh) then + local targetCoords = GetEntityCoords(veh) + if targetCoords then return targetCoords end + else + CarsOnBodycam[netId] = nil + GlobalState.CarsOnBodycam = CarsOnBodycam + return false + end +end) + +lib.callback.register('spy-bodycam:servercb:getNamESX', function(source) + local xPlayer = ESX.GetPlayerFromId(source) + local Name = xPlayer.getName() + if Name then return Name end +end) + +RegisterNetEvent('spy-bodycam:server:toggleList',function(bool) + local src = source + if bool then + if Config.Framework == 'qb' then + local Player = QBCore.Functions.GetPlayer(src) + local Name = Player.PlayerData.charinfo.firstname .. " " .. Player.PlayerData.charinfo.lastname + local Job = Player.PlayerData.job.label + local Rank = Player.PlayerData.job.grade.name + PlayerOnBodycam[src] = { + name = Name, + jobkey = Player.PlayerData.job.name, + job = Job, + rank = Rank, + } + else + local xPlayer = ESX.GetPlayerFromId(src) + local Name = xPlayer.getName() + local Job = xPlayer.getJob().label + local Rank = xPlayer.getJob().grade_label + PlayerOnBodycam[src] = { + name = Name, + jobkey = xPlayer.getJob().name, + job = Job, + rank = Rank, + } + end + + GlobalState.PlayerOnBodycam = PlayerOnBodycam + else + PlayerOnBodycam[src] = nil + GlobalState.PlayerOnBodycam = PlayerOnBodycam + end + SetTimeout(1000, function() + TriggerClientEvent('spy-bodycam:updatelisteffect',-1) + end) + +end) + +RegisterNetEvent('spy-bodycam:server:toggleListCars',function(bool,entityId,carPlate,carName,carClass) + local src = source + if bool then + local veh = NetworkGetEntityFromNetworkId(entityId) + if DoesEntityExist(veh) then + local jobkey + local Name + if Config.Framework == 'qb' then + local Player = QBCore.Functions.GetPlayer(src) + jobkey = Player.PlayerData.job.name + Name = Player.PlayerData.charinfo.firstname .. " " .. Player.PlayerData.charinfo.lastname + else + local xPlayer = ESX.GetPlayerFromId(src) + jobkey = xPlayer.getJob().name + Name = xPlayer.getName() + end + CarsOnBodycam[entityId] = { + plate = carPlate, + carname = carName, + name = Name, + jobkey = jobkey, + carclass = carClass, + } + GlobalState.CarsOnBodycam = CarsOnBodycam + else + CarsOnBodycam[entityId] = nil + GlobalState.CarsOnBodycam = CarsOnBodycam + end + else + CarsOnBodycam[entityId] = nil + GlobalState.CarsOnBodycam = CarsOnBodycam + end + SetTimeout(1000, function() + TriggerClientEvent('spy-bodycam:updatelisteffectcar',-1) + end) +end) + +RegisterNetEvent('spy-bodycam:server:ReqDeleteDecoyPed',function() + if not Config.Dependency.UseAppearance then return end + local src = source + TriggerClientEvent('spy-bodycam:client:deleteDecoyPed',-1,src) +end) + +RegisterNetEvent('spy-bodycam:server:ReqDecoyPed', function(cid, pedCoords) + if not Config.Dependency.UseAppearance then return end + local src = source + local result + local function handleDecoyPed(model, skin, pedCoords, src) + local nPlayers = lib.getNearbyPlayers(vector3(pedCoords.x, pedCoords.y, pedCoords.z), 150) + if nPlayers then + for i = 1, #nPlayers do + TriggerClientEvent('spy-bodycam:client:createDecoyPed', nPlayers[i].id, model, skin, pedCoords, src) + end + end + end + if Config.Framework == 'qb' then + result = MySQL.query.await('SELECT * FROM playerskins WHERE citizenid = ? AND active = ?', {cid, 1}) + if result[1] ~= nil then + local skinData = json.decode(result[1].skin) + if Config.Dependency.UseAppearance == 'qb' then + handleDecoyPed(tonumber(result[1].model), skinData, pedCoords, src) + elseif Config.Dependency.UseAppearance == 'illenium' then + handleDecoyPed(joaat(skinData.model), skinData, pedCoords, src) + end + end + elseif Config.Framework == 'esx' then + result = MySQL.single.await("SELECT skin FROM users WHERE identifier = ?", {cid}) + if result then + local skinData = json.decode(result.skin) + if Config.Dependency.UseAppearance == 'illenium' then + handleDecoyPed(joaat(skinData.model), skinData, pedCoords, src) + end + end + end +end) + +Citizen.CreateThread(function() + if Config.Dependency.UseInventory == 'qb' then + QBCore.Functions.CreateUseableItem('bodycam', function(source, item) + TriggerClientEvent('spy-bodycam:bodycamstatus',source) + end) + QBCore.Functions.CreateUseableItem('dashcam', function(source, item) + TriggerClientEvent('spy-bodycam:toggleCarCam',source) + end) + elseif Config.Dependency.UseInventory == 'esx' then + ESX.RegisterUsableItem('bodycam', function(playerId) + TriggerClientEvent('spy-bodycam:bodycamstatus', playerId) + end) + ESX.RegisterUsableItem('dashcam', function(playerId) + TriggerClientEvent('spy-bodycam:toggleCarCam', playerId) + end) + end +end) + +RegisterNetEvent('spy-bodycam:server:logVideoDetails', function(videoUrl,streetName) + local src = source + local offName + local offJob + local offRank + local jobKey + local date = os.date('%Y-%m-%d') + + if Config.Framework == 'qb' then + local Player = QBCore.Functions.GetPlayer(src) + offName = Player.PlayerData.charinfo.firstname .. " " .. Player.PlayerData.charinfo.lastname + offJob = Player.PlayerData.job.label + offRank = Player.PlayerData.job.grade.name + jobKey = Player.PlayerData.job.name + else + local xPlayer = ESX.GetPlayerFromId(src) + offName = xPlayer.getName() + offJob = xPlayer.getJob().label + offRank = xPlayer.getJob().grade_label + jobKey = xPlayer.getJob().name + end + + ---SQL UPLOAD + MySQL.Async.execute('INSERT INTO spy_bodycam (job, videolink, street, date, playername) VALUES (@job, @videolink, @street, @date, @playername)', { + ['@job'] = jobKey, + ['@videolink'] = videoUrl, + ['@street'] = streetName, + ['@date'] = date, + ['@playername'] = offName + }, function(rowsChanged) end) + + if Upload.DiscordLogs.Enabled then + local defwebhook + local author + if Upload.JobUploads[jobKey] then + defwebhook = Upload.JobUploads[jobKey].webhook + author = Upload.JobUploads[jobKey].author + else + defwebhook = Upload.DefaultUploads.webhook + author = Upload.DefaultUploads.author + end + local embedData = { + { + title = Upload.DiscordLogs.Title, + color = 16761035, + fields = { + { name = "Name:", value = offName, inline = false }, + { name = "Job:", value = offJob, inline = false }, + { name = "Job Rank:", value = offRank, inline = false }, + }, + footer = { + text = "Date: " .. os.date("!%Y-%m-%d %H:%M:%S", os.time()), + icon_url = "https://i.imgur.com/CuSyeZT.png", + }, + author = author + } + } + PerformHttpRequest(defwebhook, function() end, 'POST', json.encode({ username = Upload.DiscordLogs.Username, embeds = embedData}), { ['Content-Type'] = 'application/json' }) + end +end) + +RegisterNetEvent('spy-bodycam:server:deleteVideoDB', function(videoUrl) + local src = source + if not videoUrl or videoUrl == '' then return end + MySQL.Async.execute('DELETE FROM spy_bodycam WHERE videolink = @videolink', { + ['@videolink'] = videoUrl + }, function(rowsChanged) + if rowsChanged > 0 then + local jobKey + local isBoss + if Config.Framework == 'qb' then + local Player = QBCore.Functions.GetPlayer(src) + jobKey = Player.PlayerData.job.name + isBoss = Player.PlayerData.job.isboss + else + local xPlayer = ESX.GetPlayerFromId(src) + jobKey = xPlayer.getJob().name + isBoss = (xPlayer.getJob().grade_name == 'boss') + end + MySQL.Async.fetchAll('SELECT * FROM spy_bodycam WHERE job = @job ORDER BY id DESC', { + ['@job'] = jobKey + }, function(records) + TriggerClientEvent('spy-bodycam:client:refreshRecords', src, records, isBoss) + end) + end + end) +end) + +RegisterNetEvent('spy-bodycam:server:showrecordingUI', function() + local src = source + local offJob + local jobKey + local isBoss + if Config.Framework == 'qb' then + local Player = QBCore.Functions.GetPlayer(src) + offJob = Player.PlayerData.job.label + jobKey = Player.PlayerData.job.name + isBoss = Player.PlayerData.job.isboss + else + local xPlayer = ESX.GetPlayerFromId(src) + offJob = xPlayer.getJob().label + jobKey = xPlayer.getJob().name + if xPlayer.getJob().grade_name == 'boss' then isBoss = true else isBoss = false end + end + MySQL.Async.fetchAll('SELECT * FROM spy_bodycam WHERE job = @job ORDER BY id DESC', { + ['@job'] = jobKey + }, function(records) + TriggerClientEvent('spy-bodycam:client:openRecords', src, records, offJob, isBoss) + end) +end) + +lib.addCommand('recordcam', { + help = 'Record bodycam footage.', + restricted = false +}, function(source, args, raw) + local src = source + if PlayerOnBodycam[src] then + local defwebhook + if Upload.ServiceUsed == 'discord' then + local jobKey + if Config.Framework == 'qb' then + local Player = QBCore.Functions.GetPlayer(src) + jobKey = Player.PlayerData.job.name + else + local xPlayer = ESX.GetPlayerFromId(src) + jobKey = xPlayer.getJob().name + end + if Upload.JobUploads[jobKey] then + defwebhook = Upload.JobUploads[jobKey].webhook + else + defwebhook = Upload.DefaultUploads.webhook + end + elseif Upload.ServiceUsed == 'fivemanage' or Upload.ServiceUsed == 'fivemerr' then + defwebhook = Upload.Token + end + TriggerClientEvent('spy-bodycam:client:startRec',src,defwebhook,Upload.ServiceUsed) + else + NotifyPlayerSv('Bodycam not turned on!','error',3000,src) + end +end) + +function NotifyPlayerSv(msg,type,time,src) + if Config.Dependency.UseNotify == 'ox' then + TriggerClientEvent('ox_lib:notify', src, { type = type or "success", title = '', description = msg, duration = time }) + elseif Config.Dependency.UseNotify == 'qb' then + TriggerClientEvent("QBCore:Notify", src, msg, type,time) + elseif Config.Dependency.UseNotify == 'esx' then + TriggerClientEvent("esx:showNotification", src, msg, type) + end +end + +-- You can remove this if u want more optimization from the script. +-- If the vehicle is deleted or send to garage it removes it from the list. +Citizen.CreateThread(function() + while true do + for entityId, _ in pairs(CarsOnBodycam) do + local veh = NetworkGetEntityFromNetworkId(entityId) + if not DoesEntityExist(veh) then + CarsOnBodycam[entityId] = nil + GlobalState.CarsOnBodycam = CarsOnBodycam + end + end + Citizen.Wait(60000) -- Wait for 1 min before checking again + end +end) + +-- Script Version Checker +local localVersion = GetResourceMetadata(GetCurrentResourceName(), 'version') +local fxManifestUrl = "https://raw.githubusercontent.com/Your-Spy/spy-bodycam/main/%5Bspy-bodycam%5D/spy-bodycam/fxmanifest.lua" + +local function extractVersion(fxManifestContent) + for line in string.gmatch(fxManifestContent, "[^\r\n]+") do + if line:find("^version%s+'(.-)'$") then + return line:match("^version%s+'(.-)'$") + end + end + return nil +end + +local function checkForUpdates() + PerformHttpRequest(fxManifestUrl, function(statusCode, response, headers) + print([[^4 +╔───────────────────────────────────────────────────────────────────────╗ + ____ ______ __ ____ ___ ______ ______ _ __ __ + / ___|| _ \ \ / / | __ ) / _ \| _ \ \ / / ___| / \ | \/ | + \___ \| |_) \ V / _____ | _ \| | | | | | \ V / | / _ \ | |\/| | + ___) | __/ | | |_____| | |_) | |_| | |_| || || |___ / ___ \| | | | + |____/|_| |_| |____/ \___/|____/ |_| \____/_/ \_\_| |_| + +╚───────────────────────────────────────────────────────────────────────╝ + ]]) + if statusCode == 200 then + local remoteVersion = extractVersion(response) + if remoteVersion and remoteVersion ~= localVersion then + print("^2NEW UPDATE: ^2" .. remoteVersion .. "^3 | ^1CURRENT: " .. localVersion.." ^9>> Download new version from github") + else + print("^2You are on latest version: ^2" .. localVersion) + end + else + print("^1Failed to check for updates. Status code: " .. statusCode) + end + end, "GET", "", {["Content-Type"] = "text/plain"}) +end + +AddEventHandler('onResourceStart', function(resourceName) + if GetCurrentResourceName() == resourceName then + checkForUpdates() + end +end) + diff --git a/resources/[jobs]/[police]/[spy-bodycam]/spy-bodycam/server/upload_config.lua b/resources/[jobs]/[police]/[spy-bodycam]/spy-bodycam/server/upload_config.lua new file mode 100644 index 000000000..686be0e1a --- /dev/null +++ b/resources/[jobs]/[police]/[spy-bodycam]/spy-bodycam/server/upload_config.lua @@ -0,0 +1,32 @@ +Upload = Upload or {} + +-- U have to start the recording using /recordcam and the recording will be uploaded to any of the service below. + +Upload.ServiceUsed = 'fivemanage' -- discord | fivemanage | fivemerr +Upload.Token = 'c6sTqXXzOJksi7hKs0vMFuN8yUmJfcb1' -- fivemanage or fivemerr | [*note - for discord webhook is to be changed below not here] + +-- FOR DISCORD LOGS +Upload.DiscordLogs = { + Enabled = false, + Username = 'Spy Bodycam Records', -- Bot Username + Title = 'Bodycam Records', -- Message Title +} + +-- Upload Hooks if Upload.ServiceUsed = discord +Upload.DefaultUploads = { -- Default Upload of log if job not mentioned in Upload.JobUploads. + webhook = 'YOUR_WEBHOOK', + author = { + name = "Spy Bodycam", + icon_url = "https://i.imgur.com/tMyAdkz.png" + } +} + +Upload.JobUploads = { -- Job Speific Uploads + ['police'] = { + webhook = 'YOUR_WEBHOOK', + author = { + name = "Police Department", + icon_url = "https://i.imgur.com/tMyAdkz.png" + } + }, -- Add more here +} diff --git a/resources/[jobs]/[police]/[spy-bodycam]/spy-bodycam/web/audio/off_sound.mp3 b/resources/[jobs]/[police]/[spy-bodycam]/spy-bodycam/web/audio/off_sound.mp3 new file mode 100644 index 000000000..d2f7cfdd7 Binary files /dev/null and b/resources/[jobs]/[police]/[spy-bodycam]/spy-bodycam/web/audio/off_sound.mp3 differ diff --git a/resources/[jobs]/[police]/[spy-bodycam]/spy-bodycam/web/audio/on_sound.mp3 b/resources/[jobs]/[police]/[spy-bodycam]/spy-bodycam/web/audio/on_sound.mp3 new file mode 100644 index 000000000..29e2cbc92 Binary files /dev/null and b/resources/[jobs]/[police]/[spy-bodycam]/spy-bodycam/web/audio/on_sound.mp3 differ diff --git a/resources/[jobs]/[police]/[spy-bodycam]/spy-bodycam/web/images/brand_logo.png b/resources/[jobs]/[police]/[spy-bodycam]/spy-bodycam/web/images/brand_logo.png new file mode 100644 index 000000000..8eef6d556 Binary files /dev/null and b/resources/[jobs]/[police]/[spy-bodycam]/spy-bodycam/web/images/brand_logo.png differ diff --git a/resources/[jobs]/[police]/[spy-bodycam]/spy-bodycam/web/index.html b/resources/[jobs]/[police]/[spy-bodycam]/spy-bodycam/web/index.html new file mode 100644 index 000000000..23ade29bb --- /dev/null +++ b/resources/[jobs]/[police]/[spy-bodycam]/spy-bodycam/web/index.html @@ -0,0 +1,87 @@ + + +
+ + +