[QBCore] kk-doorlock optimized doorlock system with GTA doorlocksystem

kk-doorlock
A remaked version of QBCore’s original doorlock system.
The script runs at 0.01 idle and 0.05-0.10 when displaying 3d text and close to a door.
The script is made with GTA standard door system which i think is much better than the original freezing entity. So thanks to CharlesHacks Guide on how the GTA doorlock system works.
This script was tested with over 200 set of doors.

Features

  • Well optimized
  • OneSync Infitity/legacy compatible
  • Animations
  • Compatible with jobs, gangs and citizenid’s
  • Automatic door close function

Download

Preview

ToDo:

  • Make an ingame doorHandler, so you can make and delete doors ingame

Other than that i hope you like it, and if theres a problem just comment it or submit an error on the github. :blush:

8 Likes

You probably had fun working on this project huh? Good job buddy! Nice beginnings :grin:!

1 Like

Haha thanks, i thought it could be helpfun when the original QBCore doorlock system runs at 1.10 ms when close to a door, and i just found out about CharlesHacks guide and i had to try it :smiley:

1 Like

Got a video of the in game functions?

I can record one quick :slight_smile:

2 Likes

Developer instinct mate keep going, you will improve!

1 Like

Made two previews now :smiley:

1 Like

A small suggestion I barely see in those system is a timer on the door when X time passes it will close automatically instead of doing that awkward walk to close the door.

1 Like

Uhh thats a good suggestion!

1 Like

I suggest using PlayerPedId () instead of GetPlayerPed (-1) as it’s a lot faster and use Lua vector math instead off GetDistanceBetweenCoords example #(vector3(x, y, z) - vector3(x, y, z))

1 Like

Made it now, check it out in the new release, and it would be great with some feedback :smiley:

Done, thanks for the suggestion :smiley:

1 Like

how can we add double doors into this ?

Yeah, sorry i added an example in config.lua on how to make double doors

Hi, i got an error with setDoorLocking(doorID, k), how i can fix it please? (got nil value)
PM: I delete all the stuff with QBUS because i dont have it, maybe is something miss with QBUS?

Hi, can you send the error that you get in the console? :smiley:

1 Like

Sure!

Have you changed anything in Config.lua?

I think you have changed something that could have broken the function, can you send the function to me?

2 Likes

I download the last version (with AutoCloseDoors in config) and works great! Thank you so much mate to help me!

1 Like