[RELEASE] [ESX] esx_dnaDoorManager - Synced lockable doors via Database! (POLICE) UPDATE 30/09/19


getting this issue, can someone guide me?

@VultureScripts Okay, perhaps I didn’t read the initial information correctly but to me it read that all the doors were synced in the database.

Why do we have to have this then ?

  • I would expect that I add a door in a database table with it’s propname, x , y and z location and that the script reads that and checks if it’s locked / unlocked. With this solution I still have to manually add doors to a script where you want to be able to restart the script and it picks up the changes from the DB.

It uses the [1] etc to get the doors information :slight_smile:

I can make a pull request but I have distance checks working and gates working on my server. Im assuming its still gonna be syncing as I just added the IDs similar to the format you have in the db and in the script. The distance checks can also be used for the other doors as well if people want to make the unlocks and locks further from the door.

Granted I am all alone on the server but from my testing all the gates seem to be working. Testing will definitely be needed on a bit more populated server. I am also using custom ymaps for gates at lspd and bcso offices.

Ofcourse! Go ahead ill look over it :smiley: And aslong as all seems okay il update it :smiley:

Thank you.

Will do! The code isn’t all my idea. Took the idea from esx_doorlock. Just tweaked a little to match the code in your script. So it could most likely be improved. Just learning lua as I go. :slight_smile:

1 Like

Sounds good to me :smiley: :smiley:

That I saw, but when I read synced doors via database I expected the door to be in a table in the database and not in the script so a quick restart of the script would instantly load the new doors from the database.

But that might have been an idea you’re gonna be working on now, correct ?

UPDATE 30/09/2019

Thanks to @Crutchie you now have the ability to add distance checks to the doors.

This makes life easier if wanting to add gates.

Thanks for the PR :) 

Hey is it possible to add steam ids to this lock script please

Hello, I would like to know how I could add permits to other doors? for example I want to close the mechanic’s workshop, but how would I make the mechanic no longer open it?

I’ve never done garages before but theoretically you just need to get the coords of the door and the prop name and use those in the client script.

As far as mechanic not being able to open it as long as they don’t have access to open doors then they shouldn’t be able to open it.

I know that friend! you do not understand me, what I want to do is to be able to create a permit for the mechanic apart from the policy that comes by default, the mechanic’s door and the concurrent one and close it but what is necessary to give the mechanic permission to open it

what must i edit when i want ambulance can open the Doors or other Factions , or with an item?

1 Like

@VultureScripts what would i need to remove to make this non esx, as i already have a doors script but it lags, and it seems you have fixed that. My server is just not esx so i would like to remove that part.

Do you use essentialmode?

yes sir @VultureScripts

1sdww

sql doesnt work

these 2 sql don’t work
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) /;
/
!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;