[Release] NextGen Doorlocks!

If it’s locked, then you have the heading set wrong.

I already solved it thanks just that you forgot to set course on the lines of individual doors! a question friend how can I close a double door that have different names each?

Great Job man!
Also noting that DRP is a great framework to work on :slight_smile:

It should already work for double doors that have different door models. Just make sure you have multiModel = true, and doubleDoor = true, in the config for that door, and correctly set up the doorModel = {info}, and doorPos = {info}, for that door

1 Like

I tried like that but it didn’t work it all. Forexample

Blockquote
name = ‘Enterance Doors’,
jobs = {‘police’},
multiModel = true,
doubleDoor = true,
doorModel = {[1] = ‘v_ilev_ph_door01’, [2] = ‘v_ilev_ph_door02’},
doorPos = {[1] = vector3(434.7, -980.6, 30.8), [2] = vector3(434.7, -983.2, 30.8)},
textPos = vector3(434.7, -982.0, 31.5),
heading1 = -90.0,
heading2 = -90.0,
isLocked = true,
unlockDistance = 4.0,
canPlyLockpick = true,
lockpickTime = 45000,
autoLock = true,
relock = false,
autoLockTimer = 120,
autoLockCooldown = 0,
lockAtNight = false

If it’s not freezing the doors when locked, than it’s an issue with it not correctly grabbing the doors. I use devtools to grab door positions.

Yes I did it like that but it didn’t work it all,no text no locking system. It’s work perfectly for same hash double doors and one doors. I think there is a problem about diffrent hash multi doors.

I just went and tested again. They work for me with no issues. It has to be something on your end. Make sure the keys match for doormodel and doorpos. If your not getting any drawtext, then it’s def an issue on your end.

location = 'PDM',
centralPos = vector3(-42.31, -1098.81, 26.42),
distanceCheck = 30,

Make sure that the distance is large enough to cover ALL doors. Otherwise it won’t register that your in that location and the drawtext wont come up.

1 Like

how do you like pick a door

Does this support multiple jobs? Tried a couple of times but none seems to work.

Just use the export to check if your near a door, and if you are trigger the lockpick event. And your getting that error cause you don’t have our progress bars. You will have to replace the code with your own progbar stuff.

Yes it works for multiple jobs. Just do jobs = {'job1', 'job2', 'job3'}, etc

1 Like

Yep, that’s the way I was doing it and for some reason it only works with ‘job1’ and ignores the rest.

Ah yeah I had a return in the wrong place. Thats my bad. I updated the repo.

1 Like

Great release! Thank you very much!

I have a problem tho. Everything works great. I use devtools to grab the door model, but some doors don’t have model name. Shows only door hashkey.

How can I make it so the script grabs the hashkey without the modelname of the door. Would be nice if there would be an option where you can set the hashkey in the config, if you cannot grab the model name of the door.

1 Like

Ok i think i fixed, the code always check for a string, i just put an OR before every GetHashkey. in client
/cl_doors.lua
line 110

door1 = GetClosestObjectOfType(n, Data.Current.Doors[i].unlockDistance + 0.0, model1 or GetHashKey(model1), false, false, false)

Line 121

door2 = GetClosestObjectOfType(n, Data.Current.Doors[i].unlockDistance + 0.0, model2 or GetHashKey(model2), false, false, false)

Line 137

door1 = GetClosestObjectOfType(v, Data.Current.Doors[i].unlockDistance + 0.0,Data.Current.Doors[i].doorModel or GetHashKey(Data.Current.Doors[i].doorModel), false, false, false)

Line148

door2 = GetClosestObjectOfType(v, Data.Current.Doors[i].unlockDistance + 0.0,Data.Current.Doors[i].doorModel or GetHashKey(Data.Current.Doors[i].doorModel), false, false, false)

line 162

doorSingle = GetClosestObjectOfType(Data.Current.Doors[i].doorPos, Data.Current.Doors[i].unlockDistance + 0.0,Data.Current.Doors[i].doorModel or GetHashKey(Data.Current.Doors[i].doorModel), false, false, false)

i dont know if this is the correct way to do it.
all the credits to itsxScrubz

Ok this looks, excuse my language. Fucking Sick!

Going to throw it in to my test server, got a few ideas already!

Hey I love your work man, I installed the ESX-Version and everything is working great just can’t figure out how to lockpick doors, neither do I find a function for checking the ‘lockpick’-Item or anything like that, do I need to add a special event in my lockpick-Itemusage or how does it work exactly?

Not sure if @itsxScrubz would want to implement this into the source code himself, but what you can do is go to the door config and change all the named doors from 'v_name_of_door' to `v_name_of_door` with backticks and then you can also add your new hashes in number format. Following on from this, you would need to go into the client script and change all mentions of GetHashKey(hash) to just hash

This should achieve what you’re looking to do.