[Release] esx_doorlock



I know that I need to change that. But i have tested with Tjena!
if xPlayer.getInventoryItem('policekey').count >= 1 then
And it doesn’t work…


I am wondering how do I get a key as well…If anyone can direct me I be most grateful.


this is still hitting me with atleast 5-7 frame loss on the server. is there no way to lighten it up any more?


@Skrubzilla1 What’s your server specs? Does is happen when you open a certain amount of doors? Is there a lot of people close to the esx doors? Have you added doors in the config?

I also recommend reading this thread and editing the script yourself to make it more efficient: [Best practice] Improve your resource performance


really sweet guide i thank you for directing me too that! server specs are 32 gig of ram. with an 6th gen i7. its running in a docker on linux. its me alone on the server and as far away from the doors as i can be. when the script is turns on the biggest amount lost is FPS noticeably right away is atleast 5 Frames


i think a easy fix for any of the remaining performance issues with this would be to removed the 3D test and put it up in the left corner as a 2d


It has nothing to do with the 3d text. The code for getting doors in your area is very shitty and needs to be changed out. There’s plently of better ways to get nearby doors.


Love this script I got it working on my server without any issues :slight_smile: I’m the only guy with the guys on me because I am boss! lol


Curious how we get the list of doors as well as in a custom interior the location of that exact door?
So I found the door

I marked it with a marker I even placed the location of the door in the file correctly and still nothing happens…

[19] = { ["objName"] = "v_ilev_ph_cellgate", ["x"]= 1691.63, ["y"]= 2579.7,["z"]= -69.39,["locked"]= true,["txtX"]=1691.63,["txtY"]=2579.7,["txtZ"]=-69.39},

Still does not work even after restarting the resource… Im confused as to why its not working.


Addon gate is not workin properly :frowning:


Hi i want to use your script but i have 1 problem where do i change so that other cops also can use it because im owning a danish server and there a cop is called Politimand and in this its probably called Cop please help me change it i cant find it in the config or in the other files


How do i add some policekeys to open the doors?


If you mean keys as item you have to add keys in your database and create marker that police officers will be able to take them or only boss can have keys. Next you have to add some lines of code that will check if player have keys in inventory its very simple. Sorry for my eng :wink:


Okey man, I dont think i can do it by my self, But thank you! Sorry for my eng :wink:


Script renamed and added support for mutiple jobs! There’s also been performance improvements thanks to Pando


how you get the doors to unlock and lock?


sweet thanks for the update bro


coords fix for the missionrow.ymap mod:)

	objCoords  = {x = 412.7, y = -1026.55, z = 29.39},
	textCoords = {x = 412.66, y = -1021.00, z = 32.00},

these coords made it work again. thanks for a awesome script, keep it up!


Hi there, What do you do to get the key to unlock the doors? It says I am not keyholder but im Superadmin? Can some one help me out and tell me what I need to add or what ever it is?

Thanks in advance.


You have to be policeman lolz