Reputation
Driver standing, bonus pay, Standing page, and the leaderboard.
Standing is a number per character in gs_trucking_reputation. The key is GetxPlayerIdentifier (QB/Qbox citizenid, ESX identifier). If no MySQL resource is running, reputation is turned off at start and these settings do nothing.
Config.Reputation = {
Enable = true,
MaxReputation = 1000, -- never above this. floor is always 0
UnFinished = { 3, 6 }, -- removed on cancel, timeout, destroyed trailer, too far
Finished = 2, -- added on a legal dropoff
FinishedIllegal = { 2, 4 }, -- added on an illegal dropoff
BonusPay = { 18, 22 }, -- extra percent of payout. 0 = no bonus
HideJobs = false, -- true = omit locked jobs from the list
Leaderboard = 10, -- rows on Standing. false or 0 hides it. max 25
}Any of UnFinished, Finished, FinishedIllegal, and BonusPay can be a single number or { min, max } (rolled each time).
Jobs still gate with requiredReputation on the load. With HideJobs = false (default) the card shows as locked. With true, players who cannot start it never see it.
Starting a second job is blocked while one is active (job_active). Cancel from the trucking app or the depot ped instead.
Bonus pay
On a successful dropoff, if BonusPay is greater than 0:
bonus = math.floor(payout * (reputation / MaxReputation) * (BonusPay / 100) + 0.5)reputation is standing before this job's Finished / FinishedIllegal is added. Example: payout 1800, standing 500/1000, bonus 20 → $180 extra, total $1980.
Legal jobs pay bank. Illegal jobs pay crypto (QB/Qbox) or black_money (ESX). Change accounts in GivePlayerMoney.
Standing page
The app Standing page shows current / max reputation and locale help text.


The leaderboard is the top Leaderboard rows by standing. Names come from GetCharacterDisplayName in server/edit.lua: online character name first, then a players / users query. If that returns nil, the UI shows a generic driver label. Offline people still appear if they have a row in gs_trucking_reputation.
Hooks
Order after a successful dropoff: pay → custom-job finished → add standing → AddedPlayerReputation → JobCompleted (with the new total).
function AddedPlayerReputation(source, added, total)
-- notify is already fired here
end
function RemovedPlayerReputation(source, removed, total) end
function JobCompleted(source, job)
-- job.id, job.name, job.description, job.icon, job.illegal
-- job.dropoff, job.coords, job.payout, job.identifier
-- job.reputation = new total, or nil if reputation is off
endUse JobCompleted for logs or other resources. Optional QBCore jobrep metadata lines are commented in the reputation hooks. Do not put a Discord webhook URL in this file if clients can read it. JobCompleted lives in server/edit.lua only.
