2026-04-14 17:41:39 +02:00

76 lines
2.4 KiB
Lua

EXTERNAL_EVENTS_NAMES = {
["esx:getSharedObject"] = nil, -- This is nil because it will be found automatically, change it to your one ONLY in the case it can't be found
}
-- Data for the icon of locked/unlocked door
iconData = {
[0] = {
textureDict = "door_icon", -- Do not edit
textureName = "unlocked", -- Do not edit
x = 0.03,
y = 0.04,
color = { -- If all colors are to 255, the image will have the default color
r = 255,
g = 255,
b = 255,
a = 255,
},
},
[1] = {
textureDict = "door_icon", -- Do not edit
textureName = "locked", -- Do not edit
x = 0.03,
y = 0.04,
color = { -- If all colors are to 255, the image will have the default color
r = 255,
g = 255,
b = 255,
a = 255,
},
},
}
-- Lower = faster doors loading but worse performance
-- Higher = slower doors loading but better performance
INTERACTION_POINTS_REFRESH = 800
-- Seconds the blip of police alert will remain in the map
BLIP_TIME_AFTER_POLICE_ALERT = 40
--[[
You can edit this function if you want to add second jobs or anything like that (editing this function is down to you)
If you edit this, you WILL have also to edit the function in sv_integrations.lua file
]]
function isJobAllowed(allowedJobs)
if(not allowedJobs) then return true end
local playerJob = Framework.getPlayerJob()
if(allowedJobs[playerJob] == true) then -- Entire job is allowed
return true
elseif(allowedJobs[playerJob]) then
local playerJobGrade = Framework.getPlayerJobGrade()
if type(allowedJobs[playerJob]) == "table" then -- Specific grades are allowed
local stringPlayerJobGrade = tostring(playerJobGrade)
return allowedJobs[playerJob] and allowedJobs[playerJob][stringPlayerJobGrade]
elseif type(allowedJobs[playerJob]) == "number" then -- Minimum grade required
return playerJobGrade >= allowedJobs[playerJob]
end
else
return false
end
end
-- Legacy method to find the doors, don't edit unless developer asks
USE_LEGACY_METHOD = true
-- Maximum attempts to find door coordinates, don't edit unless developer asks
MAX_ATTEMPTS_UNIQUE_COORDS = 16