Skip to content

Commit

Permalink
chore: minimize doesjobexist function
Browse files Browse the repository at this point in the history
  • Loading branch information
bitpredator committed Jan 28, 2024
1 parent 730a483 commit f624daa
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions server-data/resources/[esx]/es_extended/server/functions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f624daa

Please sign in to comment.