From f624daa8525dfa290c18fdf23fcb1b904a8d57ed Mon Sep 17 00:00:00 2001 From: bitpredator <67551273+bitpredator@users.noreply.github.com> Date: Sun, 28 Jan 2024 12:04:58 +0100 Subject: [PATCH] chore: minimize doesjobexist function --- .../resources/[esx]/es_extended/server/functions.lua | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/server-data/resources/[esx]/es_extended/server/functions.lua b/server-data/resources/[esx]/es_extended/server/functions.lua index e67a22475..7cfb89107 100644 --- a/server-data/resources/[esx]/es_extended/server/functions.lua +++ b/server-data/resources/[esx]/es_extended/server/functions.lua @@ -395,15 +395,7 @@ if not Config.OxInventory then end function ESX.DoesJobExist(job, grade) - grade = tostring(grade) - - if job and grade then - if ESX.Jobs[job] and ESX.Jobs[job].grades[grade] then - return true - end - end - - return false + return (ESX.Jobs[job] and ESX.Jobs[job].grades[tostring(grade)] ~= nil) or false end function Core.IsPlayerAdmin(playerId)