⚠️ Troubleshooting
Resource Not Starting
Check Dependencies
Problem: Resource fails to start or shows errors in console.
Solution:
-
Ensure
devhub_libis started before this resource:Lua-- server.cfg ensure devhub_lib ensure devhub_laptop ensure devhub_racing -
If skill tree is enabled, ensure
devhub_skillTreeis started before:Lua-- server.cfg ensure devhub_lib ensure devhub_skillTree ensure devhub_laptop ensure devhub_racing -
Check for SQL errors - ensure database tables are created:
- Import
sql.sqlfile into your database - Verify tables exist:
devhub_racing_maps,devhub_racing_users,devhub_racing_races, etc.
- Import
Verify Config Syntax
Problem: Script stops loading or throws Lua errors.
Solution:
- Check all config files for syntax errors:
- Missing commas in tables
- Mismatched brackets
{},[] - Unclosed strings
"" - Invalid Lua syntax
- Use a Lua syntax validator or IDE with Lua support to check files.
Check File Permissions
Problem: Resource cannot read configuration files.
Solution:
-
Ensure all files in
configs/folder have read permissions. -
On Linux servers, check file ownership:
Shellchown -R fivem:fivem /path/to/devhub_racing chmod -R 755 /path/to/devhub_racing
Players Cannot Use the System
Check Entry Fee Requirements
Problem: Players cannot join races despite having money.
Solution:
-
Verify payment method configuration in configs/sh.config.lua:
LuaConfig.EntryFeePaidVia = 'cash' -- or 'bank' -
Ensure players have money in correct account:
'cash'= money on hand'bank'= bank account balance
-
Ensure you have correctly configured devhub_lib-needed-for-each-script
Verify Vehicle Class Skills
Problem: Players get "must unlock class skill" error.
Solution:
-
Check if skill tree is enabled in configs/sh.config.lua:
LuaConfig.SkillTreeEnabled = false -- Set to false to disable requirement -
If skill tree enabled, ensure players have unlocked required class:
- Class C: Starting class (should be auto-unlocked)
- Classes B, A, S: Must be unlocked via skill tree
-
Grant skill points to players for testing:
- Use skill tree admin commands
- Or temporarily disable:
Config.SkillTreeEnabled = false
Check Vehicle Class Restrictions
Problem: "Your vehicle is not allowed in this race" error.
Solution:
-
Verify vehicle is in correct class in configs/c.vehicleClasses.lua:
LuaConfig.VehicleClasses = { S = { `adder`, `zentorno`, ... }, -- Add custom vehicles here } -
Check if race has "ALL" class selected (allows any vehicle).
-
Debug vehicle hash:
- Enable debug mode:
Config.Debug = true - Check console for vehicle model hash when attempting to join
- Add hash to appropriate vehicle class
- Enable debug mode:
Verify Coordinates and Positions
Problem: Players spawn in wrong locations or checkpoints don't work.
Solution:
-
Ensure map has valid coordinates:
- Start position set
- Finish position set
- At least one checkpoint configured
-
Check map in database for corrupted data:
SQLSELECT * FROM devhub_racing_maps WHERE id = YOUR_MAP_ID; -
Recreate map if coordinates are invalid:
- Delete problematic map
- Create new map with map creator
- Test thoroughly before making official
Check Admin Permissions
Problem: Players cannot create maps/races despite being admin.
Solution:
-
Verify admin permissions in configs/sh.config.lua:
LuaConfig.IsAdminPermissionRequired = { ['verifyMap'] = true, -- Only admins can verify ['createMap'] = false, -- Anyone can create ['createRace'] = false, -- Anyone can create ['editMap'] = false, -- Users can edit own maps ['editAnyMap'] = true, -- Only admins edit any map } -
Ensure devhub_lib-needed-for-each-script recognizes player as admin:
- Check admin system in your framework
- Test with:
Core.IsPlayerAdmin(source)function - Verify ace permissions
Features Not Triggering
Verify Callback Functions
Problem: Custom integrations don't execute.
Solution:
-
Check callback functions in configs/c.functions.lua and configs/s.functions.lua:
LuaOpenClientFunctions = { CanJoinRace = function(raceData) -- Must return true/false return true end, RaceFinish = function(activeRaceData, position, finishData) -- Your custom code here return -- Must have return statement end, } -
Ensure functions don't have errors:
- Check F8 console for client errors
- Check server console for server errors
- Add debug prints to verify execution
-
Common mistakes:
Lua-- WRONG: No return value CanJoinRace = function(raceData) print("Checking...") -- Missing return true end -- CORRECT: CanJoinRace = function(raceData) print("Checking...") return true -- Must return boolean end
Check Event Probability Tables
Problem: Rewards or MMR not being awarded.
Solution:
-
Verify reward tables in configs/sh.config.lua:
LuaConfig.MmrForWin = { [1] = 50, -- Must be > 0 [2] = 25, [3] = 10, } Config.MmrForLost = -25 -- Can be negative -
Check if MMR is enabled for race type:
LuaConfig.AllowMrrOnAllRaces = false -- Only official races award MMR -- OR Config.AllowMrrOnAllRaces = true -- All races award MMR -
Verify XP table (if skill tree enabled):
LuaConfig.XpForFinishingRace = { [1] = 100, [2] = 50, -- ... not empty or zero }
Ensure Config Values Are Valid
Problem: Features behave unexpectedly or don't work.
Solution:
-
Check for empty or invalid config values:
Lua-- WRONG: Empty table Config.MmrForWin = {} -- WRONG: Nil value Config.DefaultMmr = nil -- CORRECT: Config.MmrForWin = { [1] = 50, [2] = 25, [3] = 10 } Config.DefaultMmr = 1000 -
Verify data types:
- Numbers:
1000,50.5,-25 - Strings:
"cash","ALL" - Booleans:
true,false - Tables:
{},{ key = value }
- Numbers:
-
Check for typos in config keys:
Lua-- WRONG: Typo in property name Config.DefautMmr = 1000 -- Should be "DefaultMmr" -- CORRECT: Config.DefaultMmr = 1000
Props, UI and Events Not Working
Verify Prop Models Exist
Problem: Props don't appear in map creator or during races.
Solution:
-
Check prop model names in configs/c.creatorProps.lua:
Lua{ image = "https://...", prop = "prop_beachflag_01", -- Must be valid GTA V prop model } -
Test prop models in-game:
- Create spawn prop command example:
/spawnprop prop_beachflag_01 - Verify model exists in game files
- Create spawn prop command example:
-
Common issues:
- Typo in prop name
- DLC prop requiring specific game build
- Custom prop not installed on server
- Model streaming issues (add to
fxmanifest.luaif needed)
Enable Debug Mode
Problem: Unable to identify what's failing.
Solution:
-
Enable debug mode in configs/sh.config.lua:
LuaConfig.Debug = true Config.DevMode = true -- Additional developer information -
Check logs in:
- F8 console (client-side)
- Server console (server-side)
- Browser console (NUI errors)
-
Look for specific error messages:
- Script errors (Lua syntax)
- Network errors (API calls failing)
- Asset loading errors (props, images, sounds)
Verify Asset References
Problem: Images, sounds, or UI elements don't load.
Solution:
-
Check image URLs in configs:
LuaConfig.LaptopApp = { img = "https://cfx-nui-devhub_laptop/html/images/apps/racing.png", -- URL must be accessible } -
Verify sound files exist:
- Check
public/sounds/folder - Files:
countdown.wav,fireworks.mp3,swoosh.wav - Ensure proper file formats (WAV, MP3, OGG)
- Check
-
Check NUI resource path:
Luapath = "https://cfx-nui-devhub_racing/html/index.html", -- Must match resource name exactly -
Test asset loading:
- Open browser console (NUI devtools)
- Check for 404 errors or loading failures
Restart in Correct Order
Problem: Script partially works or has intermittent issues.
Solution:
-
Proper startup order:
Lua-- server.cfg (correct order) ensure devhub_lib ensure devhub_skillTree # if skill tree enabled ensure devhub_laptop ensure devhub_racing -
Server restart sequence:
Luaensure devhub_lib ensure devhub_skillTree ensure devhub_laptop ensure devhub_racing -
Individual resource restart:
Luarefresh # Refresh resource cache ensure devhub_racing # Start resource -
Full server restart recommended after:
- Database changes
- Major configuration changes
- Adding/removing dependencies
Race Mechanics Issues
Checkpoint Not Detecting
Problem: Players drive through checkpoints but they don't register.
Solution:
-
Check checkpoint marker settings and devMode:
LuaConfig.EnableCheckpointMarkers = true -- Must be enabled Config.DevMode = true -
Verify checkpoint placement in map:
- Checkpoints too far apart
- Checkpoint trigger zone too small
- Checkpoints placed incorrectly (underground, in air)
-
Test with debug mode enabled:
- See checkpoint coordinates
- Verify player position vs checkpoint position
- Check trigger distance calculations
-
Recreate problematic checkpoints:
- Edit map in map creator
- Delete and re-place checkpoint
Race Will Not Start
Problem: Countdown doesn't begin or race is stuck.
Solution:
-
Check minimum player requirement:
- At least 1 player required
- Verify players are in waiting room state
-
Verify start time configuration:
LuaConfig.OfficialRaceGenerator = { ['Monday'] = { { start = {hour = 18, minute = 0}, -- Must be valid time -- ... } } } -
Check server time vs configured time:
- Server might be in different timezone
- Use
/timecommand to check current server time - Adjust scheduled times accordingly
-
Manual race start issues:
- Check if start delay expired
- Verify race is not already in progress
- Ensure no conflicting race instances
Blips Not Showing
Problem: Map markers and checkpoint blips invisible.
Solution:
-
Check blip configuration in configs/sh.config.lua:
LuaConfig.RaceBlips = { enabled = true, -- Must be true showDistance = 2000.0, -- Increase if needed -- ... } Config.CheckpointBlips = { enabled = true, -- Must be true -- ... } -
Verify player distance to race start:
-
Must be within
showDistancerange -
Increase range for testing:
LuashowDistance = 10000.0, -- 10km
-
-
Check for blip sprite conflicts:
- Try different blip sprite IDs
- Use unique blip sprites not used elsewhere
Collisions Not Working as Expected
Problem: Player collisions disabled when they should be enabled (or vice versa).
Solution:
-
Check race configuration:
Luacollisions = true, -- Player collisions enabled collisions = false, -- Player collisions disabled (ghost mode) -
Note: Props are always collision-free by design:
- Prevents players getting stuck on decorations
- Allows passing through checkpoint markers
- Cannot be changed via config
-
Verify entity collision settings:
- Check if other scripts override collision
- Test in isolated environment (no other scripts)
UI and Display Issues
Racing App Not Opening
Problem: Laptop app doesn't display racing interface.
Solution:
-
Check laptop integration:
LuaConfig.LaptopApp = { path = "https://cfx-nui-devhub_racing/html/index.html", -- Must match resource name } -
Test NUI directly:
- F8 console:
loadnui https://cfx-nui-devhub_racing/html/index.html - Check NUI console for errors
- F8 console:
-
Ensure laptop resource is compatible:
- Verify
devhub_laptopis installed (if required) - Check laptop app registration
- Verify
Translations Not Displaying
Problem: UI shows translation keys instead of text.
Solution:
-
Check language file completeness in configs/sh.lang.lua:
LuaConfig.Lang = { ['already_in_race'] = "You are already in a race!", -- All keys must have values } -
Verify translation key matches code:
- Check for typos in translation keys
- Ensure key exists in config
- Use exact key name (case-sensitive)
-
Missing translations:
- Copy missing keys from default
sh.lang.lua - Translate to your language
- Restart resource
- Copy missing keys from default
Music Not Playing
Problem: Race music doesn't play or is silent.
Solution:
-
Check music configuration in configs/sh.config.lua:
LuaConfig.RaceMusic = { enabled = true, -- Must be true volume = 0.2, -- Increase if too quiet tracks = { "https://www.youtube.com/watch?v=...", -- Must be valid, embeddable YouTube links } } -
YouTube embed restrictions:
- Some videos are blocked by copyright
- Use royalty-free music or licensed tracks
- System auto-skips blocked videos to next track
-
Player settings:
- Press
Gin-game to toggle music - Check game audio settings (not muted)
- Test with different browsers (NUI)
- Press
Discord Integration Issues
Webhooks Not Sending
Problem: Discord messages not appearing.
Solution:
-
Verify webhook URLs in configs/s.logs.lua:
LuaConfig.LogsWebhook = "https://discord.com/api/webhooks/1234567890/ABCDEF..." Config.OfficialRacesAnnouncementsWebhook = "https://discord.com/api/webhooks/..." -
Test webhook URLs:
- Paste in browser (should show "Invalid webhook token" - this is correct)
- Copy from Discord server settings > Integrations > Webhooks
- Ensure webhook is not deleted in Discord
-
Check Discord channel permissions:
- Webhook must have permission to send messages
- Channel must exist and be accessible
- Webhook not rate-limited
Announcement Formatting Issues
Problem: Discord messages display incorrectly.
Solution:
-
Check translation strings for webhook in configs/sh.lang.lua:
LuaConfig.Lang = { ['webhook_title'] = "🏁 New Official Race Scheduled 🏁", ['webhook_description'] = "A new official race has been generated!", -- ... all webhook_ keys must exist } -
Verify embed structure in code:
- Discord embeds have field limits (256 chars for field names, 1024 for values)
- Check for special characters breaking JSON
- Validate embed colors (must be valid hex or decimal)
Database Issues
Data Not Saving
Problem: Player stats, maps, or races not persisting.
Solution:
-
Verify SQL tables exist:
SQLSHOW TABLES LIKE 'devhub_racing%'; -
Import SQL file if missing:
- Locate
sql.sqlin resource folder - Restart server after import
- Locate
-
Check database permissions:
- User must have INSERT, UPDATE, DELETE permissions
- Verify connection in devhub_lib-needed-for-each-script config
- Test with simple query
-
Look for SQL errors in console:
- Check server console for MySQL errors
- Common: Duplicate keys, constraint violations
- Fix data inconsistencies in database
Leaderboard Not Updating
Problem: Leaderboard shows old data or doesn't refresh.
Solution:
-
Check cache timeout:
LuaConfig.LeaderboardCacheTimeout = 60000 * 15 -- 15 minutes -
Force cache refresh:
- Wait for cache timeout to expire
- Restart resource:
restart devhub_racing
-
Verify leaderboard query:
- Check for database errors in console
- Test query directly in database
- Ensure proper indexing on database tables
General Troubleshooting Checklist
Before reporting issues, verify:
- All dependencies are installed and started (devhub_lib, devhub_laptop)
- Database tables are created from
sql.sql - Config files have no syntax errors
- Server and resource are fully restarted
- Debug mode is enabled to see error messages
- Console (F8 and server) checked for errors
- Your framework is working correctly and is configured in devhub_lib-needed-for-each-script
- No conflicting resources are running
- Game cache is cleared (if using custom assets)
- Server artifacts are up to date
If issues persist:
- Enable debug mode for detailed logs
- Check client (F8) , server and NUI console
- Test with minimal configuration (disable features one by one)
- Verify issue on clean server with only required resources
- Check for updates to
devhub_racing,devhub_lib, devhub_laptop - Contact DevHub support with:
- Server console logs
- Client console logs (F8)
- NUI console logs (F8 NUI devtools)
- Config files (with sensitive data removed [webhooks])
- Steps to reproduce the issue