Exports
These are the exports for the resource.
Server exports
Departments
GetDepartment(id)
Returns the department object for id.
local dept = exports.pickle_policejob:GetDepartment("lspd")
print(dept.label)GetDepartmentPermission(id, permission)
Returns the value of a named permission on a department.
local canArrest = exports.pickle_policejob:GetDepartmentPermission("lspd", "arrest")GetDepartmentMember(id, source)
Returns the department member record for a player.
local member = exports.pickle_policejob:GetDepartmentMember("lspd", source)
if member then print(member.rank) endGetDepartmentRank(id, rankId)
Returns the rank object for rankId within a department.
local rank = exports.pickle_policejob:GetDepartmentRank("lspd", "sergeant")GetDepartmentEntity(id, entityId)
Returns a stored entity (location/asset) for a department.
GetPlayerDepartment(source)
Returns the player's current department object.
GetPlayerDepartmentJob(source)
Returns the framework job tied to the player's department.
GetIdentifierDepartment(identifier)
Looks up a department by player identifier (offline-safe).
IsPlayerOnDuty(source)
Returns true if the player is on duty.
SetPlayerDuty(source, onDuty, report)
Sets duty state. Pass report = true to log to Discord.
IsPlayerDepartmentLeader(source)
Returns true if the player holds a leader rank.
DoesPlayerHaveEntityPermission(source, id, entityId, onDutyRequired)
Permission check against a department entity.
GetTotalCopsOnline()
Returns total on-duty officers across all departments.
Department money
AddDepartmentMoney(id, amount)
Adds funds to a department's balance.
RemoveDepartmentMoney(id, amount)
Removes funds from a department's balance.
GetDepartmentMoney(id)
Returns the department's current balance.
AddDepartmentTransaction(id, source, transactionType, amount, reason)
Records a transaction against a department.
Evidence / files
AddEvidence(coords, evidenceType, data)
Spawns an evidence record at the given coords.
CreateFile(source, file)
Creates a case file.
UpdateFile(source, id, file)
Updates an existing case file.
DeleteFile(source, id)
Deletes a case file.
Player forensics / medical
GetPlayerEvidence(source, isCreatingFile)
Returns aggregated evidence/identifiers for a player.
GetPlayerDNA(source)
Returns the player's DNA record.
GetPlayerBAC(source)
Returns the player's blood alcohol content.
GetPlayerBloodTest(source)
Returns the player's blood test result.
GetPlayerGSR(source)
Returns the player's gunshot residue result.
Client exports
Duty / department state
IsPlayerOnDuty()
Returns the local player's duty state.
GetCurrentDepartment()
Returns the local player's current department object (or nil).
GetLocalDepartments()
Returns the table of departments synced to this client.
Actions / handcuffs
IsHandcuffed()
Returns true if the local player is handcuffed.
UncuffPlayer()
Uncuffs the local player.
Last updated