jailIn
exports['RiP-Prison']:jailIn(source, cell, time, reason, cb)
This function puts a player into jail
Arguments
Name | Type | Optional | Explenation |
---|---|---|---|
source | Integer | No | Player's source |
cell | Integer/String | Yes | Cell id or 'yard' |
time | Integer | Yes | Player's jail time |
reason | String | Yes | Reason for jail time |
cb | Function | Yes | Callback 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)