πInstallation & Usage
Installation
- Open the provided SQL and find the framework you are using, copy the correct SQL string. 
- Add the SQL to your database 
- Add the cleaning supplies item to your inventory 
Usage
Entering & Exiting Prison
When entering or exiting prison, trigger the following exports.
-- Entering
exports['xt-prisonjobs']:InitPrisonJob()
-- Creates a new location for your prison job, if you have one
-- Exiting
exports['xt-prisonjobs']:CleanupPrisonJob()
-- Removes job related points, blips, etcServer Config Functions
Initialize Jail Time
This function is only used if you're not using xt-prison. Use case is returning the playerdata that your prison resource uses. On load, it will set that metadata to the playerstate that is used in xt-prisonjobs. Reducing time properly is handled with the other functions.
This example is in the case of using QBCore. The function passes the player object by default
initJailTime = function(player)
    return player.PlayerData.metadata.injail
end,Reduce Time
This function is triggered to reduce your jail time. You should trigger events/functions for setting a new jail time for your prison resource.
reduceTime = function(source, setTime)
    return exports['xt-prison']:SetJailTime(source, setTime)
end,Check Out
This function is triggered when a player presses the Check Out button in the menu. This should trigger events/functions to release a player from prison.
checkOut = function(source)
    return lib.callback.await('xt-prison:client:exitJail', source, true)
endLast updated
