rcore.cz
  • rcore.cz
  • Store
  • Discord
  • Web administration
  • Our store
  • YouTube
  • 🐌CFX Auth system
    • CFX Auth system
    • Transfer script to another account
    • Error: You lack the required entitlement
    • Error: syntax error near '<\1>'
  • Server
    • Updating server
    • onesync
  • Administration
    • How to change IP
    • Forgot your password?
  • FAQ
    • General issues
    • Cannot verify license
    • Cannot hear any music
    • ECONNRESET: Unable to execute a query
  • paid resources
    • 🏑rcore_airhockey
      • How To Play
      • Spawning a Hockey Table
    • 💪rcore_armwrestling
      • How to place arm table
    • 🎴rcore_banners
      • How to Begin
      • How to Update
      • Common issues & solutions
      • Installation
      • Inventory Items
      • Configs
        • General
        • Billboards
        • Business
        • Permissions
        • Job
        • Config
      • Guides
        • How to change UI logo?
        • How to create new server banner?
        • How to create business?
        • How to buy billboard?
        • How to place banner?
        • Cannot see banners?
        • Expired images
      • API
    • 🏀rcore_basketball
      • Configure new hoop
    • 🏓rcore_beerpong
      • How to use
    • 📹rcore_bodycam
      • Integration
      • Anticheat
      • Recordings don't save
    • 🎳rcore_bowling
      • Configure new alley
    • 🎥rcore_cam
      • Integration
      • Anticheat
    • ⛺rcore_camping
      • Installation
      • Config
      • Consumable Beer
      • OX Inventory
      • Frameworks
      • API
    • 🎪rcore_carnival
      • Create new minigame
    • 🃏rcore_casino
      • Installing Maps
        • UncleJust Casino
        • DlcIplLoader
        • Gabz Casino
        • NoPixel Casino
        • K4MB1 Casino
        • rcore_casino_interior
        • Underground Casino Paleto
        • K4MB1 Enterable Diamond Casino
        • Patoche Casino
        • Clawles: Casino Los Santos
        • Molo Casino
        • Jurassic Jackpot Casino
      • Standalone Version
      • Custom Framework
      • Installing on QBCore
      • Installing on ESX
      • Installing Inventory Items
      • The Cashier
      • Society
      • Lucky Wheel & Podium Vehicle
      • Table Games
      • Slot Machines
      • Casino Bar
      • Inside Track
      • Translations
      • Discord Hook
      • MYSQL Info
      • CasinoControl (Exports)
      • Casino Job & Office
      • Changing Odds
    • 👕rcore_clothes
      • Dark theme
      • Adding a new clothes shop
      • Components
      • Restriction for certian job
      • Custom clothes price
      • Clothes blacklist / Whitelist
      • esx_accessories
      • qb_apartments
      • cui_character
      • API: Open outfits
      • API: Open clothes shop
    • 🎽rcore_clothing 🆕
      • How to begin
      • Installation
      • Migration
      • Configs
        • Main config
        • Price config
        • Shop config
        • Peds config
        • Undress clothes
      • FAQ
      • Admin mode
        • Modes
        • Image debugging
        • Stock management
      • Adding replace/addon clothes
      • Categorize clothing automatically
      • API
      • Troubleshooting
      • Integration
        • Multichar integration guide
        • esx_multicharacter
        • esx_multicharacter OLD
        • qb-multicharacter
        • crm_multichar
        • codem_multichar
        • okok_multichar
        • qbox_multichar
        • ESX vms_multichar
        • QB vms_multichar
        • qs-multicharacter
        • um_multichar
        • wais_multicharacter v2
        • zr_multichar
        • zsx_multicharacter
    • 💃rcore_dance
      • Installation
      • Config
      • FAQ
      • Troubleshooting
      • API
    • 📱rcore_dispatch
      • Config
      • Add alerts
      • Add jobs
      • Locales
      • Logs
      • Integrations
      • Framework
      • Voice and radio
    • 🔒rcore_doorlock
      • Installation
      • Configuration
      • Migration
      • Business
        • Configuration
        • Locksmith Example
      • Inventory Items
      • Keychain
      • API
    • 🍺rcore_drunk
      • How to place drink on table
      • Create new item drink
      • ox inventory
      • API
      • How to use
    • 🥚rcore_easter
      • Installation
      • Configuration
      • API
    • ⛽rcore_fuel
      • Installation
        • ESX
        • QBCore
      • Inventory
        • ESX
        • QBCore
        • ox_inventory
      • Config
        • New fuel station
        • Change fuel type for vehicle
        • Change fuel capacity for vehicle
        • Setting fuel station to be ownable
        • Wrong fuel type
        • Change gas price
      • Integrations
        • API
        • Vehicle keys integrations
        • Hud/Garage integration
      • Server
        • Commands
    • 🔫rcore_gangs
      • API
        • Client
        • Server
      • Integration
        • Framework
        • Inventory
        • Dispatch
      • Localization
      • Configuration
        • Custom gang zone
    • 🚙rcore_garage
      • qb-phone missing garages name
      • missing screenshots
    • 📙rcore_guidebook
      • Installation
      • Config
      • Data permissions
      • API
      • Themes
      • 📙V1 Docs
        • Installation
        • API
        • Themes
    • 🔫rcore_gunshop
      • QBCore Installation
      • ESX Installation
      • How to change pricing
      • How to enable sales of weapons
      • Enabling MK2 weapons on QBCore
      • Adding the ammunation job for QBCore
      • Adding the ammunation job for ESX
    • 🎯rcore_gunrange
      • Installation
      • API
      • Troubleshooting
      • Frequently Asked Questions
      • Gun Range Editor
    • 🏨rcore_hotel
      • How to add another hotel example
      • esx_inventoryhud
      • Quasar inventory
      • OX inventory
      • MF inventory
      • Custom wardrobe
    • 🧑rcore_identity
      • How to change date format
      • esx_kasharacter
    • 🟠rcore_job_blips
      • Installation
      • Configuration
      • Blip Setup
      • Group Setup
      • API
    • ⛳rcore_minigolf
      • Builder
      • Company
      • Config
    • 🚛rcore_missionpack_legal
      • Migrate from old version
    • 🚗rcore_pdm
      • Missing images
      • Blips on minimap
      • Vehicles in stock
      • Missing vehicle names
      • Edit the speed of the vehicle in UI
      • Boss menu + locations
      • Displayed vehicle in the shop
      • How to add a vehicle with a new category
      • QBCore
        • Import missing vehicles from qbcore to rcore_pdm
        • Job data for QBCore framework
        • Import vehicles from database to qbcore
    • 🏓rcore_pingpong
      • How To Play
      • Spawning a Pong Table
      • Match Settings
    • 🤽‍♀️rcore_pool
      • Anticheat
      • How to place pool table
    • 👮rcore_police
      • Installation
      • How to Update
      • Features
      • Inventory
      • Deployer
      • Configs
        • Main Config
      • API
        • Client
        • Server
    • ⛓️rcore_prison
      • Migration from V1
      • How to Begin
      • How to Update
      • Installation
      • Inventory items
      • Configs
        • Main Config
      • Guides
        • Deployer
        • Changing minigame for Cigarette packaging
        • Changing Prison jobs reward
        • Configuring Permissions
        • How to translate in-game panel
        • How to define own stats for Prison GYM?
        • How to define/change default Prisoner outfits?
        • How to define own Prison map?
      • Features
        • Prison Break
        • Solitary
        • Cigar packaging
        • Canteen
        • Dealer
        • Dashboard
        • Chair system
        • Prison Prolog
      • Integrations
        • Inventory
        • Inventory items
      • API
        • Client
        • Server
      • ⛓️V1 Docs
        • Config
        • Inventory
        • API
          • Client
          • Server
        • Locales system
        • Interiors presets
        • Camera prolog
        • Outfits
    • 📻rcore_radiocar
      • API
        • Radio item
        • Marker for buying radio
    • 📋rcore_report
      • Installation
      • API
      • Ace Permissions
      • Config
      • UI Config
      • Features
      • Console Logs
      • Custom Data
      • Responsivity
    • 🏪rcore_shops
      • Add new shop
      • How to add weapon
      • Hide blip on minimap / map
      • Restrict shop to certain job
    • 🔠rcore_shortcuts
      • API
      • Commands and Hotkeys
      • Permissions
      • Notifications
      • Limits
      • Styles
    • ✨rcore_spray
      • ESX instalation
      • QBCore instalation
      • OX Inventory instalation
      • How to add a new image
      • How to add a new font
      • Gang integration
      • Anticheat
    • 📈rcore_stats
      • Installation
      • Permissions
      • Configs
        • Main config
        • Performance
        • Units
        • Other
      • Translation
      • Changing Default Values
      • API
        • Integration
        • Delete
        • Other
    • 👹rcore_tattoos
      • Installation
      • Migrations
      • Add-on tattoos
      • Config
      • Custom Framework
      • Design
      • Tattoo config options
      • Tattoo permissions
      • Troubleshooting
      • API
      • Integrations
        • qb-gangs
      • Business update
        • Config
        • Simple Business
        • Business with jobs
        • Default settings
    • 📺rcore_television
      • How to add a new television
    • 🔧rcore_tuning
      • Editing your config
      • Configuring your framework
      • Job integration
      • Item integration
      • Editing tuning prices
    • 📋rcore_whiteboard
      • Whiteboard type & data
      • Position editor
      • API
      • FAQ
    • 🎁rcore_xmas
      • Installation
      • Configuration
      • Inventory Items
      • Snowball Damage
      • API
    • 📻xradio
      • API
      • Custom menu
      • Ox inventory
  • free resources
    • rcore_arcade
      • How to add msdos games
