[Release] esx_jail

clearly, im not the only one miss reading here. it would appreciate your help. I’m telling u it doesn’t work with /unjail gives me nothing in consol or text and /jail spits the error I showed you. the police menu option IS working 100% but without a way to unjail someone how can I use this what if someone gets jailed who shouldn’t have. There is someone on here having the same issue I am so it’s not an isolated even. I put your script it started it without touching anything in a super admin on the server and when I do /jail error. /unjail NOTHING.

Edit could you add a way to unjail someone thru the police menu with there player number as the identifyer

/unjail is not working any help?

Yet again I don’t understand how you guys managed to break the script… I wont provide support for silly questions from inexperienced users.

Today I took a look at the code and realised how awful it is, so I’ve done many changes to improve the script (commit), here are the changes:

  • Major code cleanup
  • Improved usability with the commands, not specifying user in the unjail command will unjail the source
  • Check for jailing non-existing users, and makes sure there is a time
  • Locate improvements with formatting (using %s)
  • Code cleanup and improvements over all
  • Prison clothes moved to config.lua
  • Added basic documentation
  • Reduced spam message to jailed player
  • Jailed players can no longer die (verify?)
2 Likes

any possibility of making it so if someone is jailed handcuffed it realises them and removes the cuff

Anyone know a way a cop can unjail via command?

If you released the latest commit then godmode doesn’t work. People killing each other inside the jail.

Yep I know, didn’t I revert that commit?

Your able to still kill inside jail

just make it a punishable offence within your community eg “Killing in jail will be considered RDM by Admins and is punishable by current RDM punishments”

It will just do that they can wait until the death timer runs out and respawn at the hospital.

Can you please fix it?

How can i change the space so a jailed person can move around on a larger area?

[ERROR] [MySQL] An error happens on MySQL for query “UPDATE jail SET identifier=@ID WHERE identifier=@identifier {@ID=RELEASED=steam:;@identifier=steam:}”: Duplicate entry ‘RELEASED=steam:**********’ for key ‘PRIMARY’

Got since two days this error message. It seams the unjailed gamers are not deleted in the list or the report its double inside crashes server…anyone an idea whats wrong? And how to noob fix it :wink:

Stemnumbers i delete

Short question, I wonna include the esx_jailer in esx_policejob *fixed

My Problem:

if data2.current.value == ‘jail’ then
JailPlayer(GetPlayerServerId(player))
end

My Changes:

elseif action == ‘jail’ then
JailPlayer(GetPlayerServerId(closestPlayer))
end

data2.current.value i change to action, I forgott something?

Updated thread, it should now be even easier.

fantastic idea…but i think i got it, but same error … after release. also every insert stay in JP1 also in JP2 and JP3

Then read the error message?? Duplicate entry ‘RELEASED=steam:**********’ for key ‘PRIMARY’ obviously you are trying to jail a person that should be in jail.

Why are you bringing up jp1, 2 and 3? It’s not a part of this script and will never be.

Hey @Hawaii_Beach I got this Message after the person is automaticly released. the Entry Insert istn’t deleted and if I use JP1 or JP2 or JP3 in the DB stands all the time JP1 hope it helps, can send you pics

I’m having error “Can’t load script clientJailer.lua”, what can I do?

This is my console errors:
Failed to load script locates/en.lua.
Failed to load script locates/sv.lua.
Failed to load script config.lua.
Failed to load script server/main.lua.
Started resource esx_jailer

could someone go about making this only allow cops through ESX and not just admins? So i don’t have to make every police on my server an admin