Server
This page lists all the available server-side events and exports.
Events (General)
SetBodyCamState
Registers a server-side event to manually control a player's bodycam state, typically used in scenarios such as temporary permission overrides or anti-cheat bypasses.
rcore_police:server:SetBodyCamState
Params:
NameTypeDescriptionplayerIdnumberTarget playerId which you want to set permission
statebooleanUsed for listening for player state.
Example:
AddEventHandler('rcore_police:server:SetBodyCamState', function(playerId, state)
-- REGISTER PLAYER TEMP PERMISSION
end)Exports (Listeners)
onGroups
Used for listening for any onGroups actions
onGroups
Params:
NameTypeDescriptionlistenerNamestringName of the listener to register for onGroups events
Returns:
string: Type - current action/task being donetable: The data of player in that group
Example:
-- return: type: string, data: table
exports["rcore_police"]:registerListener("onGroups", function(type, data)
print("Received 'onGroups' event:")
print("Type:", type)
print("Data:", json.encode(data))
end)onState
Used for listening for any interaction actions on players
onState
Params:
NameTypeDescriptionlistenerNamestringName of the listener to register for onState events
Returns:
type: Current type (string)action: Current action (string)playerId: Performed state change on playerId (number)
Example:
Exports (States)
IsPlayerCuffed
Used for checking if player is cuffed
IsPlayerCuffed
Type:
booleanDefault value::
falseParams:
NameTypeDescriptionplayerIdnumberID of player which you want to get state of cuffed
Returns:
boolean:trueif player is cuffed, otherwisefalse.
Example:
IsPlayerEscorted
Used for checking if player is escorted
IsPlayerEscorted
Type:
booleanDefault value::
falseParams:
NameTypeDescriptionplayerIdnumberID of player which you want to get state of escort
Returns:
boolean:trueif player is escorted, otherwisefalse.
Example:
IsPlayerHeadBagged
Used for checking if player is head bagged
IsPlayerHeadBagged
Type:
booleanDefault value::
falseParams:
NameTypeDescriptionplayerIdnumberID of player which you want to get state of head bag
Returns:
boolean:trueif player is head bagged, otherwisefalse.
Example:
Exports (Actions)
JailPlayer
Used for jailing player, it will open Dialog form to put specific player in jail
JailPlayer
Type:
booleanDefault value::
falseParams:
NameTypeDescriptionplayerIdnumberID of player which is starting the interaction
targetnumberID of player which you want to get jailed
Returns:
boolean:trueif player is jailed, otherwisefalse.string: Status code or error message
Example:
SearchPlayer
Used for searching player, it will try to open search of target player inventory
SearchPlayer
Type:
booleanDefault value::
falseParams:
NameTypeDescriptionplayerIdnumberID of player which is starting the interaction
targetnumberID of player which you want to search inventory
Returns:
boolean:trueif player is searched, otherwisefalse.string: Status code or error message
Example:
Escort
Used for setting/unsetting escort to target player
Escort
Type:
booleanDefault value::
falseParams:
NameTypeDescriptionplayerIdnumberID of player which is starting the interaction
targetnumberID of player which you want to get escorted
Returns:
boolean:trueif player is escorted, otherwisefalse.string: Status code or error message
Example:
Zipties
Used for setting/unsetting Zipties to target player
Zipties
Type:
booleanDefault value::
falseParams:
NameTypeDescriptionplayerIdnumberID of player which is starting the interaction
targetnumberID of player which you want to set zipties
Returns:
boolean:trueif player is ziptied, otherwisefalse.string: Status code or error message
Example:
Handcuff
Used for setting/unsetting Handcuff to target player
Handcuff
Type:
booleanDefault value::
falseParams:
NameTypeDescriptionplayerIdnumberID of player which is starting the interaction
targetnumberID of player which you want to set handcuffs
Returns:
boolean:trueif player is handcuffs, otherwisefalse.string: Status code or error message
Example:
PutPlayerInVehicle
Used for PutPlayerInVehicle target player into nearby vehicle seat
PutPlayerInVehicle
Type:
booleanDefault value::
falseParams:
NameTypeDescriptionplayerIdnumberID of player which is starting the interaction
targetnumberID of player which you want to set into vehicle
Returns:
boolean:trueif player is set into vehicle, otherwisefalse.string: Status code or error message
Example:
TakePlayerFromVehicle
Used for TakePlayerFromVehicle target player from nearby vehicle
TakePlayerFromVehicle
Type:
booleanDefault value::
falseParams:
NameTypeDescriptionplayerIdnumberID of player which is starting the interaction
targetnumberID of player which you want to get from vehicle
Returns:
boolean:trueif player is outside of vehicle, otherwisefalse.string: Status code or error message
Example:
RemoveHandcuff
Used for removing handcuffs/zipties from target player
RemoveHandcuff
Type:
booleanDefault value::
falseParams:
NameTypeDescriptionplayerIdnumberID of player which is starting the interaction
targetnumberID of player which you want to remove handcuffs/zipties
Returns:
boolean:trueif player handcuffs/zipties are removed, otherwisefalse.string: Status code or error message
Example:
ForceUncuff
Used for removing zipties/cuffs
ForceUncuff
Type:
booleanDefault value::
falseParams:
NameTypeDescriptiontargetnumberID of player which you want to remove handcuffs/zipties
Returns:
boolean:trueif player handcuffs/zipties are removed, otherwisefalse.string: Status code or error message
Example:
Exports (General)
GetPoliceOnline
Used for getting all police officers online
GetPoliceOnline
Type:
numberDefault value::
0Returns:
number: Number of officers online, by default returns 0 when not any online
Example:
CreateInvoiceByServer
⚠️ Warning: This export is not a replacement for your invoice system. It is a hook over the rcore_police invoice system when using the standalone bridge or a supported invoice system.
ℹ️ Configuration: The distribution of invoice payments depends on the
InvoiceSystem.WhenInvoiceSentBalanceToAllDepartmentJobssetting in your config:
true: The invoice amount will be split equally among all department society accounts
false: Only the issuing job's society account receives the money
Used for creating an invoice for a player directly from the server-side (e.g., for automated billing systems, admin commands, or integration with other resources)
CreateInvoiceByServer
Params:
NameTypeDescriptiontargetIdnumberPlayer ID of the user who should receive the invoice
amountnumberThe amount the player should pay
metadatatableAdditional data containing
jobandreasonMetadata Table:
NameTypeDescriptionjobstring?The job/department issuing the invoice (e.g., "police", "taxi"). Must be a valid department group defined in your configuration with an existing society account. If not provided, all department groups are used or defaults to
"police"reasonstringThe reason for the invoice
Returns:
boolean:trueif the invoice was created successfully, otherwisefalse
Example:
Last updated