Powered by GitBook
On this page
  • Events (General)
  • SetBodyCamState
  • Exports (Listeners)
  • onGroups
  • onState
  • Exports (States)
  • IsPlayerCuffed
  • IsPlayerEscorted
  • IsPlayerHeadBagged
  • Exports (Actions)
  • JailPlayer
  • SearchPlayer
  • Escort
  • Zipties
  • Handcuff
  • PutPlayerInVehicle
  • TakePlayerFromVehicle
  • RemoveHandcuff
  • ForceUncuff
  • Exports (General)
  • GetPoliceOnline

Was this helpful?

  1. paid resources
  2. rcore_police
  3. API

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:

    Name
    Type
    Description

    playerId

    number

    Target playerId which you want to set permission

    state

    boolean

    Used 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:

    Name
    Type
    Description

    listenerName

    string

    Name of the listener to register for onGroups events

  • Returns:

    • string: Type - current action/task being done

    • table: 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:

    Name
    Type
    Description

    listenerName

    string

    Name 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:

-- return: type: string, action: string, playerId: number
exports["rcore_police"]:registerListener("onGroups", function(type, action, playerId)
    print("Received 'onState' event:")
    print("Type:", type)
    print("Action:", action)
    print("Player ID:", playerId)
end)

Exports (States)

