From 839794090a67d40c4f859ff7e59944c13e185aa3 Mon Sep 17 00:00:00 2001 From: Solareon <769465+solareon@users.noreply.github.com> Date: Fri, 19 Jan 2024 04:27:54 +0100 Subject: [PATCH 1/2] fix: remove stash and evidence --- client/job.lua | 42 ------------------------------------------ 1 file changed, 42 deletions(-) diff --git a/client/job.lua b/client/job.lua index 3db9e5b..2781d72 100644 --- a/client/job.lua +++ b/client/job.lua @@ -482,48 +482,6 @@ else end CreateThread(function() - -- Evidence Storage - for _, v in pairs(sharedConfig.locations.evidence) do - lib.zones.box({ - coords = v, - size = vec3(2, 2, 2), - rotation = 0.0, - debug = config.polyDebug, - onEnter = function() - if QBX.PlayerData.job.type == 'leo' and QBX.PlayerData.job.onduty then - inPrompt = true - lib.showTextUI(Lang:t('info.evidence')) - uiPrompt('evidence') - end - end, - onExit = function() - lib.hideTextUI() - inPrompt = false - end - }) - end - - -- Personal Stash - for _, v in pairs(sharedConfig.locations.stash) do - lib.zones.box({ - coords = v, - size = vec3(2, 2, 2), - rotation = 0.0, - debug = config.polyDebug, - onEnter = function() - inStash = true - inPrompt = true - lib.showTextUI(Lang:t('info.stash_enter')) - uiPrompt('stash') - end, - onExit = function() - lib.hideTextUI() - inPrompt = false - inStash = false - end - }) - end - -- Police Trash for i = 1, #sharedConfig.locations.trash do local v = sharedConfig.locations.trash[i] From 4543f110cb60645c35cb0dac1bce5729ec0d18cb Mon Sep 17 00:00:00 2001 From: bicatcho11 <151503460+bicatcho11@users.noreply.github.com> Date: Fri, 19 Jan 2024 20:09:08 +0300 Subject: [PATCH 2/2] refactor(client): names of stations and doCarDamage * Complete the addresses of the police departments I use this modification personally, as it is good when I want to add new police stations to the server * update thread * add small loop for smash and popTires * fix space * Transfer the jail blip to the prison script * remove commit * remove disable * Update main.lua --- client/job.lua | 15 ++++++--------- client/main.lua | 2 ++ config/shared.lua | 15 +++++++++++---- 3 files changed, 19 insertions(+), 13 deletions(-) diff --git a/client/job.lua b/client/job.lua index 2781d72..7ccae53 100644 --- a/client/job.lua +++ b/client/job.lua @@ -57,11 +57,9 @@ local function doCarDamage(currentVehicle, veh) SetVehicleEngineHealth(currentVehicle, engine) if smash then - SmashVehicleWindow(currentVehicle, 0) - SmashVehicleWindow(currentVehicle, 1) - SmashVehicleWindow(currentVehicle, 2) - SmashVehicleWindow(currentVehicle, 3) - SmashVehicleWindow(currentVehicle, 4) + for i = 0, 4 do + SmashVehicleWindow(currentVehicle, i) + end end if damageOutside then @@ -71,10 +69,9 @@ local function doCarDamage(currentVehicle, veh) end if popTires then - SetVehicleTyreBurst(currentVehicle, 1, false, 990.0) - SetVehicleTyreBurst(currentVehicle, 2, false, 990.0) - SetVehicleTyreBurst(currentVehicle, 3, false, 990.0) - SetVehicleTyreBurst(currentVehicle, 4, false, 990.0) + for i = 1, 4 do + SetVehicleTyreBurst(currentVehicle, i, false, 990.0) + end end if body < 1000 then diff --git a/client/main.lua b/client/main.lua index d2d1790..7008fc8 100644 --- a/client/main.lua +++ b/client/main.lua @@ -190,6 +190,7 @@ RegisterNetEvent('police:client:SendPoliceEmergencyAlert', function() end) -- Threads + CreateThread(function() for _, station in pairs(config.locations.stations) do local blip = AddBlipForCoord(station.coords.x, station.coords.y, station.coords.z) @@ -197,6 +198,7 @@ CreateThread(function() SetBlipAsShortRange(blip, true) SetBlipScale(blip, 0.8) SetBlipColour(blip, 29) + BeginTextCommandSetBlipName('STRING') AddTextComponentString(station.label) EndTextCommandSetBlipName(blip) diff --git a/config/shared.lua b/config/shared.lua index 6c788bc..9abb77f 100644 --- a/config/shared.lua +++ b/config/shared.lua @@ -5,6 +5,10 @@ return { roadsign = {model = `prop_snow_sign_road_06g`, freeze = true}, tent = {model = `prop_gazebo_03`, freeze = true}, light = {model = `prop_worklight_03b`, freeze = true}, + chair = {model = `prop_chair_08`, freeze = true}, + chairs = {model = `prop_chair_pile_01`, freeze = true}, + tabe = {model = `prop_table_03`, freeze = true}, + monitor = {model = `des_tvsmash_root`, freeze = true}, }, locations = { @@ -41,9 +45,12 @@ return { evidence = { -- Not currently used, use ox_inventory evidence system }, stations = { - {label = 'Police Station', coords = vec4(428.23, -984.28, 29.76, 3.5)}, - {label = 'Prison', coords = vec4(1845.903, 2585.873, 45.672, 272.249)}, - {label = 'Police Station Paleto', coords = vec4(-451.55, 6014.25, 31.716, 223.81)}, + {label = 'Mission Row Police Station', coords = vec3(434.0, -983.0, 30.7)}, + {label = 'Sandy Shores Police Station', coords = vec3(1853.4, 3684.5, 34.3)}, + -- {label = 'Vinewood Police Station', coords = vec3(637.1, 1.6, 81.8)}, + -- {label = 'Vespucci Police Station', coords = vec3(-1092.6, -808.1, 19.3)}, + -- {label = 'Davis Police Station', coords = vec3(368.0, -1618.8, 29.3)}, + -- {label = 'Paleto Bay Police Station', coords = vec3(-448.4, 6011.8, 31.7)}, }, }, @@ -59,4 +66,4 @@ return { {fine = 500, maxSpeed = 180}, } } -} \ No newline at end of file +}