Installation Guide

Laser System Overview

Prerequisites

Before installing the GOD Laser System, ensure you have the following dependencies:

Required Dependencies

  1. ox_lib - Required for UI components and callbacks

    • Download: ox_lib

    • Ensure it's started before the laser system in your server.cfg

  2. Framework - One of the following:

  3. Inventory System - One of the following:

Installation Steps

Step 1: Download and Place Files

  1. Download the GOD Laser System script files

  2. Extract the files to your server's resources folder

  3. Rename the folder to lasersystem (or your preferred name)

Step 2: Configure Framework and Inventory

  1. Open shared/config.lua

  2. Set your framework:

  3. Set your inventory system:

Step 3: Add Items to Your Inventory

For OX-Inventory Users

  1. Navigate to your ox_inventory/data/items.lua file

  2. Add the following items:

  1. Navigate to ox_inventory/modules/items/client.lua

  2. Add the following item usage handlers:

For QB-Inventory Users

  1. Navigate to your qb-inventory/html/images/ folder

  2. Add the item images:

    • laser_remover.png

    • laser_device.png

    • laser_devicepol.png

  3. Navigate to your qb-inventory/shared/items.lua file

  4. Add the following items:

Note: QB-Inventory automatically handles item usage through the CreateUseableItem function in the server script, so no additional client-side code is needed.

Step 4: Add to Server Configuration

  1. Open your server.cfg file

  2. Add the following line (ensure ox_lib is started before it):

Step 5: Configure Shop Location (Optional)

  1. Open shared/config.lua

  2. Modify the shop coordinates and ped model:

Step 6: Restart Server

  1. Restart your FiveM server

  2. The script will automatically create the shared/database.json file on first run

  3. Verify the script loaded successfully by checking the server console for initialization messages

Post-Installation

After installation, players can:

  1. Visit the shop NPC at the configured coordinates

  2. Purchase laser devices and removers

  3. Use the laser_device or laser_devicepol items to place lasers

  4. Use the laser_remover item to remove placed lasers

Verification

To verify the installation is working correctly:

  1. Check server console for any error messages

  2. Ensure ox_lib is running and loaded

  3. Test purchasing items from the shop

  4. Test placing a laser using a laser device item

  5. Test removing a laser using a laser remover item


Installation complete! Your laser system is now ready to use.

Last updated