Skip to main content

jailIn

exports['RiP-Prison']:jailIn(source, cell, time, reason, cb)

This function puts a player into jail

Arguments

NameTypeOptionalExplenation
sourceIntegerNoPlayer's source
cellInteger/StringYesCell id or 'yard'
timeIntegerYesPlayer's jail time
reasonStringYesReason for jail time
cbFunctionYesCallback function with boolean

Example

local xPlayer = ESX.GetPlayerFromSource(source)

exports['RiP-Prison']:jailIn(xPlayer.source, 'yard', 9, "Why not?", function(callback)
if not callback then
print("player couldn't be imprisoned")
end
end)