Events/Exports
Jail Check Exports
Used To Check if Currently in Jail
local inJail = exports['SickJail']:GetJailTime()
if inJail then
print('You are in jail')
else
print('Yay you are NOT in Jail!')
end
All Exports are Client Side only!
Send To Jail Export/Event
Export
exports('SendPlayerToJail',SendPlayerToJail)
Example Usage
local player = GetPlayerServerId(CLOSEST_PLAYER)
local time = 5 -- Amount of time for jail
local reason = String -- optional (Defaults to 'MDT Sentence') Mainly for webhooks
exports.SickJail:SendPlayerToJail(player,time,reason or nil)
Good for usage in MDTs and other scripts!
Event
The Event Usage isn't as recommended but can be used as well. Its the same usage for Client side as the export (Meaning it accepts the same Arguments) but triggers the Server event instead of the Export.
TriggerServerEvent("SickJail:jailPlayer", player, jailTime, reason)
Example Usage
local player = GetPlayerServerId(CLOSEST_PLAYER)
local time = 5 -- Amount of time for jail
local reason = String -- optional (Defaults to 'MDT Sentence') Mainly for webhooks
TriggerServerEvent("SickJail:jailPlayer", player, jailTime, reason)
Last updated