[Release] esx_doorlock

Can anyone give me the code to add the front & back doors for vanilla unicorn into esx_doorlock (vector3 version). It will help me much!!

get devtools… you can do this all yourself.

anyone know the script to enable lock door for certain job grades ? such as boss’ room door only unlockable for the boss

Hello! I have conflict with this, I don’t see a way to make it work, is something wrong? thanks

Config.DoorList = {

-- Mechanic Doors
{
    objName = 'prop_com_ls_door_01'
    objCoords = vector3(-356.0905, -134.7714, 40.01295),
    textCoords = vector3( -356.0905, -134.7714, 40.01295),
    authorizedJobs = { 'mechanic' },
    locked = false,
    distance = 12
},

You have missed a , after objName = 'prop_com_ls_door_01', so it should be:

-- Mechanic Doors
{
    objName = 'prop_com_ls_door_01',
    objCoords = vector3(-356.0905, -134.7714, 40.01295),
    textCoords = vector3( -356.0905, -134.7714, 40.01295),
    authorizedJobs = { 'mechanic' },
    locked = false,
    distance = 12
},

Thx but not work :frowning:

Have you missed any other commas ( , )?

1 Like

No
I put it on top of the police and not work

Config.DoorList = {

-- Mechanic Doors
    {
            objName = 'prop_com_ls_door_01',
        objCoords = vector3(-356.0905, -134.7714, 40.01295),
            textCoords = vector3( -356.0905, -134.7714, 40.01295),
        authorizedJobs = { 'mechanic' },
        locked = false,
            distance = 12
},
	   
-- Mission Row First Floor
--

-- Entrance Doors
{
	objName = 'v_ilev_ph_door01',
	objCoords  = {x = 434.747, y = -980.618, z = 30.839},
	textCoords = {x = 434.747, y = -981.50, z = 31.50},
	authorizedJobs = { 'police' },
	locked = false,
	distance = 2.5
},

Look at the code it self. Your using a old version with a new version of the config file

objCoords = vector3(-356.0905, -134.7714, 40.01295),

objCoords = {x = 434.747, y = -980.618, z = 30.839},

Copy a peace and change the location etc from a working part of the config file,

i want to change the floating text its really in your face and not pretty does anyone know how i can do that?

Edit the “Draw3DText” function in the client\main file

Hello!
If I use ESX_Doorlock & try to open any of the gates of this MLO they get stuck if I lock them while they’re not fully closed. But if I go away far enough the get restored to their normal position.
Also watch my video for clearification of what I’m talking about.

Video

Does someone have a fix to this problem? I’ll post here if I’ll be able to fix it myself though.
Best regards.

i have a problem with my lsc door it glitches out when i lock it and other doors work can anyone help?
–Entrance

{
objHash = GetHashKey(‘prop_com_ls_door_01’),
objHeading = 250.0,
objCoords = vector3(-356, -134.65, 39.01),
textCoords = vector3(-356, -136.65, 41.01),
authorizedJobs = {‘mechanic’},
locked = true,
maxDistance = 14,
size = 2
},

If your talking about the size of the text put “size = 0.4” under the maxDistance line, make sure to add a “,” after max distance

its not the text it the door when i lock it it goes back to a staright postion

i figured out how to change the size of the text
in your client/main.lua look for :

if v.distanceToPlayer and v.distanceToPlayer < v.maxDistance then
local size, displayText = 1, _U(‘unlocked’)

change:
local size, displayText = “1” to what ever size you want. i personally like .5

That’s what I use in my version of doorlock

{

    objName = 'prop_com_ls_door_01',

    objCoords  = vector3(-356.09, -134.77, 40.01),

    textCoords = vector3(-356.09, -134.77, 41.01),

    authorizedJobs = { 'mecano', 'mechanic' },

    locked = true,

    distance = 12,

    size = 2

},

You have to delete the “object heading” line :wink:

2 Likes

Thank you I will try it tomorrow you are a saviour no one could help me ahah :grinning:

1 Like

Hello, how can i make the door locked for a specific jobs rank? Example : Chief of Police door that only Chief can unlock/lock.

Can i somehow add a animation when closing and opening door?