Extended Jail - ESX - Escape

having issues with


function JailPlayer(player)
	ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'jail_menu', {
		title = _U('jail_menu_info'),
	}, function (data2, menu)
		local JailTime = tonumber(data2.value)
		if JailTime == nil then
			ESX.ShowNotification('Invalid time')
		else
			TriggerServerEvent('esx_vankilapako:jailplayer_server', player, JailTime, 'prison')
			menu.close()
		end
	end, function (data2, menu)
		menu.close()
	end)
end

not working with police job, anyone have it working and can show what it looks like?

I’ve run into an issue due to these lines:

ESX.RegisterCommand('jail', 'admin', function(xPlayer, args, showError)
	JailPlayer(args.playerId, args.time, { jail = 'prison', type = 'first', time = args.time}, xPlayer)
end, true, {help = 'Jail Player', validate = true, arguments = {
	{name = 'playerId', help = 'Player ID', type = 'playerId'},
	{name = 'time', help = 'Minutes', type = 'number'}
}})

Only an admin can jail another admin. You cannot jail other players. Only admins. if you set admint o police you can only jail police as a police. How do I make it so a police can jail anyone?

@edelin3 I have this as well. Did you find a solution?

Hey! Extendedjail is just updated, so please install latest version. If you found some bugs, please create issue for it!

hey quick question can you tell me the item that its use to break people from prison ?

Hey. You can change that item on config.lua.

yeah, MB I saw it xd “bread” … you know how to change the difficulty of the mhacking ? I tried to change but it bugs out.


Getting this error :confused:

Hey! When this bug appear? With command?

command yes

Okey. What is your current esx version? Make sure you use esx 1.2 final or extendedmode. I’l check that error soon as possible!

1 Like

but you have any idea on how to prolong the hacking time ?

Im excited for the prison job ^^

i cant jail people with the police job

Is there a way to make it so other jobs can jail people for example I have a sheriff job and state trooper job which is separate from my police job

Hey, and sorry late answer. You have to download latest version of this script. Also please read docs and use your own brains. Installation is really easy.

Hey, of course it’s possible. You can add exports for any job. But keep in mind that you have to maybe change permissions. If you want to use multiple jobs, use or condition.

Example use in line 10

if xPlayer.job.name == 'sheriff' or xPlayer.job.name == 'statetrooper'  or xPlayer.getGroup() == Config.AdminTitle then

I added the lines of the docs to my policejob, but after entering menu nothing happens.
Added the exports to if data.current.value == ‘citizen_interaction’ then menu.

Can you help me out?

Hey man. Very interested in the progress of the prison jobs. Any news on that?

hello, how to fix this

You haven’t added “jail” or “Pjail” to the locales/en.lua

add the following to “en.lua”:
[‘jail’] = “Jail Menu”,
[‘Pjail’] = “Pjail Menu”,

You want it to look like this:

– Action Menu
[‘citizen_interaction’] = ‘citizen Interaction’,
[‘vehicle_interaction’] = ‘vehicle Interaction’,
[‘object_spawner’] = ‘object Spawner’,
[‘Jail’] = ‘Jail Menu’,
[‘Pjail’] = ‘Pjail Menu’,