Merge pull request #1299 from Arctos2win/Arctos2win-DoesJobExist

minimize DoesJobExist function
This commit is contained in:
Gellipapa
2024-01-27 16:35:49 +01:00
committed by GitHub
+1 -9
View File
@@ -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)