All client exports and events that script provides for developers.
Jail
Jail target user, only if the initiator of this export is Police officer.
Side: client
Type: export
Usage:
1. Jailing a player if we got closest player.Logic path: rcore_prison/modules/api/client/cl-jailPlayer.lua - JailPlayerCustomlocal playerId = MyServerIdlocal jailTime =5-- Jail for 5 minutesexports.rcore_prison:Jail(playerId, jailTime)2. Jailing a player if we dont have closest player, handled by rcore_prisonLogic path: rcore_prison/modules/api/client/cl-jailPlayer.lua - JailClosestPlayer-- If you dont have any closest player, you can use this event to jail the closest player to you.exports.rcore_prison:Jail()
Unjail
Unjail target user, only if the initiator of this export is Police officer.
Side: client
Type: export
Usage:
1. Unjailing a player if we got closest player.Logic path: rcore_prison/modules/api/client/cl-unjailPlayer.lua - UnjailClosestPlayerlocal playerId = MyServerIdexports.rcore_prison:Unjail(playerId)2. Jailing a player if we dont have closest player, handled by rcore_prisonLogic path: rcore_prison/modules/api/client/cl-unjailPlayer.lua - UnjailPlayerCustom-- If you dont have any closest player, you can use this event to jail the closest player to you.exports.rcore_prison:Unjail()
IsPrisoner
Returns true/false if player is prisoner
Side: client
Type: export
Usage:
local state = exports.rcore_prison:IsPrisoner()if state thenprint('User is in prison.')elseprint('User is not prisoner.)end
GetPrisonerData
Returns table of cached user prisoner data, if he is prisoner