This document describes all configuration options for the DevHub Truck robbery resource.
Shared Configuration (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)
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 ped
mp_f_freemode_01: Female freemode ped
Customization: Add more ped models to increase NPC variety.
Server Configuration (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.
Config.PedModels = {
"mp_m_freemode_01",
"mp_f_freemode_01",
"s_m_m_armoured_01", -- Security guard
"s_m_m_autoshop_01", -- Mechanic
"a_m_m_business_01", -- Business person
}
function TriggerAlarm(coords)
-- Notify all online police officers
local xPlayers = ESX.GetExtendedPlayers('job', 'police')
for _, xPlayer in pairs(xPlayers) do
xPlayer.showNotification('Truck robbery in progress!')
-- Create a blip on the map
TriggerClientEvent('devhub_truckRobbery:createAlarmBlip', xPlayer.source, coords)
end
-- Send to dispatch system (example)
-- TriggerEvent('your_dispatch:sendAlert', {
-- coords = coords,
-- type = 'truck_robbery',
-- message = 'Truck robbery in progress'
-- })
end