From 7abba54ccbe50d560303b23dd59863e149a4e8ce Mon Sep 17 00:00:00 2001 From: bitpredator <67551273+bitpredator@users.noreply.github.com> Date: Tue, 25 Jun 2024 10:19:49 +0200 Subject: [PATCH 01/12] chore: code formatting + graphic rework --- .../esx_scoreboard/fxmanifest.lua | 6 +-- .../esx_scoreboard/html/listener.js | 2 +- .../esx_scoreboard/html/scoreboard.html | 9 ----- .../esx_scoreboard/html/style.css | 40 ++++++++++++++++++- 4 files changed, 42 insertions(+), 15 deletions(-) diff --git a/server-data/resources/[esx_addons]/esx_scoreboard/fxmanifest.lua b/server-data/resources/[esx_addons]/esx_scoreboard/fxmanifest.lua index 970dd09c1..6b9f08625 100644 --- a/server-data/resources/[esx_addons]/esx_scoreboard/fxmanifest.lua +++ b/server-data/resources/[esx_addons]/esx_scoreboard/fxmanifest.lua @@ -4,15 +4,15 @@ games({ "gta5" }) ui_page("html/scoreboard.html") files({ - "html/*", + "html/*", }) shared_script("@es_extended/imports.lua") client_scripts({ - "client/main.lua", + "client/main.lua", }) server_scripts({ - "server/main.lua", + "server/main.lua", }) diff --git a/server-data/resources/[esx_addons]/esx_scoreboard/html/listener.js b/server-data/resources/[esx_addons]/esx_scoreboard/html/listener.js index ecb688db5..373e92d97 100644 --- a/server-data/resources/[esx_addons]/esx_scoreboard/html/listener.js +++ b/server-data/resources/[esx_addons]/esx_scoreboard/html/listener.js @@ -53,7 +53,7 @@ $(function () { break; default: console.log('esx_scoreboard: unknown action!'); - break; + break; } }, false); }); diff --git a/server-data/resources/[esx_addons]/esx_scoreboard/html/scoreboard.html b/server-data/resources/[esx_addons]/esx_scoreboard/html/scoreboard.html index 5a1094559..b8541526a 100644 --- a/server-data/resources/[esx_addons]/esx_scoreboard/html/scoreboard.html +++ b/server-data/resources/[esx_addons]/esx_scoreboard/html/scoreboard.html @@ -10,15 +10,6 @@
PLAYERS 0 - 48
- -Discord - Documentation + This Simple resource lets you finally contribute to Society and make a difference in the Word! How? it adds an amazing Menu where you can pick what you want to be in life - want to be a police officier? No-problem! Or maybe you want to stalk people and be a creepy reporter? We got you covered! ## Legal diff --git a/server-data/resources/[esx_addons]/esx_joblisting/client/main.lua b/server-data/resources/[esx_addons]/esx_joblisting/client/main.lua index 5e958e133..de37b63a9 100644 --- a/server-data/resources/[esx_addons]/esx_joblisting/client/main.lua +++ b/server-data/resources/[esx_addons]/esx_joblisting/client/main.lua @@ -1,81 +1,80 @@ local menuIsShowed, TextUIdrawing = false, false function ShowJobListingMenu() - menuIsShowed = true - ESX.TriggerServerCallback('esx_joblisting:getJobsList', function(jobs) - local elements = {{unselectable = "true", title = _U('job_center'), icon = "fas fa-briefcase"}} + menuIsShowed = true + ESX.TriggerServerCallback("esx_joblisting:getJobsList", function(jobs) + local elements = { { unselectable = "true", title = TranslateCap("job_center"), icon = "fas fa-briefcase" } } - for i = 1, #(jobs) do - elements[#elements + 1] = {title = jobs[i].label, name = jobs[i].name} - end + for i = 1, #jobs do + elements[#elements + 1] = { title = jobs[i].label, name = jobs[i].name } + end - ESX.OpenContext("right", elements, function(menu, SelectJob) - TriggerServerEvent('esx_joblisting:setJob', SelectJob.name) - ESX.CloseContext() - ESX.ShowNotification(_U('new_job', SelectJob.title), "success") - menuIsShowed = false - TextUIdrawing = false - end, function() - menuIsShowed = false - TextUIdrawing = false + ESX.OpenContext("right", elements, function(menu, SelectJob) + TriggerServerEvent("esx_joblisting:setJob", SelectJob.name) + ESX.CloseContext() + ESX.ShowNotification(TranslateCap("new_job", SelectJob.title), "success") + menuIsShowed = false + TextUIdrawing = false + end, function() + menuIsShowed = false + TextUIdrawing = false + end) end) - end) end -- Activate menu when player is inside marker, and draw markers CreateThread(function() - while true do - local Sleep = 1500 + while true do + local Sleep = 1500 - local coords = GetEntityCoords(ESX.PlayerData.ped) - local isInMarker = false + local coords = GetEntityCoords(ESX.PlayerData.ped) + local isInMarker = false - for i = 1, #Config.Zones, 1 do - local distance = #(coords - Config.Zones[i]) + for i = 1, #Config.Zones, 1 do + local distance = #(coords - Config.Zones[i]) - if distance < Config.DrawDistance then - Sleep = 0 - DrawMarker(Config.MarkerType, Config.Zones[i], 0.0, 0.0, 0.0, 0, 0.0, 0.0, Config.ZoneSize.x, Config.ZoneSize.y, Config.ZoneSize.z, - Config.MarkerColor.r, Config.MarkerColor.g, Config.MarkerColor.b, 100, false, true, 2, false, false, false, false) - end + if distance < Config.DrawDistance then + Sleep = 0 + DrawMarker(Config.MarkerType, Config.Zones[i], 0.0, 0.0, 0.0, 0, 0.0, 0.0, Config.ZoneSize.x, Config.ZoneSize.y, Config.ZoneSize.z, Config.MarkerColor.r, Config.MarkerColor.g, Config.MarkerColor.b, 100, false, true, 2, false, false, false, false) + end - if distance < (Config.ZoneSize.x / 2) then - isInMarker = true - if not TextUIdrawing then - ESX.TextUI(_U("access_job_center")) - TextUIdrawing = true + if distance < (Config.ZoneSize.x / 2) then + isInMarker = true + if not TextUIdrawing then + ESX.TextUI(TranslateCap("access_job_center")) + TextUIdrawing = true + end + if IsControlJustReleased(0, 38) and not menuIsShowed then + ShowJobListingMenu() + ESX.HideUI() + end + end end - if IsControlJustReleased(0, 38) and not menuIsShowed then - ShowJobListingMenu() - ESX.HideUI() + + if not isInMarker and TextUIdrawing then + ESX.HideUI() + TextUIdrawing = false end - end - end - if not isInMarker and TextUIdrawing then - ESX.HideUI() - TextUIdrawing = false + Wait(Sleep) end - - Wait(Sleep) - end end) -- Create blips if Config.Blip.Enabled then - CreateThread(function() - for i = 1, #Config.Zones, 1 do - local blip = AddBlipForCoord(Config.Zones[i]) + CreateThread(function() + for i = 1, #Config.Zones, 1 do + local blip = AddBlipForCoord(Config.Zones[i]) - SetBlipSprite(blip, Config.Blip.Sprite) - SetBlipDisplay(blip, Config.Blip.Display) - SetBlipScale(blip, Config.Blip.Scale) - SetBlipColour(blip, Config.Blip.Colour) - SetBlipAsShortRange(blip, Config.Blip.ShortRange) + SetBlipSprite(blip, Config.Blip.Sprite) + SetBlipDisplay(blip, Config.Blip.Display) + SetBlipScale(blip, Config.Blip.Scale) + SetBlipColour(blip, Config.Blip.Colour) + SetBlipAsShortRange(blip, Config.Blip.ShortRange) - BeginTextCommandSetBlipName("STRING") - AddTextComponentSubstringPlayerName(_U('blip_text')) - EndTextCommandSetBlipName(blip) - end - end) -end \ No newline at end of file + BeginTextCommandSetBlipName("STRING") + AddTextComponentSubstringPlayerName(TranslateCap("blip_text")) + EndTextCommandSetBlipName(blip) + end + end) +end diff --git a/server-data/resources/[esx_addons]/esx_joblisting/config.lua b/server-data/resources/[esx_addons]/esx_joblisting/config.lua index 6da00a446..dd2b7fb25 100644 --- a/server-data/resources/[esx_addons]/esx_joblisting/config.lua +++ b/server-data/resources/[esx_addons]/esx_joblisting/config.lua @@ -1,22 +1,22 @@ Config = {} Config.DrawDistance = 15.0 -Config.ZoneSize = {x = 2.7, y = 2.7, z = 0.5} -Config.MarkerColor = {r = 100, g = 200, b = 104} +Config.ZoneSize = { x = 2.7, y = 2.7, z = 0.5 } +Config.MarkerColor = { r = 100, g = 200, b = 104 } Config.MarkerType = 27 Config.Debug = ESX.GetConfig().EnableDebug -Config.Locale = 'en' +Config.Locale = GetConvar("esx:locale", "it") Config.Zones = { - vector3(-265.08, -964.1, 30.3) + vector3(-265.08, -964.1, 30.3), } Config.Blip = { - Enabled = true, - Sprite = 407, - Display = 4, - Scale = 0.8, - Colour = 27, - ShortRange = true -} \ No newline at end of file + Enabled = true, + Sprite = 407, + Display = 4, + Scale = 0.8, + Colour = 27, + ShortRange = true, +} diff --git a/server-data/resources/[esx_addons]/esx_joblisting/fxmanifest.lua b/server-data/resources/[esx_addons]/esx_joblisting/fxmanifest.lua index 0eff08bf1..4923ba92e 100644 --- a/server-data/resources/[esx_addons]/esx_joblisting/fxmanifest.lua +++ b/server-data/resources/[esx_addons]/esx_joblisting/fxmanifest.lua @@ -1,19 +1,20 @@ -fx_version 'bodacious' -game 'gta5' +fx_version("bodacious") +game("gta5") -description 'ESX Job Listing' -lua54 'yes' -version '1.0.0' +description("Provides a way for players to select a job") +lua54("yes") +version("1.0") +legacyversion("1.9.1") -shared_scripts { - '@es_extended/imports.lua', - '@es_extended/locale.lua', - 'locales/*.lua', - 'config.lua' -} +shared_scripts({ + "@es_extended/imports.lua", + "@es_extended/locale.lua", + "locales/*.lua", + "config.lua", +}) -server_script 'server/main.lua' +server_script("server/main.lua") -client_script 'client/main.lua' +client_script("client/main.lua") -dependency 'es_extended' +dependency("es_extended") diff --git a/server-data/resources/[esx_addons]/esx_joblisting/locales/cs.lua b/server-data/resources/[esx_addons]/esx_joblisting/locales/cs.lua deleted file mode 100644 index 8c9341768..000000000 --- a/server-data/resources/[esx_addons]/esx_joblisting/locales/cs.lua +++ /dev/null @@ -1,5 +0,0 @@ -Locales['cs'] = { - ['new_job'] = 'mate novou praci!', - ['access_job_center'] = 'stiskni ~INPUT_PICKUP~ pro pristup na Urad prace.', - ['job_center'] = 'Urad prace', -} diff --git a/server-data/resources/[esx_addons]/esx_joblisting/locales/de.lua b/server-data/resources/[esx_addons]/esx_joblisting/locales/de.lua deleted file mode 100644 index 9de572907..000000000 --- a/server-data/resources/[esx_addons]/esx_joblisting/locales/de.lua +++ /dev/null @@ -1,6 +0,0 @@ -Locales['de'] = { - ['new_job'] = 'Neuer Job: ~b~%s~s~ !', - ['access_job_center'] = 'Drücke ~b~[E]~s~ um die Jobauswahl zu öffnen!', - ['job_center'] = 'Wähle einen Job aus.', - ["blip_text"] = "Arbeitsamt" -} diff --git a/server-data/resources/[esx_addons]/esx_joblisting/locales/en.lua b/server-data/resources/[esx_addons]/esx_joblisting/locales/en.lua index 901e076f9..beda0b8ed 100644 --- a/server-data/resources/[esx_addons]/esx_joblisting/locales/en.lua +++ b/server-data/resources/[esx_addons]/esx_joblisting/locales/en.lua @@ -1,6 +1,6 @@ -Locales['en'] = { - ['new_job'] = 'New Job: ~b~%s~s~ !', - ['access_job_center'] = 'Press ~b~[E]~s~ To Open Job Selector.', - ['job_center'] = 'Select A Job.', - ["blip_text"] = "Job Centre" +Locales["en"] = { + ["new_job"] = "New Job: ~b~%s~s~ !", + ["access_job_center"] = "Press ~b~[E]~s~ To Open Job Selector.", + ["job_center"] = "Select A Job.", + ["blip_text"] = "Job Centre", } diff --git a/server-data/resources/[esx_addons]/esx_joblisting/locales/es.lua b/server-data/resources/[esx_addons]/esx_joblisting/locales/es.lua deleted file mode 100644 index 119c90cfe..000000000 --- a/server-data/resources/[esx_addons]/esx_joblisting/locales/es.lua +++ /dev/null @@ -1,6 +0,0 @@ -Locales['es'] = { - ['new_job'] = '¡Tienes un trabajo nuevo!', - ['access_job_center'] = 'Pulsa ~INPUT_PICKUP~ para entrar a la Oficina de Empleo.', - ['job_center'] = 'Oficina de Empleo', - ["blip_text"] = "Oficina de Empleo" -} diff --git a/server-data/resources/[esx_addons]/esx_joblisting/locales/fi.lua b/server-data/resources/[esx_addons]/esx_joblisting/locales/fi.lua deleted file mode 100644 index 8cd2cd514..000000000 --- a/server-data/resources/[esx_addons]/esx_joblisting/locales/fi.lua +++ /dev/null @@ -1,5 +0,0 @@ -Locales['fi'] = { - ['new_job'] = 'Sinulla on nyt uusi työ!', - ['access_job_center'] = 'Paina ~INPUT_PICKUP~ vaihtaaksesi työtä.', - ['job_center'] = 'Työkeskus', -} diff --git a/server-data/resources/[esx_addons]/esx_joblisting/locales/fr.lua b/server-data/resources/[esx_addons]/esx_joblisting/locales/fr.lua deleted file mode 100644 index f989e05c8..000000000 --- a/server-data/resources/[esx_addons]/esx_joblisting/locales/fr.lua +++ /dev/null @@ -1,6 +0,0 @@ -Locales['fr'] = { - ['new_job'] = 'Vous avez un nouveau métier: ~b~%s~s~ !', - ['access_job_center'] = 'Appuyez sur ~b~[E]~s~ pour ouvrir le sélécteur de métiers.', - ['job_center'] = 'Séléctionnez un métier.', - ["blip_text"] = "Pôle emploi" -} diff --git a/server-data/resources/[esx_addons]/esx_joblisting/locales/hu.lua b/server-data/resources/[esx_addons]/esx_joblisting/locales/hu.lua deleted file mode 100644 index 36cb83656..000000000 --- a/server-data/resources/[esx_addons]/esx_joblisting/locales/hu.lua +++ /dev/null @@ -1,5 +0,0 @@ -Locales['hu'] = { - ['new_job'] = 'Felvetted a munkát!', - ['access_job_center'] = 'Nyomj ~b~[E]~s~ hogy megnézd a munkákat', - ['job_center'] = 'Munkaügyi központ', -} diff --git a/server-data/resources/[esx_addons]/esx_joblisting/locales/it.lua b/server-data/resources/[esx_addons]/esx_joblisting/locales/it.lua index fdbb54444..991ba82d4 100644 --- a/server-data/resources/[esx_addons]/esx_joblisting/locales/it.lua +++ b/server-data/resources/[esx_addons]/esx_joblisting/locales/it.lua @@ -1,6 +1,6 @@ -Locales['it'] = { - ['new_job'] = 'Nuovo lavoro: ~b~%s~s~ !', - ['access_job_center'] = 'Premi ~b~[E]~s~ per aprire la scelta dei lavori.', - ['job_center'] = 'Seleziona un lavoro.', - ["blip_text"] = "Centro impieghi" +Locales["it"] = { + ["new_job"] = "Nuovo lavoro: ~b~%s~s~ !", + ["access_job_center"] = "Premi ~b~[E]~s~ per aprire la scelta dei lavori.", + ["job_center"] = "Seleziona un lavoro.", + ["blip_text"] = "Centro impieghi", } diff --git a/server-data/resources/[esx_addons]/esx_joblisting/locales/nl.lua b/server-data/resources/[esx_addons]/esx_joblisting/locales/nl.lua deleted file mode 100644 index 7152f0266..000000000 --- a/server-data/resources/[esx_addons]/esx_joblisting/locales/nl.lua +++ /dev/null @@ -1,6 +0,0 @@ -Locales['nl'] = { - ['new_job'] = 'Nieuwe baan: ~b~%s~s~ !', - ['access_job_center'] = 'Klik op ~b~[E]~s~ om het uitzendbureau te openen.', - ['job_center'] = 'Selecteer een baan.', - ["blip_text"] = "Uitzendbureau" -} diff --git a/server-data/resources/[esx_addons]/esx_joblisting/locales/pl.lua b/server-data/resources/[esx_addons]/esx_joblisting/locales/pl.lua deleted file mode 100644 index 9f22e657a..000000000 --- a/server-data/resources/[esx_addons]/esx_joblisting/locales/pl.lua +++ /dev/null @@ -1,5 +0,0 @@ -Locales['pl'] = { - ['new_job'] = 'masz nową pracę!', - ['access_job_center'] = 'wciśnij ~INPUT_PICKUP~ aby otworzyć urząd pracy.', - ['job_center'] = 'urząd Pracy', -} diff --git a/server-data/resources/[esx_addons]/esx_joblisting/locales/sl.lua b/server-data/resources/[esx_addons]/esx_joblisting/locales/sl.lua deleted file mode 100644 index 4e909d2fe..000000000 --- a/server-data/resources/[esx_addons]/esx_joblisting/locales/sl.lua +++ /dev/null @@ -1,8 +0,0 @@ -Locales['sl'] = { - ['new_job'] = 'imaš novo službo!', - ['access_job_center'] = 'pritisnite ~INPUT_PICKUP~ za dostop do job center.', - ['job_center'] = 'center za delovna mesta', - ['new_job'] = 'Imate novo Službo!', - ['access_job_center'] = 'Pritisni ~INPUT_PICKUP~ za dostop do Borze.', - ['job_center'] = 'Center za Zaposlovanje', -} \ No newline at end of file diff --git a/server-data/resources/[esx_addons]/esx_joblisting/locales/sr.lua b/server-data/resources/[esx_addons]/esx_joblisting/locales/sr.lua deleted file mode 100644 index bdc5869bf..000000000 --- a/server-data/resources/[esx_addons]/esx_joblisting/locales/sr.lua +++ /dev/null @@ -1,6 +0,0 @@ -Locales['sr'] = { - ['new_job'] = 'Novi Posao: ~b~%s~s~ !', - ['access_job_center'] = 'Pritisnite ~b~[E]~s~ da biste otvorili centar za zapošljavanje.', - ['job_center'] = 'Izaberite posao.', - ["blip_text"] = "Centar za Zapošljavanje" -} diff --git a/server-data/resources/[esx_addons]/esx_joblisting/locales/zh-cn.lua b/server-data/resources/[esx_addons]/esx_joblisting/locales/zh-cn.lua deleted file mode 100644 index cf9657c9f..000000000 --- a/server-data/resources/[esx_addons]/esx_joblisting/locales/zh-cn.lua +++ /dev/null @@ -1,6 +0,0 @@ -Locales['zh-cn'] = { - ['new_job'] = '新工作: ~b~%s~s~ !', - ['access_job_center'] = '摁下 ~b~[E]~s~ 打开就业中心.', - ['job_center'] = '选择工作.', - ["blip_text"] = "就业中心" -} diff --git a/server-data/resources/[esx_addons]/esx_joblisting/server/main.lua b/server-data/resources/[esx_addons]/esx_joblisting/server/main.lua index 181e02f93..b4822750f 100644 --- a/server-data/resources/[esx_addons]/esx_joblisting/server/main.lua +++ b/server-data/resources/[esx_addons]/esx_joblisting/server/main.lua @@ -1,55 +1,55 @@ function getJobs() - local jobs = ESX.GetJobs() - local availableJobs = {} - for k, v in pairs(jobs) do - if v.whitelisted == false then - availableJobs[#availableJobs + 1] = {label = v.label, name = k} + local jobs = ESX.GetJobs() + local availableJobs = {} + for k, v in pairs(jobs) do + if v.whitelisted == false then + availableJobs[#availableJobs + 1] = { label = v.label, name = k } + end end - end - return availableJobs + return availableJobs end -ESX.RegisterServerCallback('esx_joblisting:getJobsList', function(source, cb) - local jobs = getJobs() - cb(jobs) +ESX.RegisterServerCallback("esx_joblisting:getJobsList", function(source, cb) + local jobs = getJobs() + cb(jobs) end) function IsJobAvailable(job) - local jobs = ESX.GetJobs() - local JobToCheck = jobs[job] - return not JobToCheck.whitelisted + local jobs = ESX.GetJobs() + local JobToCheck = jobs[job] + return not JobToCheck.whitelisted end function IsNearCentre(player) - local Ped = GetPlayerPed(player) - local PedCoords = GetEntityCoords(Ped) - local Zones = Config.Zones - local Close = false + local Ped = GetPlayerPed(player) + local PedCoords = GetEntityCoords(Ped) + local Zones = Config.Zones + local Close = false - for i = 1, #Config.Zones, 1 do - local distance = #(PedCoords - Config.Zones[i]) + for i = 1, #Config.Zones, 1 do + local distance = #(PedCoords - Config.Zones[i]) - if distance < Config.DrawDistance then - Close = true + if distance < Config.DrawDistance then + Close = true + end end - end - return Close + return Close end -RegisterServerEvent('esx_joblisting:setJob') -AddEventHandler('esx_joblisting:setJob', function(job) - local source = source - local xPlayer = ESX.GetPlayerFromId(source) - local jobs = getJobs() - - if xPlayer and IsNearCentre(source) and IsJobAvailable(job) then - if ESX.DoesJobExist(job, 0) then - xPlayer.setJob(job, 0) +RegisterServerEvent("esx_joblisting:setJob") +AddEventHandler("esx_joblisting:setJob", function(job) + local source = source + local xPlayer = ESX.GetPlayerFromId(source) + local jobs = getJobs() + + if xPlayer and IsNearCentre(source) and IsJobAvailable(job) then + if ESX.DoesJobExist(job, 0) then + xPlayer.setJob(job, 0) + else + print("[^1ERROR^7] Tried Setting User ^5" .. source .. "^7 To Invalid Job - ^5" .. job .. "^7!") + end else - print("[^1ERROR^7] Tried Setting User ^5".. source .. "^7 To Invalid Job - ^5"..job .."^7!") + print("[^3WARNING^7] User ^5" .. source .. "^7 Attempted to Exploit ^5`esx_joblisting:setJob`^7!") end - else - print("[^3WARNING^7] User ^5".. source .. "^7 Attempted to Exploit ^5`esx_joblisting:setJob`^7!") - end -end) \ No newline at end of file +end) From 2b5dfc1e5b996baf55587aab4aee693d29c1a781 Mon Sep 17 00:00:00 2001 From: bitpredator <67551273+bitpredator@users.noreply.github.com> Date: Wed, 26 Jun 2024 19:00:05 +0200 Subject: [PATCH 07/12] =?UTF-8?q?chore:=20esx=5Fproperty=20=F0=9F=8E=A8=20?= =?UTF-8?q?Run=20formatter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../[esx_addons]/esx_property/LICENSE | 4 +- .../[esx_addons]/esx_property/README.md | 13 +- .../[esx_addons]/esx_property/client/cctv.lua | 503 ++- .../esx_property/client/furniture.lua | 889 ++--- .../esx_property/client/html/copy.html | 37 +- .../[esx_addons]/esx_property/client/main.lua | 3468 +++++++---------- .../[esx_addons]/esx_property/config.lua | 1162 +++--- .../[esx_addons]/esx_property/fxmanifest.lua | 20 +- .../[esx_addons]/esx_property/locales/en.lua | 419 +- .../[esx_addons]/esx_property/locales/it.lua | 419 +- .../[esx_addons]/esx_property/server/main.lua | 2331 +++++------ 11 files changed, 3993 insertions(+), 5272 deletions(-) diff --git a/server-data/resources/[esx_addons]/esx_property/LICENSE b/server-data/resources/[esx_addons]/esx_property/LICENSE index 5c0cc6276..6559572bf 100644 --- a/server-data/resources/[esx_addons]/esx_property/LICENSE +++ b/server-data/resources/[esx_addons]/esx_property/LICENSE @@ -632,7 +632,7 @@ state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. ESX Property - Properties Made Right! - Copyright (C) 2022 ESX-Framework + Copyright (C) 2024 ESX-Framework This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: - esx-legacy Copyright (C) 2015-2022 Jérémie N'gadi + esx-legacy Copyright (C) 2015-2024 Jérémie N'gadi This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. diff --git a/server-data/resources/[esx_addons]/esx_property/README.md b/server-data/resources/[esx_addons]/esx_property/README.md index b66fde362..dfdc00201 100644 --- a/server-data/resources/[esx_addons]/esx_property/README.md +++ b/server-data/resources/[esx_addons]/esx_property/README.md @@ -1,4 +1,4 @@ -
Discord - Website - Documentation +
Discord - Documentation
## Features
@@ -40,16 +40,23 @@
* ESX Progressbar *for Raiding* *
* ESX Datastore *for wardrobe* *
* ESX Clotheshop *for wardrobe* *
+* [k4mb1 Starter Shells](https://www.k4mb1maps.com/package/5015840) *only for shell use* *
* [bob74_ipl](https://github.com/Bob74/bob74_ipl) *only for IPL use* *
> `*` = Optional
## Create A Property
+
+* [Menu Preview](https://prnt.sc/Xczb5Fs9xW-t)
* Use the command `property:create` while an admin
* Set Street Number
* Set Price of Property
* Select an Interior
+ > Note: To Use the Default Shells, you **NEED** [this Shell Pack](https://www.k4mb1maps.com/package/5015840)
+ > [Catagory Selection](https://prnt.sc/3RGaIEVTL6zw)
+
+ > [Interior Selection](https://prnt.sc/za9aOSsuqkce)
* Set The Entrance Position
> Note: Uses Player`s Current Coordinates
@@ -65,11 +72,13 @@
* From There, you can select A property
* You Can then either `Manage`, `Teleport To Entrance` or `Delete`
* Allows you to edit all options and evict users
+* [Menu Preview](https://prnt.sc/Jpxox2ZcKn9G)
+* [Menu Preview 2](https://prnt.sc/IbP-ynHgYSMA)
# Copyright
ESX Property - Properties Made Right!
- Copyright (C) 2022 ESX-Framework
+ Copyright (C) 2024 ESX-Framework
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/server-data/resources/[esx_addons]/esx_property/client/cctv.lua b/server-data/resources/[esx_addons]/esx_property/client/cctv.lua
index 29bd718cb..9a3003396 100644
--- a/server-data/resources/[esx_addons]/esx_property/client/cctv.lua
+++ b/server-data/resources/[esx_addons]/esx_property/client/cctv.lua
@@ -1,299 +1,260 @@
function CCTV(PropertyID)
- DoScreenFadeOut(500)
- Wait(500)
- local PlyCoordsBefore = GetEntityCoords(PlayerPedId())
- local Property = Properties[PropertyID]
- local CamTakePic = true
- if Property.cctv.enabled then
- ESX.TriggerServerCallback("esx_property:CCTV", function(CanCCTV)
- if CanCCTV then
- InCCTV = true
- local NightVision = false
- local function InstructionButtonMessage(text)
- BeginTextCommandScaleformString("STRING")
- AddTextComponentScaleform(text)
- EndTextCommandScaleformString()
- end
+ DoScreenFadeOut(500)
+ Wait(500)
+ local Property = Properties[PropertyID]
+ local CamTakePic = true
+ if Property.cctv.enabled then
+ ESX.TriggerServerCallback("esx_property:CCTV", function(CanCCTV)
+ if CanCCTV then
+ InCCTV = true
+ local NightVision = false
+ local function InstructionButtonMessage(text)
+ BeginTextCommandScaleformString("STRING")
+ AddTextComponentScaleform(text)
+ EndTextCommandScaleformString()
+ end
- local function CreateInstuctionScaleform(scaleform)
- local scaleform = RequestScaleformMovie(scaleform)
- while not HasScaleformMovieLoaded(scaleform) do
- Wait(0)
- end
- PushScaleformMovieFunction(scaleform, "CLEAR_ALL")
- PopScaleformMovieFunctionVoid()
+ local function CreateInstuctionScaleform(scaleform)
+ local scaleform = RequestScaleformMovie(scaleform)
+ while not HasScaleformMovieLoaded(scaleform) do
+ Wait(0)
+ end
+ PushScaleformMovieFunction(scaleform, "CLEAR_ALL")
+ PopScaleformMovieFunctionVoid()
- PushScaleformMovieFunction(scaleform, "SET_CLEAR_SPACE")
- PushScaleformMovieFunctionParameterInt(200)
- PopScaleformMovieFunctionVoid()
+ PushScaleformMovieFunction(scaleform, "SET_CLEAR_SPACE")
+ PushScaleformMovieFunctionParameterInt(200)
+ PopScaleformMovieFunctionVoid()
- if Config.CCTV.PictureWebook ~= "" then
- PushScaleformMovieFunction(scaleform, "SET_DATA_SLOT")
- PushScaleformMovieFunctionParameterInt(1)
- N_0xe83a3e3557a56640(GetControlInstructionalButton(1, Config.CCTV.Controls.Screenshot, true))
- InstructionButtonMessage(_U("take_picture"))
- PopScaleformMovieFunctionVoid()
- end
+ if Config.CCTV.PictureWebook ~= "" then
+ PushScaleformMovieFunction(scaleform, "SET_DATA_SLOT")
+ PushScaleformMovieFunctionParameterInt(1)
+ ScaleformMovieMethodAddParamPlayerNameString(GetControlInstructionalButton(1, Config.CCTV.Controls.Screenshot, true))
+ InstructionButtonMessage(TranslateCap("take_picture"))
+ PopScaleformMovieFunctionVoid()
+ end
- PushScaleformMovieFunction(scaleform, "SET_DATA_SLOT")
- PushScaleformMovieFunctionParameterInt(2)
- N_0xe83a3e3557a56640(GetControlInstructionalButton(1, Config.CCTV.Controls.Right, true))
- N_0xe83a3e3557a56640(GetControlInstructionalButton(1, Config.CCTV.Controls.Left, true))
- InstructionButtonMessage(_U("rot_left_right"))
- PopScaleformMovieFunctionVoid()
+ PushScaleformMovieFunction(scaleform, "SET_DATA_SLOT")
+ PushScaleformMovieFunctionParameterInt(2)
+ ScaleformMovieMethodAddParamPlayerNameString(GetControlInstructionalButton(1, Config.CCTV.Controls.Right, true))
+ ScaleformMovieMethodAddParamPlayerNameString(GetControlInstructionalButton(1, Config.CCTV.Controls.Left, true))
+ InstructionButtonMessage(TranslateCap("rot_left_right"))
+ PopScaleformMovieFunctionVoid()
- PushScaleformMovieFunction(scaleform, "SET_DATA_SLOT")
- PushScaleformMovieFunctionParameterInt(3)
- N_0xe83a3e3557a56640(GetControlInstructionalButton(1, Config.CCTV.Controls.Down, true))
- N_0xe83a3e3557a56640(GetControlInstructionalButton(1, Config.CCTV.Controls.Up, true))
- InstructionButtonMessage(_U("rot_up_down"))
- PopScaleformMovieFunctionVoid()
+ PushScaleformMovieFunction(scaleform, "SET_DATA_SLOT")
+ PushScaleformMovieFunctionParameterInt(3)
+ ScaleformMovieMethodAddParamPlayerNameString(GetControlInstructionalButton(1, Config.CCTV.Controls.Down, true))
+ ScaleformMovieMethodAddParamPlayerNameString(GetControlInstructionalButton(1, Config.CCTV.Controls.Up, true))
+ InstructionButtonMessage(TranslateCap("rot_up_down"))
+ PopScaleformMovieFunctionVoid()
- PushScaleformMovieFunction(scaleform, "SET_DATA_SLOT")
- PushScaleformMovieFunctionParameterInt(4)
- N_0xe83a3e3557a56640(GetControlInstructionalButton(1, Config.CCTV.Controls.ZoomOut, true))
- N_0xe83a3e3557a56640(GetControlInstructionalButton(1, Config.CCTV.Controls.ZoomIn, true))
- InstructionButtonMessage(_U("Zoom"))
- PopScaleformMovieFunctionVoid()
+ PushScaleformMovieFunction(scaleform, "SET_DATA_SLOT")
+ PushScaleformMovieFunctionParameterInt(4)
+ ScaleformMovieMethodAddParamPlayerNameString(GetControlInstructionalButton(1, Config.CCTV.Controls.ZoomOut, true))
+ ScaleformMovieMethodAddParamPlayerNameString(GetControlInstructionalButton(1, Config.CCTV.Controls.ZoomIn, true))
+ InstructionButtonMessage(TranslateCap("zoom"))
+ PopScaleformMovieFunctionVoid()
- PushScaleformMovieFunction(scaleform, "SET_DATA_SLOT")
- PushScaleformMovieFunctionParameterInt(5)
- N_0xe83a3e3557a56640(GetControlInstructionalButton(1, Config.CCTV.Controls.NightVision, true))
- InstructionButtonMessage(_U("night_vision"))
- PopScaleformMovieFunctionVoid()
+ PushScaleformMovieFunction(scaleform, "SET_DATA_SLOT")
+ PushScaleformMovieFunctionParameterInt(5)
+ ScaleformMovieMethodAddParamPlayerNameString(GetControlInstructionalButton(1, Config.CCTV.Controls.NightVision, true))
+ InstructionButtonMessage(TranslateCap("night_vision"))
+ PopScaleformMovieFunctionVoid()
- PushScaleformMovieFunction(scaleform, "SET_DATA_SLOT")
- PushScaleformMovieFunctionParameterInt(0)
- N_0xe83a3e3557a56640(GetControlInstructionalButton(1, Config.CCTV.Controls.Exit, true))
- InstructionButtonMessage(_U("exit"))
- PopScaleformMovieFunctionVoid()
+ PushScaleformMovieFunction(scaleform, "SET_DATA_SLOT")
+ PushScaleformMovieFunctionParameterInt(0)
+ ScaleformMovieMethodAddParamPlayerNameString(GetControlInstructionalButton(1, Config.CCTV.Controls.Exit, true))
+ InstructionButtonMessage(TranslateCap("exit"))
+ PopScaleformMovieFunctionVoid()
- PushScaleformMovieFunction(scaleform, "DRAW_INSTRUCTIONAL_BUTTONS")
- PopScaleformMovieFunctionVoid()
+ PushScaleformMovieFunction(scaleform, "DRAW_INSTRUCTIONAL_BUTTONS")
+ PopScaleformMovieFunctionVoid()
- PushScaleformMovieFunction(scaleform, "SET_BACKGROUND_COLOUR")
- PushScaleformMovieFunctionParameterInt(0)
- PushScaleformMovieFunctionParameterInt(0)
- PushScaleformMovieFunctionParameterInt(0)
- PushScaleformMovieFunctionParameterInt(80)
- PopScaleformMovieFunctionVoid()
+ PushScaleformMovieFunction(scaleform, "SET_BACKGROUND_COLOUR")
+ PushScaleformMovieFunctionParameterInt(0)
+ PushScaleformMovieFunctionParameterInt(0)
+ PushScaleformMovieFunctionParameterInt(0)
+ PushScaleformMovieFunctionParameterInt(80)
+ PopScaleformMovieFunctionVoid()
- return scaleform
- end
- ESX.CloseContext()
- local cctvcam = nil
- local angleZ = 0.0
- ClearFocus()
- local playerPed = PlayerPedId()
- cctvcam = CreateCamWithParams(
- "DEFAULT_SCRIPTED_CAMERA",
- vector3(Property.Entrance.x, Property.Entrance.y, Property.Entrance.z + Config.CCTV.HeightAboveDoor),
- 0,
- 0,
- 0,
- Config.CCTV.FOV
- )
- SetCamRot(cctvcam, Property.cctv.rot.x, Property.cctv.rot.y, Property.cctv.rot.z, 2)
- SetCamActive(cctvcam, true)
- SetTimecycleModifier("scanline_cam_cheap")
- TriggerServerEvent("p_instance:s:leave")
- DisableAllControlActions(0)
- FreezeEntityPosition(playerPed, true)
- SetEntityCollision(playerPed, false, true)
- local ShowButtons = true
- SetEntityVisible(playerPed, false)
- SetTimecycleModifierStrength(2.0)
- SetFocusArea(Property.Entrance.x, Property.Entrance.y, Property.Entrance.z, 0.0, 0.0, 0.0)
- PointCamAtCoord(
- cctvcam,
- vector3(Property.Entrance.x, Property.Entrance.y, Property.Entrance.z + Config.CCTV.HeightAboveDoor)
- )
- RenderScriptCams(true, false, 1, true, false)
- Wait(1000)
- DoScreenFadeIn(500)
- RequestAmbientAudioBank("Phone_Soundset_Franklin", 0, 0)
- RequestAmbientAudioBank("HintCamSounds", 0, 0)
- while IsCamActive(cctvcam) do
- Wait(5)
- DisableAllControlActions(0)
- EnableControlAction(0, 245, true)
- EnableControlAction(0, 246, true)
- EnableControlAction(0, 249, true)
- HideHudComponentThisFrame(7)
- HideHudComponentThisFrame(8)
- HideHudComponentThisFrame(9)
- HideHudComponentThisFrame(6)
- HideHudComponentThisFrame(19)
- HideHudAndRadarThisFrame()
+ return scaleform
+ end
+ ESX.CloseContext()
+ local cctvcam = nil
+ ClearFocus()
+ local playerPed = PlayerPedId()
+ cctvcam = CreateCamWithParams("DEFAULT_SCRIPTED_CAMERA", vector3(Property.Entrance.x, Property.Entrance.y, Property.Entrance.z + Config.CCTV.HeightAboveDoor), 0, 0, 0, Config.CCTV.FOV)
+ SetCamRot(cctvcam, Property.cctv.rot.x, Property.cctv.rot.y, Property.cctv.rot.z, 2)
+ SetCamActive(cctvcam, true)
+ SetTimecycleModifier("scanline_cam_cheap")
+ TriggerServerEvent("p_instance:s:leave")
+ DisableAllControlActions(0)
+ FreezeEntityPosition(playerPed, true)
+ SetEntityCollision(playerPed, false, true)
+ local ShowButtons = true
+ SetEntityVisible(playerPed, false)
+ SetTimecycleModifierStrength(2.0)
+ SetFocusArea(Property.Entrance.x, Property.Entrance.y, Property.Entrance.z, 0.0, 0.0, 0.0)
+ PointCamAtCoord(cctvcam, vector3(Property.Entrance.x, Property.Entrance.y, Property.Entrance.z + Config.CCTV.HeightAboveDoor))
+ RenderScriptCams(true, false, 1, true, false)
+ Wait(1000)
+ DoScreenFadeIn(500)
+ RequestAmbientAudioBank("Phone_Soundset_Franklin", 0, 0)
+ RequestAmbientAudioBank("HintCamSounds", 0, 0)
+ while IsCamActive(cctvcam) do
+ Wait(5)
+ DisableAllControlActions(0)
+ EnableControlAction(0, 245, true)
+ EnableControlAction(0, 246, true)
+ EnableControlAction(0, 249, true)
+ HideHudComponentThisFrame(7)
+ HideHudComponentThisFrame(8)
+ HideHudComponentThisFrame(9)
+ HideHudComponentThisFrame(6)
+ HideHudComponentThisFrame(19)
+ HideHudAndRadarThisFrame()
- if ShowButtons then
- local instructions = CreateInstuctionScaleform("instructional_buttons")
- DrawScaleformMovieFullscreen(instructions, 255, 255, 255, 255, 0)
- end
- -- ROTATE LEFT
- local getCameraRot = GetCamRot(cctvcam, 2)
+ if ShowButtons then
+ local instructions = CreateInstuctionScaleform("instructional_buttons")
+ DrawScaleformMovieFullscreen(instructions, 255, 255, 255, 255, 0)
+ end
+ -- ROTATE LEFT
+ local getCameraRot = GetCamRot(cctvcam, 2)
- if
- IsDisabledControlPressed(0, Config.CCTV.Controls.Left)
- and getCameraRot.z < Property.cctv.maxleft
- then
- PlaySoundFrontend(-1, " FocusIn", "HintCamSounds", false)
- SetCamRot(cctvcam, getCameraRot.x, 0.0, getCameraRot.z + Config.CCTV.RotateSpeed, 2)
- end
- -- ROTATE RIGHT
- if
- IsDisabledControlPressed(0, Config.CCTV.Controls.Right)
- and getCameraRot.z > Property.cctv.maxright
- then
- PlaySoundFrontend(-1, " FocusIn", "HintCamSounds", false)
- SetCamRot(cctvcam, getCameraRot.x, 0.0, getCameraRot.z - Config.CCTV.RotateSpeed, 2)
- end
+ if IsDisabledControlPressed(0, Config.CCTV.Controls.Left) and getCameraRot.z < Property.cctv.maxleft then
+ PlaySoundFrontend(-1, " FocusIn", "HintCamSounds", false)
+ SetCamRot(cctvcam, getCameraRot.x, 0.0, getCameraRot.z + Config.CCTV.RotateSpeed, 2)
+ end
+ -- ROTATE RIGHT
+ if IsDisabledControlPressed(0, Config.CCTV.Controls.Right) and getCameraRot.z > Property.cctv.maxright then
+ PlaySoundFrontend(-1, " FocusIn", "HintCamSounds", false)
+ SetCamRot(cctvcam, getCameraRot.x, 0.0, getCameraRot.z - Config.CCTV.RotateSpeed, 2)
+ end
- -- ROTATE UP
- if
- IsDisabledControlPressed(0, Config.CCTV.Controls.Up)
- and getCameraRot.x < Config.CCTV.MaxUpRotation
- then
- PlaySoundFrontend(-1, " FocusIn", "HintCamSounds", false)
- SetCamRot(cctvcam, getCameraRot.x + Config.CCTV.RotateSpeed, 0.0, getCameraRot.z, 2)
- end
+ -- ROTATE UP
+ if IsDisabledControlPressed(0, Config.CCTV.Controls.Up) and getCameraRot.x < Config.CCTV.MaxUpRotation then
+ PlaySoundFrontend(-1, " FocusIn", "HintCamSounds", false)
+ SetCamRot(cctvcam, getCameraRot.x + Config.CCTV.RotateSpeed, 0.0, getCameraRot.z, 2)
+ end
- if
- IsDisabledControlPressed(0, Config.CCTV.Controls.Down)
- and getCameraRot.x > Config.CCTV.MaxDownRotation
- then
- PlaySoundFrontend(-1, " FocusIn", "HintCamSounds", false)
- SetCamRot(cctvcam, getCameraRot.x - Config.CCTV.RotateSpeed, 0.0, getCameraRot.z, 2)
- end
+ if IsDisabledControlPressed(0, Config.CCTV.Controls.Down) and getCameraRot.x > Config.CCTV.MaxDownRotation then
+ PlaySoundFrontend(-1, " FocusIn", "HintCamSounds", false)
+ SetCamRot(cctvcam, getCameraRot.x - Config.CCTV.RotateSpeed, 0.0, getCameraRot.z, 2)
+ end
- if
- IsDisabledControlPressed(0, Config.CCTV.Controls.ZoomIn)
- and GetCamFov(cctvcam) > Config.CCTV.MaxZoom
- then
- SetCamFov(cctvcam, GetCamFov(cctvcam) - 1.0)
- end
+ if IsDisabledControlPressed(0, Config.CCTV.Controls.ZoomIn) and GetCamFov(cctvcam) > Config.CCTV.MaxZoom then
+ SetCamFov(cctvcam, GetCamFov(cctvcam) - 1.0)
+ end
- if
- IsDisabledControlPressed(0, Config.CCTV.Controls.ZoomOut)
- and GetCamFov(cctvcam) < Config.CCTV.MinZoom
- then
- SetCamFov(cctvcam, GetCamFov(cctvcam) + 1.0)
- end
+ if IsDisabledControlPressed(0, Config.CCTV.Controls.ZoomOut) and GetCamFov(cctvcam) < Config.CCTV.MinZoom then
+ SetCamFov(cctvcam, GetCamFov(cctvcam) + 1.0)
+ end
- if
- IsDisabledControlPressed(0, Config.CCTV.Controls.Down)
- and getCameraRot.x > Config.CCTV.MaxDownRotation
- then
- PlaySoundFrontend(-1, " FocusIn", "HintCamSounds", false)
- SetCamRot(cctvcam, getCameraRot.x - Config.CCTV.RotateSpeed, 0.0, getCameraRot.z, 2)
- end
+ if IsDisabledControlPressed(0, Config.CCTV.Controls.Down) and getCameraRot.x > Config.CCTV.MaxDownRotation then
+ PlaySoundFrontend(-1, " FocusIn", "HintCamSounds", false)
+ SetCamRot(cctvcam, getCameraRot.x - Config.CCTV.RotateSpeed, 0.0, getCameraRot.z, 2)
+ end
- SetTextFont(4)
- SetTextScale(0.8, 0.8)
- SetTextColour(255, 255, 255, 255)
- SetTextDropshadow(0.1, 3, 27, 27, 255)
- BeginTextCommandDisplayText("STRING")
- AddTextComponentSubstringPlayerName(Property.setName ~= "" and Property.setName or Property.Name)
- EndTextCommandDisplayText(0.01, 0.01)
+ SetTextFont(4)
+ SetTextScale(0.8, 0.8)
+ SetTextColour(255, 255, 255, 255)
+ SetTextDropshadow(0.1, 3, 27, 27, 255)
+ BeginTextCommandDisplayText("STRING")
+ AddTextComponentSubstringPlayerName(Property.setName ~= "" and Property.setName or Property.Name)
+ EndTextCommandDisplayText(0.01, 0.01)
- SetTextFont(4)
- SetTextScale(0.7, 0.7)
- SetTextColour(255, 255, 255, 255)
- SetTextDropshadow(0.1, 3, 27, 27, 255)
- BeginTextCommandDisplayText("STRING")
- local year, --[[ integer ]]
- month, --[[ integer ]]
- day, --[[ integer ]]
- hour, --[[ integer ]]
- minute, --[[ integer ]]
- second --[[ integer ]] =
- GetPosixTime()
- AddTextComponentSubstringPlayerName(
- "" .. day .. "/" .. month .. "/" .. year .. " " .. hour .. ":" .. minute .. ":" .. second
- )
- EndTextCommandDisplayText(0.01, 0.055)
+ SetTextFont(4)
+ SetTextScale(0.7, 0.7)
+ SetTextColour(255, 255, 255, 255)
+ SetTextDropshadow(0.1, 3, 27, 27, 255)
+ BeginTextCommandDisplayText("STRING")
+ local year, --[[ integer ]]
+ month, --[[ integer ]]
+ day, --[[ integer ]]
+ hour, --[[ integer ]]
+ minute, --[[ integer ]]
+ second --[[ integer ]] = GetPosixTime()
+ AddTextComponentSubstringPlayerName("" .. day .. "/" .. month .. "/" .. year .. " " .. hour .. ":" .. minute .. ":" .. second)
+ EndTextCommandDisplayText(0.01, 0.055)
- SetTextFont(4)
- SetTextScale(0.6, 0.6)
- SetTextColour(255, 255, 255, 255)
- SetTextDropshadow(0.1, 3, 27, 27, 255)
- BeginTextCommandDisplayText("STRING")
- local Zoom = ((Config.CCTV.FOV - GetCamFov(cctvcam)) / GetCamFov(cctvcam)) * 100
- AddTextComponentSubstringPlayerName(_U("zoom_level", math.floor(Zoom)))
- EndTextCommandDisplayText(0.01, 0.09)
+ SetTextFont(4)
+ SetTextScale(0.6, 0.6)
+ SetTextColour(255, 255, 255, 255)
+ SetTextDropshadow(0.1, 3, 27, 27, 255)
+ BeginTextCommandDisplayText("STRING")
+ local Zoom = ((Config.CCTV.FOV - GetCamFov(cctvcam)) / GetCamFov(cctvcam)) * 100
+ AddTextComponentSubstringPlayerName(TranslateCap("zoom_level", math.floor(Zoom)))
+ EndTextCommandDisplayText(0.01, 0.09)
- SetTextFont(4)
- SetTextScale(0.6, 0.6)
- SetTextColour(255, 255, 255, 255)
- SetTextDropshadow(0.1, 3, 27, 27, 255)
- BeginTextCommandDisplayText("STRING")
- AddTextComponentSubstringPlayerName(NightVision and "Night Vision: Active" or "CCTV System: Active")
- EndTextCommandDisplayText(0.01, 0.12)
+ SetTextFont(4)
+ SetTextScale(0.6, 0.6)
+ SetTextColour(255, 255, 255, 255)
+ SetTextDropshadow(0.1, 3, 27, 27, 255)
+ BeginTextCommandDisplayText("STRING")
+ AddTextComponentSubstringPlayerName(NightVision and "Night Vision: Active" or "CCTV System: Active")
+ EndTextCommandDisplayText(0.01, 0.12)
- if
- IsDisabledControlPressed(0, Config.CCTV.Controls.Down)
- and getCameraRot.x > Config.CCTV.MaxDownRotation
- then
- PlaySoundFrontend(-1, " FocusIn", "HintCamSounds", false)
- SetCamRot(cctvcam, getCameraRot.x - Config.CCTV.RotateSpeed, 0.0, getCameraRot.z, 2)
- end
+ if IsDisabledControlPressed(0, Config.CCTV.Controls.Down) and getCameraRot.x > Config.CCTV.MaxDownRotation then
+ PlaySoundFrontend(-1, " FocusIn", "HintCamSounds", false)
+ SetCamRot(cctvcam, getCameraRot.x - Config.CCTV.RotateSpeed, 0.0, getCameraRot.z, 2)
+ end
- if IsDisabledControlJustPressed(0, 38) then
- NightVision = not NightVision
- SetNightvision(NightVision)
- SetTimecycleModifier("scanline_cam")
- end
+ if IsDisabledControlJustPressed(0, 38) then
+ NightVision = not NightVision
+ SetNightvision(NightVision)
+ SetTimecycleModifier("scanline_cam")
+ end
- if Config.CCTV.PictureWebook ~= "" and IsDisabledControlJustPressed(0, 201) then
- if CamTakePic then
- ShowButtons = false
- Wait(1)
- PlaySoundFrontend(-1, "Camera_Shoot", "Phone_Soundset_Franklin", 1)
- ESX.TriggerServerCallback("esx_property:GetWebhook", function(hook)
- if hook then
- exports["screenshot-basic"]:requestScreenshotUpload(hook, "files[]", function(data)
- local image = json.decode(data)
- ESX.ShowNotification(_U("picture_taken"), "success")
- SendNUIMessage({ link = image.attachments[1].proxy_url })
- ESX.ShowNotification(_U("clipboard"), "success")
- ShowButtons = true
- CamTakePic = false
- SetTimeout(5000, function()
- CamTakePic = true
- end)
- end)
- end
- end)
- else
- ESX.ShowNotification(_U("please_wait"), "error")
- end
- end
+ if Config.CCTV.PictureWebook ~= "" and IsDisabledControlJustPressed(0, 201) then
+ if CamTakePic then
+ ShowButtons = false
+ Wait(1)
+ PlaySoundFrontend(-1, "Camera_Shoot", "Phone_Soundset_Franklin", 1)
+ ESX.TriggerServerCallback("esx_property:GetWebhook", function(hook)
+ if hook then
+ exports["screenshot-basic"]:requestScreenshotUpload(hook, "files[]", function(data)
+ local image = json.decode(data)
+ ESX.ShowNotification(TranslateCap("picture_taken"), "success")
+ SendNUIMessage({ link = image.attachments[1].proxy_url })
+ ESX.ShowNotification(TranslateCap("clipboard"), "success")
+ ShowButtons = true
+ CamTakePic = false
+ SetTimeout(5000, function()
+ CamTakePic = true
+ end)
+ end)
+ end
+ end)
+ else
+ ESX.ShowNotification(TranslateCap("please_wait"), "error")
+ end
+ end
- if IsDisabledControlPressed(1, Config.CCTV.Controls.Exit) then
- DoScreenFadeOut(1000)
- ESX.TriggerServerCallback("esx_property:ExitCCTV", function(CanExit)
- if CanExit then
- InCCTV = false
- Wait(1000)
- ClearFocus()
- ClearTimecycleModifier()
- ClearExtraTimecycleModifier()
- RenderScriptCams(false, false, 0, true, false)
- DestroyCam(cctvcam, false)
- SetFocusEntity(playerPed)
- SetNightvision(false)
- SetSeethrough(false)
- SetEntityCollision(playerPed, true, true)
- FreezeEntityPosition(playerPed, false)
- SetEntityVisible(playerPed, true)
- Wait(1500)
- DoScreenFadeIn(1000)
- end
- end, PropertyID)
- break
- end
- end
- end
- end, PropertyID)
- end
+ if IsDisabledControlPressed(1, Config.CCTV.Controls.Exit) then
+ DoScreenFadeOut(1000)
+ ESX.TriggerServerCallback("esx_property:ExitCCTV", function(CanExit)
+ if CanExit then
+ InCCTV = false
+ Wait(1000)
+ ClearFocus()
+ ClearTimecycleModifier()
+ ClearExtraTimecycleModifier()
+ RenderScriptCams(false, false, 0, true, false)
+ DestroyCam(cctvcam, false)
+ SetFocusEntity(playerPed)
+ SetNightvision(false)
+ SetSeethrough(false)
+ SetEntityCollision(playerPed, true, true)
+ FreezeEntityPosition(playerPed, false)
+ SetEntityVisible(playerPed, true)
+ Wait(1500)
+ DoScreenFadeIn(1000)
+ end
+ end, PropertyID)
+ break
+ end
+ end
+ end
+ end, PropertyID)
+ end
end
diff --git a/server-data/resources/[esx_addons]/esx_property/client/furniture.lua b/server-data/resources/[esx_addons]/esx_property/client/furniture.lua
index 9e9a22abc..acb1d9419 100644
--- a/server-data/resources/[esx_addons]/esx_property/client/furniture.lua
+++ b/server-data/resources/[esx_addons]/esx_property/client/furniture.lua
@@ -1,502 +1,391 @@
---[[
- ESX Property - Properties Made Right!
- Copyright (C) 2022 ESX-Framework
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see