Skip to content

Commit

Permalink
minimize doesjobexist function
Browse files Browse the repository at this point in the history
  • Loading branch information
Arctos2win authored Jan 27, 2024
1 parent 4eab575 commit 0b370c7
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions [core]/es_extended/server/functions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0b370c7

Please sign in to comment.