From 0b370c70e8a18164c597150370121ffa90ecf677 Mon Sep 17 00:00:00 2001 From: Arctos2win <116841243+Arctos2win@users.noreply.github.com> Date: Sat, 27 Jan 2024 15:57:21 +0100 Subject: [PATCH] minimize doesjobexist function --- [core]/es_extended/server/functions.lua | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/[core]/es_extended/server/functions.lua b/[core]/es_extended/server/functions.lua index 38834ddc..1a777c7a 100644 --- a/[core]/es_extended/server/functions.lua +++ b/[core]/es_extended/server/functions.lua @@ -549,15 +549,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)