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

Just store default rot and take a timer, nothing special :smiley:
(SetEntityRotation will be your friend)

The doors will lock in whatever position they are in when locked so i dont see rotation been of any use here :stuck_out_tongue:

Nice script but sadly runs so high its of 0 value to anyone with a server slot above 10.

In what respect? As in its running heavy?

I just run this on my local server to test it as i had just finished modifying my own door script, it runs at 1.67ms idle. That is server breaking high in my opinion.

My script runs around 0.08 idle, spikes to 0.21ms max when looking for the doors.

resmon 1 in your console gents…

1 Like

Looking into a fix as we speak, If i cant figure one out ill be removing this resource from the forum! XD

Sorry to point that out my dude, appreciate you looking into the issue. Door scripts are tough as you are constantly scanning and checking location lists so i feel your pain…

Ive actually fixed the MS issues and max is now 0.3ms problem is all doors start off unlocked… regardless of what the drawtxt says… HMM if i could do an initialcheck rather then constanlty i think where onto a winner :smiley:

BEING REMOVED DUE TO ISSUES!!!

Thanks sp4wny for the info! :slight_smile:

No worries my dude, looking forward to the revision to see if you can better what I’ve achieved already

1 Like

How do you check for running time? Thanks!

When In game press F8 and type resmon 1 then extend the box that pops up. Then to close it type resmon 0

thanks sir

Thanks!

Apparently broken

I would like to try making one real DNA DoorManager. Like only the owner of the house could open his door :slight_smile:

If you can fix the isues that persist please go ahead :slight_smile:

If you optimalize by tick counting it works very well!(0.04ms)

Like this: (find in CreateThread else)

if(GetGameTimer() % 1000 == 0) then
	local closeDoor = GetClosestObjectOfType(doorList[i]["x"], doorList[i]["y"], doorList[i]["z"], 1.0, GetHashKey(doorList[i]["objName"]), false, false, false)
	FreezeEntityPosition(closeDoor, doorList[i]["locked"])
end

Ill give this a try, Thank you :slight_smile: But i think it needs to update quick or it wont work correctly, But ill see if i can make it managable!