β οΈTroubleshooting
This guide helps resolve common issues with the DevHub Racing script based on configuration and setup.
Resource Not Starting
Check Dependencies
Problem: Resource fails to start or shows errors in console.
Solution:
Ensure
devhub_libis started before this resource:-- server.cfg ensure devhub_lib ensure devhub_laptop ensure devhub_racingIf skill tree is enabled, ensure
devhub_skillTreeis started before:-- server.cfg ensure devhub_lib ensure devhub_skillTree ensure devhub_laptop ensure devhub_racingCheck for SQL errors - ensure database tables are created:
Import
sql.sqlfile into your databaseVerify tables exist:
devhub_racing_maps,devhub_racing_users,devhub_racing_races, etc.
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:
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:
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:
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:
Check if race has "ALL" class selected (allows any vehicle).
Debug vehicle hash:
Enable debug mode:
Config.Debug = trueCheck console for vehicle model hash when attempting to join
Add hash to appropriate vehicle class
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:
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:
Ensure devhub_lib (NEEDED FOR EACH SCRIPT!) recognizes player as admin:
Check admin system in your framework
Test with:
Core.IsPlayerAdmin(source)functionVerify 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:
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:
Check Event Probability Tables
Problem: Rewards or MMR not being awarded.
Solution:
Verify reward tables in configs/sh.config.lua:
Check if MMR is enabled for race type:
Verify XP table (if skill tree enabled):
Ensure Config Values Are Valid
Problem: Features behave unexpectedly or don't work.
Solution:
Check for empty or invalid config values:
Verify data types:
Numbers:
1000,50.5,-25Strings:
"cash","ALL"Booleans:
true,falseTables:
{},{ key = value }
Check for typos in config keys:
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:
Test prop models in-game:
Create spawn prop command example:
/spawnprop prop_beachflag_01Verify model exists in game files
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:
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:
Verify sound files exist:
Check
public/sounds/folderFiles:
countdown.wav,fireworks.mp3,swoosh.wavEnsure proper file formats (WAV, MP3, OGG)
Check NUI resource path:
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:
Server restart sequence:
Individual resource restart:
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:
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:
Check server time vs configured time:
Server might be in different timezone
Use
/timecommand to check current server timeAdjust 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:
Verify player distance to race start:
Must be within
showDistancerangeIncrease range for testing:
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:
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:
Test NUI directly:
F8 console:
loadnui https://cfx-nui-devhub_racing/html/index.htmlCheck NUI console for errors
Ensure laptop resource is compatible:
Verify
devhub_laptopis installed (if required)Check laptop app registration
Translations Not Displaying
Problem: UI shows translation keys instead of text.
Solution:
Check language file completeness in configs/sh.lang.lua:
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.luaTranslate to your language
Restart resource
Music Not Playing
Problem: Race music doesn't play or is silent.
Solution:
Check music configuration in configs/sh.config.lua:
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 musicCheck game audio settings (not muted)
Test with different browsers (NUI)
Discord Integration Issues
Webhooks Not Sending
Problem: Discord messages not appearing.
Solution:
Verify webhook URLs in configs/s.logs.lua:
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:
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:
Import SQL file if missing:
Locate
sql.sqlin resource folderRestart server after import
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:
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:
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_laptopContact 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
Last updated