Kartik Scripts

Client Exports

These exports are available on the client-side to interact with the forensic system and player states.

AddBacLevel

exports['kartik-evidence']:AddBacLevel(level)

๐Ÿ”น Description

Adds a discrete amount of alcohol to the player's system. This level will automatically decay over time.

๐Ÿ”ง Parameters

NameTypeDescription
levelnumberThe amount to add (e.g. 0.05).

RemoveBacLevel

exports['kartik-evidence']:RemoveBacLevel()

๐Ÿ”น Description

Manually removes the oldest active alcohol entry from the player's system.


UseBreathalyzer

exports['kartik-evidence']:UseBreathalyzer()

๐Ÿ”น Description

Triggers the breathalyzer interaction. Performs proximity checks, plays animations, and displays the result notification.


RegisterEvidenceType

exports['kartik-evidence']:RegisterEvidenceType(typeName, data)

๐Ÿ”น Description

Registers a new type of evidence that can be spawned and collected. Useful for creating expansion modules.

๐Ÿ”ง Parameters

NameTypeDescription
typeNamestringUnique identifier for the evidence type.
datatableConfiguration table (Label, Collection logic, Visuals).

RegisterMachineOption

exports['kartik-evidence']:RegisterMachineOption(machineType, data)

๐Ÿ”น Description

Adds a processing option to a specific forensic lab machine (Centrifuge, AFIS, etc.).

๐Ÿ”ง Parameters

NameTypeDescription
machineTypestringThe machine identifier (e.g. Centrifuge).
datatableTarget item and progress information.

OpenTablet

exports['kartik-evidence']:OpenTablet()

๐Ÿ”น Description

Opens the Forensic Tablet UI. Automatically checks for Evidence.isAuthorized before opening.


IsPedWearingGloves

local isWearing = exports['kartik-evidence']:IsPedWearingGloves()

๐Ÿ”น Description

Checks if the local player is currently wearing gloves based on their drawable variation and the configuration in shared/config.lua.

๐Ÿ“ฆ Returns

Returns true if wearing gloves, false otherwise.


SetEvidenceTracking

exports['kartik-evidence']:SetEvidenceTracking(state)

๐Ÿ”น Description

Enables or disables the automatic evidence drop system (blood, casings, fingerprints, etc.) for the local player.

๐Ÿ”ง Parameters

NameTypeDescription
statebooleantrue to enable tracking, false to disable.

IsEvidenceTrackingEnabled

local isEnabled = exports['kartik-evidence']:IsEvidenceTrackingEnabled()

๐Ÿ”น Description

Checks if the forensic evidence tracking system is currently active for the local player.

๐Ÿ“ฆ Returns

Returns true if enabled, false otherwise.


DropEvidence

exports['kartik-evidence']:DropEvidence(evidenceType, data)

๐Ÿ”น Description

Smartly drops evidence based on player context. If the player is in a vehicle, it binds to the vehicle seat or body. If on foot, it drops at the ground level at the player's feet.

๐Ÿ”ง Parameters

NameTypeDescription
evidenceTypestringThe type of evidence to drop (must exist in registry).
datatableOptional metadata to attach to the evidence.

DropEvidenceAtCoords

exports['kartik-evidence']:DropEvidenceAtCoords(evidenceType, coords, data)

๐Ÿ”น Description

Drops a specific piece of collectable evidence at the provided world coordinates.

๐Ÿ”ง Parameters

NameTypeDescription
evidenceTypestringThe type of evidence to drop.
coordsvector3The world coordinates where the evidence should spawn.
datatableOptional metadata to attach to the evidence.

ClearGSR

exports['kartik-evidence']:ClearGSR()

๐Ÿ”น Description

Clears Gunshot Residue (GSR) for the local player.


SetResidueStatus

exports['kartik-evidence']:SetResidueStatus(state)

๐Ÿ”น Description

Sets the Gunshot Residue (GSR) state for the local player.

๐Ÿ”ง Parameters

NameTypeDescription
statebooleantrue to apply GSR, false to clear it.

Client Events

kartik-evidence:client:refreshRadial

TriggerEvent('kartik-evidence:client:refreshRadial')

๐Ÿ”น Description

Puts the evidence radial items (Evidence Props and Cleanup Nearby) back in the ox_lib radial menu. Only authorized jobs get them.

The script already does this on its own: when the player gets in or out of a vehicle, when ox_lib restarts and every 10 seconds (skipped while a menu or UI has focus). So the items come back by themselves if another script clears the radial menu. Use this event if your own script rebuilds the radial menu and you want the items back straight away.

You can add your own radial items in bridge/radial/client/ox_radial.lua (radialItems list). They are kept in the menu the same way.

On this page