[Release][FX] Jailer

That’s not related to this script, it is related to whatever framework your using which has food and water.

Is it possible to add a whitlist to this in replace of the password? This way i can add all the guys that are police to the whitlist, so they can jail when needed, and if civs try to use /jail, then it will say they arent allowed to use this command due to not being whitlisted.

I used to have this problem with the essentialmode5. I went back to using the 4.6.3 version of EssentialMode and then it worked fine. Not sure what’s causing the problem, but it’s those two interfering or some coding error since EssentialMode probably got changed as of the new version.

Just use the seconds and convert it into minutes. Shouldn’t be too hard. 60 seconds = 1 minute. 300 seconds = 5 minutes. Basic math is crazily good for this.

I know this is kind of an old script, but is there anyway that when sending a player to jail, their skin changes to the Prisoner skin and then back to what they had? Any help would be greatly appreciated.

You can simply edit the code to include the native to change the player model.

1 Like

i edited some of your sql typical code and made it where it will create and import the stuff from jailer.sql if anyone wantss it then here: Jailer.zip (2.9 KB)

All i did was add the sql stuff in from your code above nothing else was changed but you will need to put your password for it if you changed yours :wink: other than that enjoy your sql version of it!

(i cant test it atm so tell me if it works or doesn’t work)

I don’t think it works

nope dosnt work after player relog he is a free men xD

ALTER TABLE users ADD jail varchar(255) NULL default ‘0’;

How can i remove the password function? i have tryed just crashing it :stuck_out_tongue: Tnx in advanced :smiley:

is their any way to remove the jail password function, and also add a reason for jail

EX: /jail [player id] SECS [Reason]

Is there anyway to make the seconds to minutes?

Is there a way to make it where if they combat log to avoid jail sentence they still have to finish the jail sentence when they come back?

is there any way i can remove the passcode so its just /jail [ID] [Time] /unjail [ID] [Time]

@albo1125 can you please include in an update the a utility to have combat logging turned on? Similar to the ambulancejob you can disable or enable combat logging.

The only thing this is missing is if someone decides to log out then they wouldn’t have to still finish their time. Yes I know there is a way to do it via adding a code but I’m new to this, itll be nice if you can just make it when the next update since a lot have requested as well.

these are my lines of the jailer when i put in my coords for a prison ymap i spawn there but it says "JUDGE: your jail time was extended for an unlawful escape

		local playerOldLoc = GetEntityCoords(pP, true)
		SetEntityCoords(pP, 1687.7401123047, 2518.5849609375, -120.84125518799, 90)
		cJ = true
		eJE = false
		while jT > 0 and not eJE do
			pP = GetPlayerPed(-1)
			RemoveAllPedWeapons(pP, true)
			SetEntityInvincible(pP, true)
			if IsPedInAnyVehicle(pP, false) then
			if jT % 30 == 0 then
				TriggerEvent('chatMessage', 'SYSTEM', { 0, 0, 0 }, jT .." more seconds until release.")
			local pL = GetEntityCoords(pP, true)
			local D = Vdist(1687.7401123047, 2518.5849609375, -120.84125518799, 90, pL['x'], pL['y'], pL['z'])
			if D > 90 then
				SetEntityCoords(pP, 1687.7401123047, 2518.5849609375, -120.84125518799, 90)
				if D > 100 then
					jT = jT + 60
					if jT > 1500 then
						jT = 1500
					TriggerEvent('chatMessage', 'JUDGE', { 1687.7401123047, 2518.5849609375, -120.84125518799, 90 }, "Your Jail Time Was Extended For Escaping Please Do Not Leave The Game then rejoin  You May Get Kicked.")
			jT = jT - 0.5
		TriggerServerEvent('chatMessageEntered', "SYSTEM", { 1687.7401123047, 2518.5849609375, -120.84125518799, 90 }, GetPlayerName(PlayerId()) .." Has Been Released For Jail Dont Act Stupid Again Idiot.")
		SetEntityCoords(pP, 1855.807, 2601.949, 45.323)
		cJ = false
		SetEntityInvincible(pP, false)


AddEventHandler(“UnJP”, function()
eJE = true
–Coded by Albo1125

Maybe a cool update would be where it would change your ped to an inmate and when you leave prison it will turn back to what it was before you got jailed

i have a suggestion for u, instead of using a password it s better if u use permissions

Hey, how can I add people to the script so they can jail?