Configuration Guide

Laser System Usage

Config File Location

The main configuration file is located at: shared/config.lua

Configuration Options

Framework Selection

-- Core framework selection: "QBCore" for qb-core, "ESX" for es_extended, or "Qbox" for qbox_core
J0.Core = "QBCore"

Options:

  • "QBCore" - For QBCore framework

  • "ESX" - For ESX framework

  • "Qbox" - For Qbox framework

Inventory System Selection

-- Inventory system selection: "qb" for QB inventory or "ox" for ox inventory
J0.Inventory = 'ox'

Options:

  • 'ox' - For OX-Inventory

  • 'qb' - For QB-Inventory

Laser Configuration

Configuration Parameters Explained

cooldown_on_place

  • Type: boolean

  • Default: true

  • Description: Enables a cooldown period after placing a laser to prevent spam placement

cooldown_time

  • Type: number (seconds)

  • Default: 5

  • Description: The duration of the cooldown period in seconds

shop_coords

  • Type: vector4

  • Default: vector4(221.57, -1514.10, 28.29, 227.77)

  • Description: The coordinates and heading for the shop NPC location

  • Format: vector4(X, Y, Z, Heading)

  • How to find coordinates: Use /tp command or a coordinate finder script in-game

shop_ped

  • Type: string

  • Default: 's_m_m_fiboffice_02'

  • Description: The ped model hash for the shop NPC

  • Common ped models:

    • 's_m_m_fiboffice_02' - FIB Office Worker

    • 's_m_y_ammucity_01' - Ammunation Worker

    • 's_m_m_shop_mask' - Shop Mask Vendor

    • 's_m_y_shop_mask' - Shop Mask Vendor (Young)

    • Or any other valid GTA V ped model

items

  • Type: table

  • Description: Array of items available for purchase at the shop

  • Structure:

Example Custom Configuration

Database Configuration

The laser system uses a JSON file for persistent storage: shared/database.json

Database Structure

Warning: Do not manually edit database.json while the server is running. The file is automatically managed by the script.

Laser Properties

Each laser has the following properties (stored in database):

  • laserId: Unique identifier for the laser

  • start: Starting coordinates (vector3)

  • finish: Ending coordinates (vector3)

  • color: RGBA color array [R, G, B, A] (0-255)

  • isOwnedByPolice: Boolean indicating if it's a police laser

  • control: Boolean indicating if detection is enabled

  • still: Boolean for movement behavior

  • isMoving: Boolean indicating if laser moves

  • movement: Movement configuration (currently not fully implemented in UI)

Performance Considerations

  • Lasers are only rendered when players are within 50 units of the laser start point

  • The detection system uses optimized distance calculations

  • Database is only written to when lasers are created or removed


Configuration complete! Customize the settings to match your server's needs.

Last updated