[ESX/QB] myPrison - Advanced Jail management script


Hey guys,
and welcome to the script myPrison, which provides everything you can imagine for your jail management.

Showcase:

Highlights:

  • Create as many jails as you want
    not only for the Bolingbroke Penitentiary, also manage your LSPD cells and so on with this script!
  • Full jail management menu (for configurable jobs)
    Check all inmates, change their remaining time in prison or release them
  • Easy to use menu to arrest players
  • Full Prison log
  • Work for the inmates
    → configurable with rewards (less time in prison)
  • Manipulation (Bribe) option for guards (can be completely configured and disabled)
  • Escape Alert for the PD
  • Inmates get food and drinks from the guards
  • Prison gym for the inmates
  • Optional prison clothes and options to automatically remove weapons and items from the player when entering the prison and restore up on release.

Prison Gym
with 5 different exercises

Prison work
Create as many jobs as you want

Time rewards for work and gym
image

Manage prisons through a menu
image

Detailed Prison log:
image

Escape Alerts
image

Extra: Manage all cells on your server with myPrison
→ Also the LSPD Cells: Just add them to your Config. Guards and work can be disabled for those for example.

Event triggers
You can trigger one simple client event to open the menu

TriggerEvent('myPrison:open')

Example integration for esx_policejob:
I’ve added those two events to the F6 menu of the esx_policejob for example.
To do this, you can go to the client/main.lua and add a new category below the existing ones:

Part 1
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'police_actions', {

        title    = 'Police',

        align    = 'top-left',

        elements = {

            {label = _U('citizen_interaction'), value = 'citizen_interaction'},

            {label = _U('vehicle_interaction'), value = 'vehicle_interaction'},

            {label = _U('object_spawner'), value = 'object_spawner'},

            {label = 'Jail', value = 'jail'},

    }}, function(data, menu)

And afterward I’ve aded a new submenu with those two events:

Part 2
elseif data.current.value == 'object_spawner' then
			ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'citizen_interaction', {
				title    = _U('traffic_interaction'),
				align    = 'top-left',
				elements = {
					{label = _U('cone'), model = 'prop_roadcone02a'},
					{label = _U('barrier'), model = 'prop_barrier_work05'},
					{label = _U('spikestrips'), model = 'p_ld_stinger_s'},
					{label = _U('box'), model = 'prop_boxpile_07d'},
					{label = _U('cash'), model = 'hei_prop_cash_crate_half_full'}
			}}, function(data2, menu2)
				local playerPed = PlayerPedId()
				local coords, forward = GetEntityCoords(playerPed), GetEntityForwardVector(playerPed)
				local objectCoords = (coords + forward * 1.0)

				ESX.Game.SpawnObject(data2.current.model, objectCoords, function(obj)
					SetEntityHeading(obj, GetEntityHeading(playerPed))
					PlaceObjectOnGroundProperly(obj)
				end)
			end, function(data2, menu2)
				menu2.close()
			end)
		elseif data.current.value == 'jail' then
			menu.close()
			TriggerEvent('myPrison:open')
		end

If you have trouble regarding his change, simply contact me, so I can send you a main.lua, which already contains those changes.

Regarding Escrow

We paid the highest attention to the opportunity that everybody can simply modify everything without any encryption.
For this matter we only included about two pretty small functions, which never have to be modified and can’t cause any problems into the escrow file. So I can promise 100% that you will not even notice this protection, when you aren’t willed to leak the script. If you encounter any problems through this, we’ll directly remove those functions from the escrow file.

Code is accessible Yes
Subscription-based No
Lines (approximately) 1700
Requirements ESX or QB (all versions supported)
Support Yes

Price: 9.99€
Get the script at: https://luis-scripts.tebex.io/package/5343907

Bundle offer for myPrison + mySpeedcam with more than 10% off: https://luis-scripts.tebex.io/package/5343910

:heart: Feel free to check out our other latest scripts

11 Likes

Masterclass! <3

2 Likes

If someone logs out, do they get sent back to prison?
Anything in place for people who escape maybe the wrong way? Snapping back to cell?

id buy the heck out of this if it allowed for life in prison w &w/o the possibility of parole and of course death row lol

2 Likes

Hey,

when somebody logs out they are of course sent back to prison when they log back in. Everything is saved in the database (also including items, weapons, clothes and so on, so this can be restored when they log back in [if configured like that])
When they escape the police is being notified.

Hey,

how do you should a parole and death row work? What’s technically behind this function.
An isolation cell or similar is already possible, since you can set up single cells in addition. So this should be no problem.

Thank you :slight_smile:

is there a special way to break out? so if people improperly break out they get taken back to prison. I.E. Someone flys in with a helicopter, and flys out with prisoner, the prisoner rubber bands back into the prison?

Or people doing emotes to get out?

parole would be a release by command only called parole only certain jobs and ranks should be able to parole, while on parole any violation of law, and they would be back in jail. there would be no time associated with life except only how many days they have served so far. the command /jail would look something like /JailLWOP or /JailLWPP or /JailDR again only display time served then create a way when managing inmates to set up a parole board hearing or schedule the execution, make executions by injection firing squad or electric chair!! endless possibilities of Prison Life RP.

1 Like

Hey,

there is no proper way to escape…when you leave a configurable zone then the cops are notified and get the gps blips.
There is no teleport back afterwards.

looks great, can we get an option to store inmates belongings in a retrievable area for when they are released? and can we get jail npc inmates option so that it can cause some jail rp in a sense to keep players in jail and on the server?

Looks good. Luis has makes great resources. Keep up the great work!

1 Like

hello , this plugin work with quasar ? for remove and give back item ?
Thanks :slight_smile: if yes i buy it instantly

2 Likes

I see NativeUILua_Reloaded is a dependency, could you please list that here as a dependency and where to get the proper version? I’ve downloaded and installed the one by Frazzle, but it doesn’t appear to work properly with this resource.

1 Like

It isn’t removing items when the setting is set to true.
Getting this error when jailing people and it tries to restore items

I believe the issue is due to the

TriggerEvent('skinchanger:getSkin', function(currentskin))

We are using wasabi’s FiveM_Appearance. I believe he’s made edits to accommodate some skinchanger code, he wasn’t able to get all of it, possibly… Is there a work-around for this?

	-- remove weapons and items
	if Config.removeItemsAndWeapons then
		print('client remove item triggered')
		TriggerEvent('skinchanger:getSkin', function(currentskin)
			TriggerServerEvent('myJail:saveAllItemsAndWeapons', currentskin)
			print('skinchaner get skin event in client triggered')
		end)
	end

I’ve tested it without the skinchanger event and it works perfectly, so there needs to be a solution for servers using FiveM_Appearance

Hey,

at least for ESX there is already an option to store and restore the items.

Best regards,
Luis

Hey,

absolutely forgot about FiveM appearance…will add this check and then it will work fine.

Best regards,
Luis

myPrison - Update - 25.10.2022

  • Added new Config options:
-- Set up how many Cops are required to be able to escape
Config.CopsRequiredToEscape = 2
-- if not enough cops, should the player be teleported back?
Config.teleportBackWhenTryingToEscape = true
  • Removed a bug, that the inventory wasn’t saved when you don’t use the skinchanger [in the ESX version]
  • Added a check when you die to respawn in the prison
1 Like

thank you @Luiiis

2 Likes

@Luiiis do you plan to incorporate synergy with wasabi’s FiveM-Appearence? It appears everything is working fine, minus the clothing changes applying upon jailing player.

Edit: this might be a me thing, on version 1.0.7 and the current Wasabi FiveM-Appearance is 1.2.1