#qb-doorlock

1 messages · Page 1 of 1 (latest)

errant minnow
#

I feel that the qb-core devs should add a function within the /newdoor menu where we can make certain doors require a certain grade or higher to enter. Because realisticly some doors can't be unlocked by PD Rookies and whatnot.

uneven sinew
#

Could you not just use CitizenID Auth then add multiple to it?

tall temple
#

Once you have created the door using /newdoor go to the file and adjust it to for the grades 🤷‍♂️

errant minnow
#

Let me*

#

Bro it was just a suggestion for the in-game command

#

Not in the files

latent isle
#

then when you get the config you could add it in

errant minnow
#

It isnt

#

It is only Job Auth, Gang Auth, etc

#

No grade

gleaming beacon
#
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```
errant minnow
#

What is citizen ids?

gleaming beacon
#

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.

errant minnow
#

Is that player ids?

gleaming beacon
#
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.

latent isle
#

you can look at that

errant minnow
#

A job grade

latent isle
errant minnow
#

Its not there though

latent isle
#

otherwise if you want to work on the menu base for the grade then pr it in framework?

errant minnow
#

Here let me get in my server and show you

tall temple
#

He wants it to be added to the menu when creating the door and doesn’t want to adjust it in the config himself

latent isle
errant minnow
#

I got it to work? Apologies for my late response.

zenith jacinth
errant minnow
#

I already fixed it myself