Troubleshooting Guide
This guide covers common issues and solutions for both noclip_crafting and noclip_drugs scripts.
General Issues
Script Not Starting
Symptoms
- Script doesn't appear in server console
- Error messages about missing dependencies
- Resource fails to start
Solutions
- Check Dependencies: Ensure all required resources are installed and started:
qb-core
ox_lib
ox_target
ox_inventory
(optional for noclip_drugs)
- Check Resource Order: Make sure the script is started after dependencies in your
server.cfg
- Verify File Structure: Ensure all files are in the correct location and not corrupted
- Check Console Errors: Look for specific error messages in the server console
Performance Issues
Symptoms
- Server lag when using the script
- High CPU usage
- Slow response times
Solutions
- Enable Debug Mode: Set
Config.Debug = false
in production - Check Resource Usage: Monitor server performance with the script enabled/disabled
- Optimize Configuration: Reduce the number of locations or simplify recipes
- Update Dependencies: Ensure all OX resources are up to date
noclip_crafting Specific Issues
Crafting Menu Not Opening
Symptoms
- No ox_target interaction appears
- Menu opens but shows no recipes
- Error messages in console
Solutions
- Check ox_target: Ensure ox_target is properly installed and configured
- Verify Coordinates: Check that crafting location coordinates are correct
- Check Job Restrictions: Ensure player has the required job/grade
- Verify Item Requirements: Check if player has required items for the location
- Check ox_inventory Items: Ensure all recipe items exist in ox_inventory
Items Not Being Given/Removed
Symptoms
- Items not removed from inventory during crafting
- Crafted items not appearing in inventory
- Inventory full errors
Solutions
- Check ox_inventory Integration: Verify ox_inventory is properly configured
- Check Item Names: Ensure item names match exactly between config and ox_inventory
- Verify Inventory Space: Check if player has enough inventory space
- Check Item Weight: Ensure items don't exceed weight limits
- Enable Debug Mode: Set
Config.Debug = true
to see detailed logs
Skill System Issues
Symptoms
- Skills not leveling up
- Experience not being saved
- Skill requirements not working
Solutions
- Check Skill System: Ensure
Config.SkillSystem.enabled = true
- Verify Experience Gain: Check that recipes have
expGain
values set - Check Level Requirements: Ensure
levelRequirement
is set correctly - Check File Permissions: Ensure the script can write to the data directory
- Reset Skills: Use admin command to reset player skills if corrupted
noclip_drugs Specific Issues
Harvesting Not Working
Symptoms
- No harvest interaction available
Solutions
- Check Harvest Locations: Verify coordinates in
Config.HarvestLocations
- Check ox_target: Ensure ox_target is working properly
- Verify Item Configuration: Check that harvest items exist in ox_inventory
- Check Radius Settings: Ensure harvest radius is appropriate
Drug Selling Issues
Symptoms
/selldrugs
command not working- No peds responding to drug offers
- Police alerts not working
Solutions
- Check Command Registration: Verify the command is properly registered
- Check Sellable Drugs: Ensure drugs are in
Config.SellableDrugs
- Verify Police Integration: Check ps-dispatch configuration
- Check Ped Spawning: Ensure peds are spawning correctly
- Check Reaction Chances: Verify ped reaction configuration
Addiction System Issues
Symptoms
- Addictions not being tracked
- Withdrawal effects not working
- Cure items not working
Solutions
- Check Addiction Configuration: Verify addiction thresholds in config
- Check Drug Effects: Ensure drug effects are properly configured
- Verify Cure Items: Check that cure items exist in ox_inventory
- Check Data Persistence: Ensure addiction data is being saved
- Use Admin Commands: Use
/addictioninfo
to check player status
Drug Effects Not Working
Symptoms
- Drug consumption has no effects
- Effects not persisting across restarts
- Visual effects not appearing
Solutions
- Check Drug Configuration: Verify drug effects in
Consumables.Drugs
- Check Effect Values: Ensure effect values are within valid ranges
- Verify Animations: Check that animations are properly configured
- Check Influence Persistence: Ensure influence system is enabled
- Check Client Events: Verify client-side events are firing
Common Error Messages
Server-Side Errors
"QBCore not found"
Solution: Ensure QBCore is started before the script in server.cfg
"ox_inventory not found"
Solution: Install ox_inventory or set Config.UseOxInventory = false
"Invalid item name"
Solution: Check that item names match exactly between config and ox_inventory
"Player not found"
Solution: Ensure player is properly loaded before calling exports
Client-Side Errors
"ox_target not found"
Solution: Ensure ox_target is properly installed and started
"ox_lib not found"
Solution: Install and configure ox_lib properly
"Invalid coordinates"
Solution: Check that all coordinates in config are valid vector4 values
Debugging Tips
Enable Debug Mode
Set Config.Debug = true
in your config file to get detailed logging:
Config = {}
Config.Debug = true -- Enable detailed logging
Check Server Console
Monitor the server console for error messages and debug information when issues occur.
Use Admin Commands
Both scripts include admin commands for debugging:
- noclip_crafting:
/craftingdebug
,/resetskills [player_id]
- noclip_drugs:
/addictioninfo [player_id]
,/cureaddiction [player_id] [drug_type]
Check File Permissions
Ensure the script has read/write permissions for its data directory.
Getting Help
If you're still experiencing issues after trying these solutions:
- Check the GitHub Issues: Search for similar problems in the repository
- Enable Debug Mode: Get detailed logs to help identify the issue
- Provide Information: When asking for help, include:
- Script version
- Dependency versions
- Error messages
- Configuration snippets
- Steps to reproduce the issue
- Contact Support: Reach out through GitHub or Discord