FAQ
Frequently Asked Questions about the GOD Laser System.
General Questions
What frameworks does this script support?
The script supports:
QBCore - Full support
ESX - Full support
Qbox - Full support
You can switch between frameworks by changing the J0.Core setting in shared/config.lua.
What inventory systems are supported?
The script supports:
OX-Inventory - Full support with custom item handlers
QB-Inventory - Full support with automatic item usage
Configure your inventory system in shared/config.lua using the J0.Inventory setting.
Is ox_lib required?
Yes, ox_lib is required. The script uses ox_lib for:
UI components (progress bars, context menus)
Callback system for data synchronization
Other utility functions
Make sure ox_lib is started before the laser system in your server.cfg.
Installation Questions
Where do I place the script files?
Place the script in your resources folder and ensure it's added to your server.cfg:
Do I need to create a database?
No, the script uses a JSON file (shared/database.json) for storage. The file is automatically created on first run. You don't need to set up a MySQL database.
How do I add the items to my inventory?
See the Items Setup Guide for detailed instructions for both OX-Inventory and QB-Inventory.
Configuration Questions
How do I change the shop location?
Edit shared/config.lua and modify the shop_coords value:
Use /tp command or a coordinate finder to get the exact coordinates.
How do I change the shop NPC model?
Edit shared/config.lua and modify the shop_ped value:
Can I customize item prices?
Yes, edit the items table in shared/config.lua:
How do I disable the cooldown?
Set cooldown_on_place to false in shared/config.lua:
Usage Questions
How do I place a laser?
Use a
laser_deviceorlaser_devicepolitem from your inventoryLook at where you want the laser to start and press
ELook at where you want the laser to end and press
EagainPress
Efor temporary orENTERfor permanent placement
See the Usage Guide for detailed instructions.
What's the difference between temporary and permanent lasers?
Temporary (press
E): Laser is placed but removed on server restartPermanent (press
ENTER): Laser is saved to database and persists across restarts
How do I remove a laser?
Use the laser_remover item from your inventory. It will automatically remove the closest laser to your position.
Can I remove someone else's laser?
The script doesn't have built-in ownership checking for removal. The laser_remover removes the closest laser regardless of owner. You may want to add custom permission checks if needed.
How far away can I see lasers?
Lasers are rendered when you're within 50 units (meters) of the laser's start point. This is optimized for performance.
Technical Questions
How does the detection system work?
The script uses mathematical calculations to detect when a player's position intersects with the laser line. It checks:
Distance from player to laser line
Height tolerance (0.5 units)
Line width (0.1 units)
Why isn't my laser detecting players?
Common causes:
Players aren't crossing at the correct height
The laser line is too high or too low
The detection sensitivity might need adjustment
Check server console for any errors
Can I change the laser color?
Currently, laser colors are hardcoded to red [255, 0, 0, 255]. The color property exists in the database structure but isn't configurable through the UI yet.
How are lasers stored?
Lasers are stored in shared/database.json in JSON format. Each laser is associated with a player's license identifier and includes all laser properties.
What happens if I delete database.json?
All saved lasers will be lost. The file will be recreated on next server start, but all previously placed permanent lasers will be gone.
Police Laser Questions
What's the difference between regular and police lasers?
Regular Laser (
laser_device): Only notifies the owner when triggeredPolice Laser (
laser_devicepol): Notifies the owner AND all on-duty police officers
Who can use police lasers?
Anyone can purchase and use laser_devicepol items. The script doesn't restrict usage by job. If you want job restrictions, you'll need to add custom checks.
How does the police notification work?
When a police laser is triggered, the script:
Finds all players with police job (job.type == 'leo' for QBCore/Qbox, job.name == 'police' for ESX)
Sends a notification to all on-duty officers
Also notifies the laser owner
Troubleshooting
Script won't start
Check that
ox_libis installed and startedVerify framework is correctly set in
shared/config.luaCheck server console for error messages
Ensure all dependencies are loaded
Items not working
Verify items are added to your inventory system
For OX-Inventory: Check that item handlers are in
client.luaFor QB-Inventory: Verify items are in
items.luaCheck that inventory images are in the correct folder
Restart your inventory resource
Lasers not saving
Check file permissions on
shared/database.jsonVerify the resource has write access
Check server console for save errors
Ensure you're pressing
ENTER(notE) for permanent placement
Notifications not working
Verify the laser owner is online (for owner notifications)
For police lasers: Check that officers are on-duty
Check server console for notification errors
Verify job names match your framework's job system
Performance issues
Limit the number of active lasers
Remove unused lasers regularly
The script automatically optimizes rendering (50 unit distance)
Check server console for any performance warnings
Support
Where can I get help?
Check the documentation for detailed guides
Review server console for error messages
Verify all configuration settings match your setup
Ensure all dependencies are properly installed
Common Error Messages
"Failed to get player identifier"
Framework connection issue
Check that your framework is running and configured correctly
"Could not find player license"
Player identification issue
Usually resolves on player reconnect
"Laser ID not found"
Database synchronization issue
Try restarting the resource
Still have questions? Review the other documentation sections or check your server console for specific error messages.
Last updated