Troubleshooting
Troubleshooting
If you encounter any issues while using the b2_vehicleEssentials script, refer to the troubleshooting steps below to diagnose and resolve common problems.
Common Issues
Script Not Starting
Problem: The script does not start when the server is launched.
Solution: Ensure that you have added
start b2_vehicleEssentials
to yourserver.cfg
file. Verify that the script is placed in the correctresources
folder.
Traffic Density Not Adjusting
Problem: Dynamic traffic management does not seem to work.
Solution: Check if
Config.DynamicTrafficManagement
is set totrue
in theconfig.lua
file. Ensure the server population is being tracked correctly.
Seatbelts Not Working
Problem: Automatic or manual seatbelts are not functioning as expected.
Solution: Verify that
Config.AutoSeatbeltOnEntry
is set totrue
for automatic seatbelts. For manual seatbelts, ensure theConfig.SeatbeltKey
is correctly configured and not conflicting with other keybindings.
Speed Limiter Not Applying
Problem: Speed limits are not being enforced.
Solution: Ensure
Config.SpeedLimiterEnabled
is set totrue
. Check theConfig.GlobalSpeedLimit
andConfig.SpeedZones
settings for correct values.
Realistic Vehicle Damage Not Applied
Problem: The realistic vehicle damage system is not working.
Solution: Verify that
Config.DamageSystem.enabled
is set totrue
. Ensure that the individual settings within theDamageSystem
configuration are correctly set.
NPC Driving Style Not Changing
Problem: NPC driving styles are not changing as expected.
Solution: Confirm that
Config.MentalState.DrivingStyle
is set to a valid driving style value. Use the exportexports.b2_vehicleEssentials:ChangeNPCDrivingStyle(drivingStyle)
correctly in other scripts.
Vehicles Giving Weapons
Problem: Vehicles are still giving weapons to players despite the setting.
Solution: Check if
Config.DisableVehicleWeapons
is set totrue
. Ensure the script loop responsible for disabling vehicle weapons is running without errors.
Performance Issues
Problem: The script is causing high CPU usage.
Solution: Make sure you are running the latest optimized version of the script. Review the configuration settings to avoid overly frequent operations. Set
Config.Debug
tofalse
in production to reduce logging overhead.
Debugging Steps
Enable Debug Mode
Set
Config.Debug
totrue
in theconfig.lua
file to enable detailed debug prints. This will help in identifying issues by providing more information in the console.
Check Server Console
Review the server console logs for any error messages or warnings related to the b2_vehicleEssentials script. Look for missing dependencies or configuration errors.
Validate Configuration
Double-check all configuration settings in the
config.lua
file. Ensure all values are correct and within acceptable ranges.
Update Script
Ensure you are using the latest version of the b2_vehicleEssentials script. Check the Github Repository for any updates or bug fixes.
Disable Conflicting Scripts
Temporarily disable other scripts to identify any potential conflicts. Gradually re-enable them to pinpoint the source of the issue.
Contact Support
If you have tried the above troubleshooting steps and are still experiencing issues, feel free to reach out for support on the GitHub Repository or the Discord. Provide detailed information about your problem, including any error messages, configuration settings, and steps to reproduce the issue.
Last updated