π¬Business Details
Docs needed to run script on any ESX / QB / QBox server

Overview
XeX BusinessDetails is a premium, full-featured business directory and review system for FiveM servers. It provides a modern glassmorphism NUI interface where players can browse businesses, view their open/closed status, set GPS waypoints, and leave star ratings with reviews. Business owners can toggle their open/close status with cooldown protection, and admins can moderate reviews. Built with multi-framework support and optimized for performance.
Supported Frameworks
ESX Legacy
1.6.0+
β Full Support
QBCore
Latest
β Full Support
QBox
Latest
β Full Support
Features Summary
Core Features
Directory
Business Listing
Configurable list of businesses with images, descriptions, and categories
Directory
Real-Time Status
Open/closed status updated in real-time across all players
Directory
GPS Waypoint
Click to set map waypoint to any business location
Directory
Category Tabs
Filter businesses by configurable categories
Directory
Search
Instant text search by business name with debounced input (150ms)
Directory
Filter Chips
All / Open / Closed / My Business filter buttons
Reviews
Star Ratings
1-5 star rating system per business, stored in MySQL
Reviews
Written Reviews
Text reviews with configurable min/max character limits
Reviews
Average Ratings
Cached average rating displayed per business card
Reviews
Owner Replies
Business owners can reply to reviews on their business
Reviews
Admin Moderation
Admins can delete reviews and reply to any review
Reviews
Self-Review Protection
Players cannot review their own business
Reviews
Duplicate Protection
Configurable max reviews per player per business
Toggle
Open/Close
Business employees can toggle their business open/close
Toggle
Cooldown
Configurable cooldown between toggles (skip cooldown when closing)
Toggle
Grade Restriction
Minimum job grade required per business
Announce
Chat Messages
Automatic chat announcements when businesses open/close
Announce
Periodic Reminders
Configurable interval to remind players of open businesses
Announce
Discord Webhooks
Rich embeds sent to Discord on status changes
UI
Glassmorphism
Modern dark translucent glass-effect interface
UI
Responsive
Auto-fill card grid with responsive breakpoint at 900px
UI
Animations
Container, card, review panel, and toast animations
System
Multi-Framework
ESX, QBCore, QBox with auto-detection
System
ox_lib Support
Optional; used for notifications and callbacks
System
Auto Updater
JSON-based version checker via GitHub Gist
System
Auto DB
Reviews table auto-created on first start
I18n
2 Languages
English, Spanish
Integration
lb-phone
Client exports for phone app integration
Integration
External Resources
Full export API for third-party integrations
Installation
Requirements
FiveM Server Build 5181+
Framework: ESX Legacy, QBCore, or QBox
Optional: ox_lib (for enhanced notifications)
Quick Start
Place the resource folder in your server resources:
Put
xex_businessdetailsin your resources folder.
Add the resource to your server configuration:
In
server.cfgadd:ensure xex_businessdetails
Configure resource files:
Edit
config.lua(categories, businesses, language)Edit
svconfig.lua(webhooks, reviews, admin groups)Add business images to
web/img/
Restart your server:
Restart server; the database table is created automatically on first start.
Recommended Resource Order
Configuration
Framework Settings
'auto'
Detects framework automatically (recommended)
'esx'
Force ESX Legacy
'qb'
Force QBCore
'qbox'
Force QBox
Language Settings
General Settings
Config.BusinessCommand
'business'
Chat command to open the directory UI
Config.CooldownSeconds
1800
Seconds between open toggles (closing has no cooldown)
Config.ReminderIntervalMinutes
15
Minutes between open businesses chat reminders (0 = disabled)
Categories
Define the category tabs displayed in the UI:
id
string
Unique identifier (matches category in businesses)
label
string
Display name in the UI tab
icon
string
FontAwesome 6 icon class
color
string
Hex color for the category badge
Business Directory
Each business entry in Config.Businesses:
label
string
β
Display name
name
string
β
Job name (used for toggle permission check)
category
string
β
Category ID (default: 'other')
minGradeToManipulate
number
β
Min job grade to toggle (default: 0)
description
string
β
Card description text
img
string
β
Image filename relative to web/img/
coords
vector3
β
Map coordinates for GPS waypoint
open
boolean
β
Default open state (default: false)
Server Configuration
svconfig.lua
Update System
Notification System
'auto'
ox_lib β Framework β Native (fallback chain)
'ox_lib'
Force ox_lib notifications
'esx'
Force ESX notifications
'qb'
Force QBCore notifications
'native'
Force GTA V native notifications
Discord Webhooks
Webhook sends a rich embed when a business is opened or closed, including:
Player name who toggled
Business name
Open/Closed status
Timestamp
Chat Announcements
Reviews System
Admin Groups
Database
The business_reviews table is automatically created on first start. No manual SQL import needed.
If you prefer to create it manually:
How It Works
Complete Flow
Player types /business β Server sends business data + player job/grade β Client opens NUI with glassmorphism UI
Player can:
Browse categories (tabs)
Search by name
Filter: All / Open / Closed / My Business
Click GPS β sets waypoint on map
Click Toggle β opens/closes their business (if permitted)
Click Stars β opens review panel
Within the review panel:
Read reviews
Submit review (1-5 stars + comment)
Delete own review
Reply (owner/admin)
Delete review (admin)
Press ESC/Backspace β closes UI
Business Open/Close Toggle
Player clicks the toggle button on their business card.
Client sends toggleBusiness callback to server via Bridge.
Server validates:
Business exists
Player's job matches
business.namePlayer's grade β₯
business.minGradeToManipulateCooldown has elapsed (only for opening, closing skips cooldown)
Server toggles state and broadcasts to all clients. Optional: chat message and Discord webhook sent.
Cooldown System
Default: 30 minutes (
Config.CooldownSeconds = 1800)Cooldown applies only when opening a business
Closing a business has no cooldown (can close immediately)
Cooldown is per-business, tracked server-side
Permission System
Job Match
Player's current job must match the business name field
Grade Check
Player's job grade must be β₯ minGradeToManipulate
Admin (Reviews)
Admin groups or custom check for review moderation
Self-Review
Players cannot review their own business
Reviews & Ratings
Submit: Players can leave 1-5 star rating + text comment
Character limits: Configurable min (10) / max (500) characters
Duplicate limit: Max 1 review per player per business (configurable)
Average rating: Calculated via SQL
AVG(rating)and displayed on cardsReplies: Business owners and admins can reply to reviews
Moderation: Admins or the review author can delete reviews
Identification: Reviews track player identifier and character name
Chat Reminders
When ConfigSv.ReminderEnabled = true and Config.ReminderIntervalMinutes > 0:
Every N minutes, a chat message lists all currently open businesses
Uses
[BUSINESS]label with orange color formatting
NUI Interface
Main Directory View
Header with search bar, open business count, and close button
Dynamic category tabs (auto-generated from
Config.Categories)Filter chips: All / Open / Closed / My Business
Business card grid with responsive layout
Category Tabs
Auto-generated from config with icon and label
Click to filter by category
"All" tab shows everything
Filter Chips
All
Shows all businesses in current category
Open
Shows only businesses with open = true
Closed
Shows only businesses with open = false
My Business
Shows only businesses matching player's current job
Business Cards
Each card displays:
Business image (from
web/img/)Status badge (OPEN = green, CLOSED = red)
Category badge with color
Star rating (clickable to open review panel)
Business name and description
GPS button (set map waypoint)
Toggle button (only visible to business employees)
Review Panel
Slide-in panel from the right showing:
Business name and average rating
Star input (hover highlight + click to select)
Text area with character counter
Submit button
List of existing reviews with:
Author name and date (relative time format)
Star rating display
Comment text
Reply section (if replied)
Reply button (owner/admin only)
Delete button (author/admin only)
Reply modal dialog
Exports & Events
Client Exports
Server Exports
Shared Exports
Server Callbacks (Bridge)
xex_businessdetails:toggleBusiness
businessId
boolean
Toggle business open/close
xex_businessdetails:getReviews
businessId
table
Get reviews for a business
xex_businessdetails:getAverageRatings
β
table
Get average rating per business
xex_businessdetails:submitReview
{ businessId, rating, comment }
{ success, message }
Submit a review
xex_businessdetails:deleteReview
{ reviewId }
{ success, message }
Delete a review
xex_businessdetails:replyReview
{ reviewId, reply }
{ success, message }
Reply to a review
Net Events
xex_businessdetails:showMenu
Server β Client
data, job, grade
Opens the business UI
xex_businessdetails:toggleBusiness
Server β All Clients
businessId, isOpen
Syncs open/close status
xex_businessdetails:syncAll
Server β Client
data
Full business data sync
xex_businessdetails:requestSync
Client β Server
β
Request business data
xex_businessdetails:openMenu
Client β Server
β
Open menu via export
NUI Callbacks
close
β
Close the UI
toggleBusiness
{ businessId }
Toggle business state
markOnMap
{ businessId }
Set GPS waypoint
getReviews
{ businessId }
Fetch reviews list
getAverageRatings
β
Fetch all average ratings
submitReview
{ businessId, rating, comment }
Submit a review
deleteReview
{ reviewId }
Delete a review
replyReview
{ reviewId, reply }
Reply to a review
Commands
/{BusinessCommand}
Client
Opens the business directory (default: /business)
businessdetails_update
Server Console
Manual update check
lb-phone Integration
The resource exposes client exports designed for easy integration with lb-phone and other phone systems.
Quick Setup
You can open the business directory from any lb-phone app, custom contact, or launcher button using:
Custom LB-Phone App Example
-Copy / paste this code replacing ExecuteCommand('business') with your Config.BusinessCommand.
To open with exports:
Or from a client script triggered by lb-phone:
Reading Business Data
You can also read business data from lb-phone to show info in the phone UI:
Server-side (for phone server scripts):
Bridge System
The Bridge is a framework abstraction layer that provides unified API across ESX, QBCore, and QBox.
Framework Detection
Checks Config.Framework setting.
If 'auto', tries frameworks in Config.AutoDetectOrder sequence.
Default order: QBox β QBCore β ESX.
Retries initialization up to 50 times.
Client Bridge API
Server Bridge API
Localization
Supported Languages
en
English
es
EspaΓ±ol
Locale Keys Reference
status_changed
Business status updated successfully!
Toggle success
too_early
You must wait before changing status again
Cooldown active
business_open_generic
is now OPEN! Use /%s to find us.
Chat on open
business_closed_generic
is now CLOSED.
Chat on close
view_business
Open businesses:
Reminder prefix
any_open
None
No businesses open
business_chat_label
[BUSINESS]
Chat label tag
webhook_opened
opened
Webhook embed
webhook_closed
closed
Webhook embed
webhook_title
Business Status Change
Webhook embed title
review_submitted
Your review has been submitted!
Review success
review_deleted
Review deleted successfully
Delete success
review_reply_sent
Reply sent successfully
Reply success
review_already_exists
You already reviewed this business
Duplicate review
review_too_short
Review is too short (min %d characters)
Validation
review_too_long
Review is too long (max %d characters)
Validation
review_invalid_rating
Rating must be between 1 and 5
Validation
review_not_found
Review not found
Not found
review_no_permission
You do not have permission to do that
Unauthorized
review_own_business
You cannot review your own business
Self-review
Adding Languages
Add a new entry in locales.lua:
Then set Config.Language = 'fr' in config.lua.
File Structure
Security
Server-side toggle
Business open/close validated on server (job, grade, cooldown)
Server-side reviews
All review operations validated server-side
Cooldown enforcement
Cooldown tracked server-side, cannot be bypassed by client
Permission checks
Job match + grade verification for toggle; admin check for moderation
Self-review prevention
Server checks if player's job matches business before allowing review
Duplicate prevention
Server checks existing reviews before allowing new submission
Input validation
Rating range (1-5), comment length limits enforced server-side
Reply permissions
Only business owners and admins can reply to reviews
Delete permissions
Only review author and admins can delete reviews
Bridge callbacks
15-second timeout on client callbacks to prevent hanging
SQL injection
Uses parameterized queries via oxmysql
Performance
Idle cost
0.00ms when UI is closed
Active cost
Minimal β only NUI framerate when open
ESC thread
Wait(0) loop only active when isMenuOpen = true
Review cache
Average ratings cached on client, updated on submit/delete
Business sync
Initial sync on player connect, broadcast updates only on toggle
Search
150ms debounced input to reduce re-renders
Troubleshooting
UI Doesn't Open
Verify resource is started:
ensure xex_businessdetailsCheck for errors in server console (F8)
Verify framework detection: check console for
[XeX BusinessDetails] Framework:Ensure
oxmysqlis started before this resource
Reviews Not Working
Check
ConfigSv.ReviewsEnabled = trueCheck server console for database errors
Verify oxmysql connection works
The
business_reviewstable is auto-created β check for creation errors
Open/Close Not Working
Verify player's job matches
business.namein configVerify player's grade β₯
minGradeToManipulateCheck if cooldown is active (30 min by default)
Check server console for permission denial messages
Webhook Not Sending
Verify
ConfigSv.Webhookis set (notnil)Test webhook URL in Discord settings
Check server console for HTTP errors
Changelog
v2.0.0
Complete rewrite with Bridge architecture
Multi-framework support (ESX, QBCore, QBox)
Auto framework detection
Full review system with star ratings, comments, replies, moderation
Category tabs with configurable icons and colors
Search and filter system (All/Open/Closed/My Business)
Modern glassmorphism NUI with animations
Client exports for lb-phone and external resource integration
Server exports for business data access
Discord webhook integration with rich embeds
Periodic chat reminder system
Configurable cooldown with close-skip
ox_lib optional integration with full fallback chain
Auto database table creation
JSON-based auto-updater
English and Spanish localization
Performance optimized (0.00ms idle)
Support
Discord
Last updated