IsPlayerCuffed

  • Used for checking if player is cuffed

IsPlayerCuffed
  • Type: boolean

  • Default value:: false

  • Params:

    Name
    Type
    Description

    playerId

    number

    ID of player which you want to get state of cuffed

  • Returns:

    • boolean: true if player is cuffed, otherwise false.

  • Example:

-- playerId: number
-- return: boolean
local isCuffed = exports['rcore_police']:IsPlayerCuffed(playerId)

if isCuffed then
    print('Player is cuffed')
else
    print('Player is not cuffed')
end

IsPlayerEscorted

  • Used for checking if player is escorted

IsPlayerEscorted
  • Type: boolean

  • Default value:: false

  • Params:

    Name
    Type
    Description

    playerId

    number

    ID of player which you want to get state of escort

  • Returns:

    • boolean: true if player is escorted, otherwise false.

  • Example:

-- playerId: number
-- return: boolean
local isEscorted = exports['rcore_police']:IsPlayerEscorted(playerId)

if isEscorted then
    print('Player is escorted')
else
    print('Player is not escorted')
end

IsPlayerHeadBagged

  • Used for checking if player is head bagged

IsPlayerHeadBagged
  • Type: boolean

  • Default value:: false

  • Params:

    Name
    Type
    Description

    playerId

    number

    ID of player which you want to get state of head bag

  • Returns:

    • boolean: true if player is head bagged, otherwise false.

  • Example:

-- playerId: number
-- return: boolean
local isHeadBagged = exports['rcore_police']:IsPlayerHeadBagged(playerId)

if isHeadBagged  then
    print('Player is head bagged')
else
    print('Player is not head bagged')
end

Exports (Actions)

JailPlayer

  • Used for jailing player, it will open Dialog form to put specific player in jail

JailPlayer
  • Type: boolean

  • Default value:: false

  • Params:

    Name
    Type
    Description

    playerId

    number

    ID of player which is starting the interaction

    target

    number

    ID of player which you want to get jailed

  • Returns:

    • boolean: true if player is jailed, otherwise false.

    • string: Status code or error message

  • Example:

-- playerId: number
-- target: number
-- return: boolean, string
local isJailed, statusOrErr = exports['rcore_police']:JailPlayer(playerId, target)

if isJailed then
    print('Player is jailed')
else
    print('Player is not jailed an error occurred:', statusOrErr)
end

SearchPlayer

  • Used for searching player, it will try to open search of target player inventory

SearchPlayer
  • Type: boolean

  • Default value:: false

  • Params:

    Name
    Type
    Description

    playerId

    number

    ID of player which is starting the interaction

    target

    number

    ID of player which you want to search inventory

  • Returns:

    • boolean: true if player is searched, otherwise false.

    • string: Status code or error message

  • Example:

-- playerId: number
-- target: number
-- return: boolean, string
local isSearched, statusOrErr = exports['rcore_police']:SearchPlayer(playerId, target)

if isSearched then
    print('Player is searched')
else
    print('Player is not searched an error occurred:', statusOrErr)
end

Escort

  • Used for setting/unsetting escort to target player

Escort
  • Type: boolean

  • Default value:: false

  • Params:

    Name
    Type
    Description

    playerId

    number

    ID of player which is starting the interaction

    target

    number

    ID of player which you want to get escorted

  • Returns:

    • boolean: true if player is escorted, otherwise false.

    • string: Status code or error message

  • Example:

