[Release] IRL jail time jailer - esx_jb_realtimejailer

for me it was obvious … :stuck_out_tongue:

1 Like

It works Im trying to add a another box to prompt with stating “Reason” then I can fill that out and it will trigger what is in the string, At the moment, I can not get it to do that if possible can someone point me in the right direction on how to go about it? I see

      maxLength = 1600
      AddTextEntry('FMMC_KEY_TIP8', "Number of Months in prison")
      DisplayOnscreenKeyboard(1, "FMMC_KEY_TIP8", "", "", "", "", "", maxLength)
      ESX.ShowNotification("~b~Enter the number of Months you want to put the person in jail.")
      blockinput = true

      while UpdateOnscreenKeyboard() ~= 1 and UpdateOnscreenKeyboard() ~= 2 do
        Citizen.Wait( 0 )
      end

      local jailtime = GetOnscreenKeyboardResult()

      UnblockMenuInput()

I kinda need help if anyone got time
Error: http://prntscr.com/kwsbh1
Code: http://prntscr.com/kwsbwv
I hope someone is able to help me, Thank you for reading this.

what you want to trigger ? like you write prison1 adn player goes to prison 1?

delete line 519 ! :stuck_out_tongue:

So you write the jail time then another box comes up for reasons then when you press enter it sends them to jail and also sends a serverwide message from “JUDGE” stating “Reason: (text)” that was put out

I “started fresh” and forgot to add the long code, Sorry

How to edit in time?

Would you help me?
When I choose which one to send the player the menu is capping the one of typing time
I typed 1 for test he did not send player to cell
Thank you if you can help
Very interresting feature I would use in RP

well did you look which version of policejob you had ? did you insert sql ? … i need more details if you want help

description ‘ESX Police Job’

version ‘1.2.0’

well yea you took jail from someone ele in database just add my sql and it will work, always insert what is given to yu, not already what you got

and in your client READ the fucking description, if you wont put any effort in doing so i wont put efforts in helping you

Sorry for taking your time

I did what was described in the description
I put the SQL
With the handcuffed player I choose which cell to send he informs the time
but he is not sent


No error appears on the console.

code optimalisation ! now pushed to github

1 Like

Takes a little looking to install, but if you read others comments like you should for installing things before just jumping the gun, then it installs easy. if you cant take the time to read others comments and see if your problem is similar to others you really shouldn’t be hosting a fivem server Thank you Great script!

1 Like

is there a way i could delete it from sql when a player is unjailed?

if you want to delete everything what is inside the table :
TRUNCATE tablename

or if you wan tto delete a table
DROP tablename

Hi,

Im using this script works like a charm but the teleport if you move can it be removed?
i have prison locked so they cant get out. but they have to stay in jail while relogging?

i know im suppose to change this code but what do i need to change it to?

RegisterServerEvent(“esx_jb_jailer:UnJailplayer”)
AddEventHandler(“esx_jb_jailer:UnJailplayer”, function(playerid)
local identifier = GetPlayerIdentifiers(playerid)[1]
if GetPlayerName(playerid) ~= nil then
TriggerClientEvent(“esx_jb_jailer:UnJail”, playerid)
MySQL.Async.execute(“INSERT INTO jail (identifier,J_Time, isjailed) VALUES (@Identifier,@J_Time,@isjailed) ON DUPLICATE KEY UPDATE Identifier=identifier,isjailed=@isjailed,J_Time=@J_Time”, {[’@identifier’] = identifier, [’@J_Time’] = os.date(’%Y-%m-%d %H:%M:%S’),[’@isjailed’] = false})
end
end)