π οΈConfiguration
This document describes all configuration options for the DevHub Truck robbery resource.
Shared Configuration (configs/shared.lua)
configs/shared.lua)Debug Configuration
Controls debug output for the truck robbery system.
Shared.Debug = {
Enabled = true, -- Set to false to disable all debug prints
Levels = {
Info = true, -- General information
Success = true, -- Success operations
Warning = true -- Warning and potential issues
}
}Enabled: Enables/disables all debug prints.
Levels: Controls specific debug message types.
Info: General information about system operations
Success: Successful operation confirmations
Warning: Warning messages and potential issues
Client Configuration (configs/client.lua)
configs/client.lua)Truck Spawn Locations
Defines where mission trucks will spawn on the map.
TruckSpawnCoords: Array of vec4 coordinates (x, y, z, heading) where trucks can spawn.
Format:
vec4(x, y, z, heading)Usage: Add more coordinates to create multiple possible spawn points for variety.
Destination Coordinates
Defines where players must deliver the stolen truck.
DesitnationCoords: Array of vec4 coordinates for delivery locations.
Format:
vec4(x, y, z, heading)Note: Multiple destinations can be added for variety.
Ped Models
Defines the peds models that can be used for NPCs in the mission.
PedModels: Array of ped model names to use for mission NPCs.
Default Models:
mp_m_freemode_01: Male freemode pedmp_f_freemode_01: Female freemode ped
Customization: Add more ped models to increase NPC variety.
Server Configuration (configs/server.lua)
configs/server.lua)Alarm Triggering Function
Custom function to handle alarm triggering during the robbery.
coords: The coordinates where the alarm was triggered.
Usage: Customize this function to integrate with your police/dispatch system.
Implementation Examples:
Send notification to police players
Create a blip on the map
Trigger a dispatch call
Send alert to specific job roles
Translation Configuration (configs/translation.lua)
configs/translation.lua)Customize all user-facing text in the resource.
Modify these strings to change the language or customize messages.
Add your own language translations by following the same format.
Example: For Polish translation, replace English text with Polish equivalents.
Customization
Adding More Spawn Points
Add additional truck spawn locations for variety:
Adding More Delivery Locations
Create multiple delivery destinations:
Customizing NPC Appearance
Add more diverse ped models:
Implementing Custom Alarm System
Example implementation for the TriggerAlarm() function:
Troubleshooting
Truck not spawning:
Verify
Config.TruckSpawnCoordscontains valid coordinatesCheck that the spawn area is clear of obstructions
Enable debug mode to see spawn-related messages
Ensure truck model is properly loaded
Delivery location not working:
Check
Config.DesitnationCoordscoordinates are accessibleVerify the delivery zone trigger radius
Test coordinates in-game to ensure they're valid
NPCs not appearing:
Verify ped models in
Config.PedModelsare validEnsure ped models are streamed properly
Try using default GTA V ped models first
Alarms not triggering:
Implement the
TriggerAlarm()function inserver.luaVerify your dispatch/police notification system is active
Check server console for Lua errors
Test the function with debug prints
Debug Mode: Enable comprehensive debugging:
Last updated