I’ve seen lots of people asking for jail system, but unfortunately, there is still none released.
It feels incomplete when you have a Police RP server but don’t know where to send them after you cuffed them, even tho you sent them to jail, they still escaped, therefore, I created this simple jail system for my server, kept them for weeks and still waiting for a better Jail system script to come out, bu still, days after days, there’s still none, so I’ve decided to contribute and release my script, even tho it sucks and looks stupid, hopefully it would be a temporary solution for those people who are still waiting for the Jail System.
How to use it?
it’s a script base under essential mode, so first simply add a column name “detained” under “users” Table, and simply write a script that can set the player value of “detained” to 1, then when they die, they go to jail, if they try to escape then they will be sent back to jail and gained 4 wanted level.
Current Jail locations are under the police department at los santo city, they’re all changeable, sorry for my english if you find it hard to read since English is not my first language, lol, my apology.
Hey bmage, i really appreciate what you have done for the community, but the download link says access denied, not sure if its a problem on your end or mine.
Thanks
Kind Regards Poptart
Just curious, if you are going to share with the community your jail script,would you mind sharing your script that sets the player value detained to ‘1’? We would greatly be appreciative.
PLEASE!!! anyone… is there any way you could help me with this?
Ive added the column “detained” under “users” table using VARCHAR datatype.
But now im stuck regarding (simply wright a script that can set the player value of detained to 1).
All i can come up with is:
TriggerEvent(‘es:addAdminCommand’, ‘jail’, 5, function(source, args, user)
– Has permission
end, function(source, args, user)
– Doesn’t have permission
end)
I have attempted to script a simple argument for the sv_admin.lua that would change the “detained” column (value) of the user table within essentialmode/MySQL database to 1. However, it appears that i must be missing something - thus, i am posting this in hopes that someone with script knowledge can help point me in the right direction.
if commandName == ‘detain’ then
if #args ~= 2 then
RconPrint(“Usage: detained [user-id] [1=jailed, 0=free]\n”)
CancelEvent()
return
end
if(GetPlayerName(tonumber(args[1])) == nil)then
RconPrint("Player not ingame\n")
CancelEvent()
return
end