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
| Name | Type | Description |
|---|---|---|
level | number | The 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
| Name | Type | Description |
|---|---|---|
typeName | string | Unique identifier for the evidence type. |
data | table | Configuration 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
| Name | Type | Description |
|---|---|---|
machineType | string | The machine identifier (e.g. Centrifuge). |
data | table | Target 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
| Name | Type | Description |
|---|---|---|
state | boolean | true 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
| Name | Type | Description |
|---|---|---|
evidenceType | string | The type of evidence to drop (must exist in registry). |
data | table | Optional 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
| Name | Type | Description |
|---|---|---|
evidenceType | string | The type of evidence to drop. |
coords | vector3 | The world coordinates where the evidence should spawn. |
data | table | Optional 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
| Name | Type | Description |
|---|---|---|
state | boolean | true 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.