From 46116f4906950dee7b10bf940a85689cd234afaf Mon Sep 17 00:00:00 2001 From: Fezz <43589668+FBFezz@users.noreply.github.com> Date: Mon, 5 Jul 2021 08:45:25 +0100 Subject: [PATCH 1/4] added config for drunk --- [esx_addons]/esx_policejob/client/main.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/[esx_addons]/esx_policejob/client/main.lua b/[esx_addons]/esx_policejob/client/main.lua index 01874bef..26ffe26c 100644 --- a/[esx_addons]/esx_policejob/client/main.lua +++ b/[esx_addons]/esx_policejob/client/main.lua @@ -416,7 +416,7 @@ function OpenIdentityCardMenu(player) table.insert(elements, {label = _U('height', data.height)}) end - if data.drunk then + if Config.EnableESXOptionalneeds and data.drunk then table.insert(elements, {label = _U('bac', data.drunk)}) end From 23a484db511599c0e5ca15e02c5bd35428d5ceb7 Mon Sep 17 00:00:00 2001 From: Fezz <43589668+FBFezz@users.noreply.github.com> Date: Mon, 5 Jul 2021 08:46:17 +0100 Subject: [PATCH 2/4] Added config for optionalneeds --- [esx_addons]/esx_policejob/config.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/[esx_addons]/esx_policejob/config.lua b/[esx_addons]/esx_policejob/config.lua index dfea1f88..4996e7bb 100644 --- a/[esx_addons]/esx_policejob/config.lua +++ b/[esx_addons]/esx_policejob/config.lua @@ -8,6 +8,7 @@ Config.MarkerColor = {r = 50, g = 50, b = 204} Config.EnablePlayerManagement = true -- Enable if you want society managing. Config.EnableArmoryManagement = false Config.EnableESXIdentity = true -- Enable if you're using esx_identity. +Config.EnableESXOptionalneeds = false -- Enable if you're using esx_optionalneeds Config.EnableLicenses = false -- Enable if you're using esx_license. Config.EnableHandcuffTimer = true -- Enable handcuff timer? will unrestrain player after the time ends. From d05615d04a6c89bcc002114082a727c55a9cdf6e Mon Sep 17 00:00:00 2001 From: Fezz <43589668+FBFezz@users.noreply.github.com> Date: Mon, 5 Jul 2021 08:48:52 +0100 Subject: [PATCH 3/4] Update main.lua --- [esx_addons]/esx_jobs/client/main.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/[esx_addons]/esx_jobs/client/main.lua b/[esx_addons]/esx_jobs/client/main.lua index 7ea82e12..6c2def93 100644 --- a/[esx_addons]/esx_jobs/client/main.lua +++ b/[esx_addons]/esx_jobs/client/main.lua @@ -123,6 +123,7 @@ AddEventHandler('esx_jobs:action', function(job, zone, zoneKey) local plate = GetVehicleNumberPlateText(vehicle) plate = string.gsub(plate, " ", "") local driverPed = GetPedInVehicleSeat(vehicle, -1) + local vehicleMaxHealth = GetVehicleEngineHealth(vehicle) if playerPed == driverPed then @@ -524,4 +525,4 @@ Citizen.CreateThread(function() RequestIpl("id2_14_during1") end) -if ESX.PlayerLoaded then refreshBlips() end \ No newline at end of file +if ESX.PlayerLoaded then refreshBlips() end From 4f7e66561fa891d9087ebbf2e1d73ec197c5f1b7 Mon Sep 17 00:00:00 2001 From: Fezz <43589668+FBFezz@users.noreply.github.com> Date: Mon, 5 Jul 2021 08:49:36 +0100 Subject: [PATCH 4/4] Fixed caution not working if set to 0 --- [esx_addons]/esx_jobs/server/main.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/[esx_addons]/esx_jobs/server/main.lua b/[esx_addons]/esx_jobs/server/main.lua index 8f1a68e6..5595a8f8 100644 --- a/[esx_addons]/esx_jobs/server/main.lua +++ b/[esx_addons]/esx_jobs/server/main.lua @@ -108,7 +108,7 @@ AddEventHandler('esx_jobs:caution', function(cautionType, cautionAmount, spawnPo local xPlayer = ESX.GetPlayerFromId(source) if cautionType == 'take' then - if cautionAmount <= Config.MaxCaution and cautionAmount > 0 then + if cautionAmount <= Config.MaxCaution and cautionAmount >= 0 then TriggerEvent('esx_addonaccount:getAccount', 'caution', xPlayer.identifier, function(account) if xPlayer.getAccount('bank').money >= cautionAmount then xPlayer.removeAccountMoney('bank', cautionAmount)