❓Common Questions
m-TruckerSimulator - FAQ & Common Questions
Frequently Asked Questions and solutions to common issues.
Installation & Setup
How do I install the script?
Extract the
m-TruckerSimulatorfolder to your server'sresourcesfolderAdd
ensure m-TruckerSimulatorto yourserver.cfgConfigure
config.luawith your preferred settingsRestart your server
The SQL tables will be created automatically on first start (if
Config.InstallDatabase = true)
The script won't start, what should I check?
Ensure you have
ox_libandoxmysqlinstalled and started before m-TruckerSimulatorCheck your
server.cfgorder:ensure ox_lib ensure oxmysql ensure m-TruckerSimulatorVerify your database connection in your main server config
Check server console for error messages
How do I configure for my framework?
The script auto-detects ESX and QBCore by default. To manually set:
Config.Framework = 'qbcore' -- or 'esx'
Config.Inventory = 'ox_inventory' -- or 'qb_inventory'
Config.Target = 'ox_target' -- or 'qb_target'Leave empty ('') for automatic detection.
Bridge System & Compatibility
My server uses custom vehicle keys, how do I add support?
Set
Config.VehicleKeys = 'custom'inconfig.luaEdit
bridge/client/vehiclekeys/custom.luaReplace the
GiveKeysfunction with your system's code
Example:
function VehicleKeys.GiveKeys(plate)
exports['my-vehiclekeys']:giveKeys(plate)
endMy fuel system isn't detected
Check if your fuel system is in the auto-detect list: LegacyFuel, ox_fuel, ps-fuel, cdn-fuel
If not, set
Config.Fuel = 'custom'and editbridge/client/fuel/custom.luaUpdate the
SetFuelfunction:
function Fuel.SetFuel(vehicle, fuel)
exports['my-fuel']:setFuel(vehicle, fuel)
endCan I use a custom target system?
Yes! Set Config.Target = 'custom' and edit bridge/client/target/custom.lua with your target system's exports.
Can I use a custom inventory?
Yes! Set Config.Inventory = 'custom' and edit bridge/server/inventory/custom.lua with your inventory's functions.
Gameplay Issues
Players can't see the trucker depot blip
Check that the blip is enabled in config.lua:
Config.NPCLocation.blip.enabled = trueAlso verify the coordinates are correct for your map.
Jobs aren't paying correctly
Check
Config.Paymentsettings inconfig.luaVerify your framework's money functions are working
Check if any other scripts are interfering with money transactions
Enable
Config.Debug = trueto see payment calculations in console
Vehicle spawns underground or in wrong location
Update the spawn coordinates in config.lua:
Config.GarageSystem = {
spawnLocation = vector4(x, y, z, h),
}Use /coords or a similar command to get precise coordinates.
Hired drivers aren't generating income
Check that drivers are status "working" in database
Verify
Config.Drivers.jobIntervalis set correctlyCheck server console for any SQL errors
Ensure the driver has a valid assigned vehicle
Features & Customization
How do I change job payment amounts?
Edit config.lua:
Config.JobSettings = {
baseReward = 1000, -- Base reward per job
distanceMultiplier = 500, -- $ per km of distance
depositPercentage = 0.1, -- 10% of the reward as a deposit Percentage
xpPerKm = 10, -- XP gained per km traveled
}How do I add new cargo types?
Edit the cargo table in config.lua:
Config.CargoTypes = {
{
name = 'Standard Cargo',
trailer = 'trailers',
icon = 'fa-box',
skillRequired = nil,
levelRequired = nil,
rewardMultiplier = 1.0,
weight = 30 -- Probability of appearance
},
}How do I add new achievements?
Add to Config.Achievements in config.lua:
{
id = 'first_delivery',
name = 'First Delivery',
description = 'Complete your first delivery',
icon = 'fa-truck',
category = 'Beginner',
requirement = 1,
type = 'jobs_completed',
reward = {money = 5000, xp = 100}
}How do I change vehicle prices?
Edit Config.Vehicles in config.lua:
Config.Vehicles = {
{
name = 'Hauler',
model = 'hauler',
category = 'Semi-Truck',
price = 25000,
levelRequired = 0,
description = 'Professional semi-truck for long-distance freight.',
specs = {
capacity = '2500kg',
speed = 'Medium',
handling = 'Poor'
},
image = 'https://docs.fivem.net/vehicles/hauler.webp'
},
}Party System
Party invites aren't working
Check that both players are online
Verify the target player isn't already in a party
Ensure
Config.Party.enabled = truein config.luaCheck for any client-side console errors
Party members not receiving shared XP
Verify Config.Party.sharedXP = true and check the share percentage:
Config.Party = {
sharedXP = true,
bonusPerMember = 0.5 -- Reward bonus for each additional party member (percentage)
}Exports & Integration
How do I give a player XP from another script?
exports['m-TruckerSimulator']:AddPlayerXP(source, nil, 500)How do I check if a player is on a job?
local hasJob = exports['m-TruckerSimulator']:HasActiveJob(source)
if hasJob then
print("Player is busy")
endHow do I get a player's level?
local data = exports['m-TruckerSimulator']:GetPlayerTruckerData(source)
if data then
print("Player level: " .. data.level)
endLocalization
How do I add a new language?
Create a new file in
locales/(e.g.,de.lua)Copy the structure from
locales/en.luaTranslate all strings
Set
Config.Locale = 'de'inconfig.lua
Error Messages
[m-Trucker] No framework detected!
[m-Trucker] No framework detected!Install ESX or QBCore
Ensure it's started before m-TruckerSimulator
Check that the framework resource name matches (qb-core, qbx_core, or es_extended)
[m-Trucker] No target system detected!
[m-Trucker] No target system detected!Install ox_target or qb-target
Ensure it's started before m-TruckerSimulator
Or set
Config.UseTarget = falseto use DrawText instead
[m-Trucker] No inventory system detected!
[m-Trucker] No inventory system detected!Install ox_inventory or qb-inventory
Ensure it's started before m-TruckerSimulator
Check that the inventory resource name is correct
attempt to index a nil value (global 'VehicleKeys')
attempt to index a nil value (global 'VehicleKeys')The vehicle keys bridge failed to load:
Install a supported vehicle keys system
Or set
Config.VehicleKeys = 'none'if you don't use vehicle keysCheck that the vehicle keys resource is started
SQL errors on startup
Ensure oxmysql is installed and started
Check your database credentials
Set
Config.InstallDatabase = truefor first-time setupManually import
trucker.sqlif auto-install fails
Last updated