Script for locking jail cell doors

is there a script for locking jail cell doors we would really love have that in our server so people cant get out of jail cells

2 Likes

I need the exact same thing!

  1. Get the entity / object near a coordinate. Doors are object.
  2. Set door max acceleration and ajar to default closed and locked values (so it does not look stupid), like an open locked door.
  3. Profit.

The cell doors in mission row you are looking for are [JSON]:

[{
	"hash": 631614199,
	"pos": [461.8065,-994.4086,25.06443]
},{
	"hash": 631614199,
	"pos": [461.8065,-997.6583,25.06443]
},{
	"hash": 631614199,
	"pos": [461.8065,-1001.302,25.06443]
}]

Should work with SET_STATE_OF_CLOSEST_DOOR_OF_TYPE without having tried it myself. For an easy solution.

1 Like

i found the script now can i add in other doors like i have a script where we have the jail at sandy shores pd

Could you post the script please.

1 Like

i need them for the jail cells https://www.gta5-mods.com/maps/sandy-shores-sheriff-pd you want the 1.0 verison there is like 6 jail cells

ok for some odd reason i have the script in but when we lock the doors as cops the prisoner can still get out its like it doesn’t to the other person that the door is locked

You lock them for one client, you need to send the lockstate to the other players to have them locked clientside for all people.

how do i do that i have this script dRdoors

Ideally you would make a server script, which tracks the state of the doors, and whenever someone is close enough to the doors it sends the state to him when the state of a door is checked.

ok which im not good at making scripts

whats the script to even get the jail cells?

it is a map edit that you have to find and download