-- playerId: number
-- target: number
-- return: boolean, string
local isEscorted, statusOrErr = exports['rcore_police']:Escort(playerId, target)

if isEscorted then
    print('Player is escorted')
else
    print('Player is not escorted')
end

Zipties

  • Used for setting/unsetting Zipties to target player

Zipties
  • Type: boolean

  • Default value:: false

  • Params:

    Name
    Type
    Description

    playerId

    number

    ID of player which is starting the interaction

    target

    number

    ID of player which you want to set zipties

  • Returns:

    • boolean: true if player is ziptied, otherwise false.

    • string: Status code or error message

  • Example:

-- playerId: number
-- target: number
-- return: boolean, string
local isZiptied, statusOrErr = exports['rcore_police']:Zipties(playerId, target)

if isZiptied then
    print('Player is ziptied')
else
    print('Player is not ziptied')
end

Handcuff

  • Used for setting/unsetting Handcuff to target player

Handcuff
  • Type: boolean

  • Default value:: false

  • Params:

    Name
    Type
    Description

    playerId

    number

    ID of player which is starting the interaction

    target

    number

    ID of player which you want to set handcuffs

  • Returns:

    • boolean: true if player is handcuffs, otherwise false.

    • string: Status code or error message

  • Example:

-- playerId: number
-- target: number
-- return: boolean, string
local isCuffed, statusOrErr = exports['rcore_police']:Handcuff(playerId, target)

if isCuffed then
    print('Player is handcuffed')
else
    print('Player is not handcuffed')
end

PutPlayerInVehicle

  • Used for PutPlayerInVehicle target player into nearby vehicle seat

PutPlayerInVehicle
  • Type: boolean

  • Default value:: false

  • Params:

    Name
    Type
    Description

    playerId

    number

    ID of player which is starting the interaction

    target

    number

    ID of player which you want to set into vehicle

  • Returns:

    • boolean: true if player is set into vehicle, otherwise false.

    • string: Status code or error message

  • Example:

-- playerId: number
-- target: number
-- return: boolean, string
local isInVehicle, statusOrErr = exports['rcore_police']:PutPlayerInVehicle(playerId, target)

if isInVehicle then
    print('Player is in vehicle')
else
    print('Player is not in vehicle')
end

TakePlayerFromVehicle

  • Used for TakePlayerFromVehicle target player from nearby vehicle

TakePlayerFromVehicle
  • Type: boolean

  • Default value:: false

  • Params:

    Name
    Type
    Description

    playerId

    number

    ID of player which is starting the interaction

    target

    number

    ID of player which you want to get from vehicle

  • Returns:

    • boolean: true if player is outside of vehicle, otherwise false.

    • string: Status code or error message

  • Example:

-- playerId: number
-- target: number
-- return: boolean, string
local isFromVehicle, statusOrErr = exports['rcore_police']:TakePlayerFromVehicle(playerId, target)

if isFromVehicle then
    print('Player is not in vehicle')
else
    print('Player is in vehicle')
end

RemoveHandcuff

  • Used for removing handcuffs/zipties from target player

RemoveHandcuff
  • Type: boolean

  • Default value:: false

  • Params:

    Name
    Type
    Description

    playerId

    number

    ID of player which is starting the interaction

    target

    number

    ID of player which you want to remove handcuffs/zipties

  • Returns:

    • boolean: true if player handcuffs/zipties are removed, otherwise false.

    • string: Status code or error message

  • Example:

-- playerId: number
-- target: number
-- return: boolean, string
local isRemovedCuffs, statusOrErr = exports['rcore_police']:RemoveHandcuff(playerId, target)

if isRemovedCuffs then
    print('Player is free')
else
    print('Player not free')
end

ForceUncuff

  • Used for removing zipties/cuffs

ForceUncuff
  • Type: boolean

  • Default value:: false

  • Params:

    Name
    Type
    Description

    target

    number

    ID of player which you want to remove handcuffs/zipties

  • Returns:

    • boolean: true if player handcuffs/zipties are removed, otherwise false.

    • string: Status code or error message

  • Example:

-- target: number
-- return: boolean, string
local isRemovedCuffs, statusOrErr = exports['rcore_police']:ForceUncuff(target)

if isRemovedCuffs then
    print('Player is free')
else
    print('Player not free')
end

Exports (General)

GetPoliceOnline

  • Used for getting all police officers online

GetPoliceOnline
  • Type: number

  • Default value:: 0

  • Returns:

    • number: Number of officers online, by default returns 0 when not any online

  • Example:

-- return: number
local policeOnline = exports['rcore_police']:GetPoliceOnline()

if policeOnline then
    print('Online units: ', retval)
end
PreviousClientNextrcore_prison

Last updated 2 months ago

Was this helpful?

👮