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
TriggerEvent("pNotify:SendNotification", {text =_U('invalid_amount'),type = "warning",queue = "duty", theme = "metroui", timeout = 2500,layout = "topRight" })
else
TriggerServerEvent("esx_jail:sendToJail", player, jailTime * 60)
menu.close()
end
end,
function (data2, menu)
menu.close()
end
)
end