[Release] esx_jail

Nope ,doesnt works :confused:

how do i change the position of timer?

edit: found out

am unable to get this to work for esx_policejob is anyone able to help me a bit more?

You just need to follow the indications on the first post.

i have and when i try it in game then menu doesnt even pull up, so there is some issue thats making the police script crash – edit- im pretty new to scripting period, all self taught , been doing great with my server though, just some minor things i have bene unable to figure out, for now i just mod the polce, and they can jail.

1 Like

You can use the Scrambler PLEASE look at our Pullrequests

That message pops up and also when I put in a number nothing happens. Player doesn’t get sent to jail

i know im a bit late and if anyone is still even on this script but im facing an issue. whenever i go to open the jail menu in the F6 for the police job, it doesnt let me type then the menu for jailing glitches out. its like the menu isnt even on my screen but it is

Looking for a little help with esx jail for some reason you get released from jail a minute to 30secs early everytime notice last night went to jail for 4 min was release with 132secs left anyone have any tips on how to fix the timers?

need anti combatlog

el pumpo I love all your scripts it works all well, it’s great art. However on this script I had some problems, time level; if a person disconnects and reconnects, the prison time is reset, (he must remake the time completely). 2: When you reconnect, the clothes are no longer those of the prison.3: the unjail mode works halfway, the guy gets the message but does not end up outside the prison … I looked 3 times if you made this script, I thought it was was suspicious because normally everything works. I tested on a server 100% clean …
ps: I admire you very much you are the best fivem editor.

it’s good i’ve found your perfect upgraded version from A to Z just a problem with the sql in server.lua (in esx_jailer) change isDead by is_dead for the new esx_ambulancejob. But know that I admire you elpumpo :slight_smile:

Ok so im using this and sending them to jail via command and menu works fine and same with unjail however when the civ gets released there kinda of froze in place.cant move.

Any ideas

Thanks

No need to add it.

hi i need help with my script my f6 menu wont come up. can anybody help me

I’m receiving this error, unsure why. Any help would be appreciated… Thanks

Error loading script server/main.lua in resource esx_jail: @esx_jail/server/main.lua:38: attempt to call a nil value (field ‘RegisterCommand’)
stack traceback:
@esx_jail/server/main.lua:38: in main chunk

Hello, hoping someone on here can assist me. I have been having major issues with adding the ESX_Jail script to the ESX_Policejob. Every time I add the lines of code to the police job, it bricks the full menu. - Nothing from the F6(police menu) menu will show. See below for the code I added. Please tell me I went wrong some where.

ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'police_actions', {
	title    = 'Police',
	align    = 'bottom-right',
	elements = {
		{label = _U('citizen_interaction'), value = 'citizen_interaction'},
		{label = _U('vehicle_interaction'), value = 'vehicle_interaction'},
		{label = _U('object_spawner'), value = 'object_spawner'}
}}, function(data, menu)
	if data.current.value == 'citizen_interaction' then
		local elements = {
			{label = _U('id_card'), value = 'identity_card'},
			{label = _U('search'), value = 'body_search'},
			{label = _U('handcuff'), value = 'handcuff'},
			{label = _U('drag'), value = 'drag'},
			{label = _U('put_in_vehicle'), value = 'put_in_vehicle'},
			{label = _U('out_the_vehicle'), value = 'out_the_vehicle'},
			{label = _U('fine'), value = 'fine'},
			{label = _U('unpaid_bills'), value = 'unpaid_bills'}
			{label = _U('jail'),            value = 'jail'},
		}

The line I added - {label = _U(‘jail’), value = ‘jail’},

Next section -

		ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'citizen_interaction', {
			title    = _U('citizen_interaction'),
			align    = 'bottom-right',
			elements = elements
		}, function(data2, menu2)
			local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer()
			if closestPlayer ~= -1 and closestDistance <= 3.0 then
				local action = data2.current.value

				if action == 'identity_card' then
					OpenIdentityCardMenu(closestPlayer)
				elseif action == 'body_search' then
					TriggerServerEvent('esx_policejob:message', GetPlayerServerId(closestPlayer), _U('being_searched'))
					OpenBodySearchMenu(closestPlayer)
				elseif action == 'handcuff' then
					TriggerServerEvent('esx_policejob:handcuff', GetPlayerServerId(closestPlayer))
				elseif action == 'drag' then
					TriggerServerEvent('esx_policejob:drag', GetPlayerServerId(closestPlayer))
				elseif action == 'put_in_vehicle' then
					TriggerServerEvent('esx_policejob:putInVehicle', GetPlayerServerId(closestPlayer))
				elseif action == 'out_the_vehicle' then
					TriggerServerEvent('esx_policejob:OutVehicle', GetPlayerServerId(closestPlayer))
				elseif action == 'fine' then
					OpenFineMenu(closestPlayer)
				elseif action == 'license' then
					ShowPlayerLicense(closestPlayer)
				elseif action == 'unpaid_bills' then
					OpenUnpaidBillsMenu(closestPlayer)
				elseif action == 'jail' then
					JailPlayer(GetPlayerServerId(closestPlayer))
				end
			else

This is the section I added - elseif action == ‘jail’ then JailPlayer(GetPlayerServerId(closestPlayer))

Last section -

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 number!’) else TriggerServerEvent(“esx_jail:sendToJail”, player, jailTime * 60) menu.close() end end, function (data2, menu) menu.close() end) end

So the above comment, we have gotten it into the F6 menu. No we have another issue.

https://gyazo.com/3889eeba30c31e1d63ba0b7fe3b55cf6

https://i.imgur.com/iBlU5jc.png

I get that error whenever the script loads in the server or whenever i restart the server, please help.