#qb-doorlock
1 messages · Page 1 of 1 (latest)
Could you not just use CitizenID Auth then add multiple to it?
Once you have created the door using /newdoor go to the file and adjust it to for the grades 🤷♂️
It won't let me know
Let me*
Bro it was just a suggestion for the in-game command
Not in the files
Its already in there https://github.com/qbcore-framework/qb-doorlock/blob/5ba889a44a00273e64767208b0b6491edb310698/client/main.lua#L527-L533
then when you get the config you could add it in
You sure?
if door.authorizedCitizenIDs then
if door.authorizedCitizenIDs[PlayerData.citizenid] then
return true
elseif type(door.authorizedCitizenIDs[1]) == 'string' then
for _, id in pairs(door.authorizedCitizenIDs) do -- Support for old format
if id == PlayerData.citizenid then return true end
end
end
end```
What is citizen ids?
Seems to be there's coding for it, just add it to the config.
It would be nice to do this in the door creation though.
Is that player ids?
if door.allAuthorized then return true end
if door.authorizedJobs then
if door.authorizedJobs[PlayerData.job.name] and PlayerData.job.grade.level >= door.authorizedJobs[PlayerData.job.name] then
return true
elseif type(door.authorizedJobs[1]) == 'string' then
for _, job in pairs(door.authorizedJobs) do -- Support for old format
if job == PlayerData.job.name then return true end
end
end
end
if door.authorizedGangs then
if door.authorizedGangs[PlayerData.gang.name] and PlayerData.gang.grade.level >= door.authorizedGangs[PlayerData.gang.name] then
return true
elseif type(door.authorizedGangs[1]) == 'string' then
for _, gang in pairs(door.authorizedGangs) do -- Support for old format
if gang == PlayerData.gang.name then return true end
end
end
end```
Config.DoorList['CardealerGarageDoorExample'] = {
objName = 'prop_com_gar_door_01',
objCoords = vec3(-21.04025, -1410.734, 30.51094),
textCoords = vec3(-21.04025, -1410.734, 30.51094),
authorizedJobs = { ['cardealer'] = 0 },
locked = true,
pickable = false,
distance = 15.0
}```
Not in the door creation menu, but you can edit the config once it's added and define the job grade like it is above.
Bottle fed info, jeez.
citizen ids are in players table in sql
you can look at that
I don't want it to be a specific player though
A job grade
so set when you get the door config
Its not there though
otherwise if you want to work on the menu base for the grade then pr it in framework?
Here let me get in my server and show you
He wants it to be added to the menu when creating the door and doesn’t want to adjust it in the config himself
which is why I said otherwise if you want to work on the menu base for the grades then pr it in framework?
I got it to work? Apologies for my late response.
@errant minnow I know this post is a bit old but I just submitted a small PR to add this functionality to the /newdoor menu. It's still under review, but in case you needed to lift the code for your server you can download it from this fork 🙂 : https://github.com/oghelios/qb-doorlock/tree/enhancement/jobGrades
I already fixed it myself