[Release] NextGen Doorlocks!

-------------------------------
– NextGen Doorlocks –
-------------------------------
– //©_Scrubz#0001_© ^_^// –
– //NextGen Framework Public Release// –

Download:
via Github

– Features –

  • Swing Checks
    It will wait till the door is in the closed position before locking. To prevent this from bugging out, after 5 seconds it will auto lock the door. When doors are locked, the closed position is forced to prevent locked doors from being locked open. You can remove this if you want.
  • Auto-locking at Night
    Doors with this feature enabled will auto-lock at night, and auto-unlock in the morning.
  • Lockpickable Doors
    Doors with this feature enabled can be lockpicked by players. There is an export there to check if your near a door that can be lockpicked before you fire the lockpick event.
  • Auto-Relocking
    Doors with this feature enabled will auto-lock after the set time when lockpicked open. Could be fun to use in many different ways!!
  • Door Support
    This resource currently supports single doors, double doors, and double doors that are different models!!
  • Optimized Resource
    Currently (on my pc) it runs about 0.02 - 0.03ms max when not drawing text and at a location that contains locked doors. It was running at 0.01ms when not drawing text, but I had to freeze all doors constantly when your in a location with locked doors due to being able to shoot open locked doors (I was previously only freezing the door when you were close to it). Feelsbadman.

– General Info–

  • As of posting this, all features in the drp version work without issues. But since I don’t use esx nor do I have any esx files to test on, ontop of being in the process of rewriting the drp core (shoutout to Darkzy for his work), I will be providing limited support for this resource. I will fix bugs/broken features, but if it doesn’t work out the box I will NOT help you get it working. If you fix/add anything, please submit a pull request!! <3

  • Make sure you actually read the readme and the configs. I have made notes on settings inside the doorlist.

– Current Bugs –

  • For some reason the swing check doesn’t work with the side doors at pdm. Idk if it’s just those doors, all multimodel double doors, or if it’s my code (since I only tested those doors when I added the multimodel support). I’ll come back to it eventually… :shrug:

– Future Updates –

  • I might eventually move the door configs serverside, and pass it to the client on join to prevent finding door locations from dumping.

– FAQ –

Idk why it’s broken, can you help me??

No.

The esx version no work!?!?

This may be due to the version of esx your running. I don’t use esx, nor do I have any files to test with therefor I will NOT help you get it working.

I found a bug!!

Please for the love of god submit a pull request!! Don’t just horde all the fixes to yourself.

I have a better way of doing -xxx-!!

Either make a pull request, or send me the code. :slight_smile:

Could you add -xxx-??

Maybe. If you give headpats I might be inclinded to do so.

15 Likes

godlike O_O

Amazing

Can someone write a version that works with Steam ID’s?

2 Likes

Great work, you always make the best shit.
Tested on full server work amazing very optimised

This is amazing.
What is DRP? A Framework?

Yes. I personally like it better than esx. It’s built around multicharacters and runs better. I get more fps on it than I do with esx.

1 Like

Ahh, I see. You linked it. Thank you, Scrubz.

Will this work on vRP servers?

No. There are only versions for esx and drp. I’ve never used vRP so either you or someone else will have to convert it.

oh ok thanks for the fast reply !

Hello, how can I solve that the door remains like this?

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