Glitched Scripts
Racing

Economy & permissions

Entry fees, prizes, racing rep, track creators, and admins.

Money flow

EventBehavior
JoinBank charged for entry fee
Host contributionHost bank seeds the pot
Cancel before payoutEntry fees refunded when JoinRefundOnCancel
Disconnect while joined/racingRefund when RefundEntryOnDisconnect
FinishPrize share from pot + optional skill win bonus (system-funded)

Money hooks live in server/edit.lua (GetPlayerMoney, GivePlayerMoney, RemovePlayerMoney, PayOffline).

Reputation

Stored in gs_racing_profiles.racing_rep:

Config.Rep = {
    finish = 5,
    win = 25,
    participate = 2,              -- clawed back if they leave lobby early
    placeBonus = { 15, 10, 5 },   -- 1st / 2nd / 3rd
}

Meetups also grant skill ticks (see Meetups & drift).

OnRacingRepChanged in server/edit.lua fires after DB writes — sync phone skills / metadata here.

Seasonal standings resets

Optional wipe of season standings (racing_rep, wins, races_completed) on a calendar schedule. When enabled, the Standings tab shows when the next season starts.

Config.SeasonalStandings = {
    enabled = false,
    interval = { months = 3 }, -- exactly one of: days, months, years
    wipeTrackTimes = false,    -- also clear gs_racing_results
    announce = true,           -- OnRacingAnnouncement kind = 'season'
}
OptionMeaning
enabledMaster toggle
intervalSeason length — set one of days, months, or years
wipeTrackTimesAlso delete course timesheets (gs_racing_results)
announceMail/push via OnRacingAnnouncement when a wipe runs

On first startup with enabled = true, the season start is auto-anchored in the DB (no wipe). Later boundaries wipe automatically. Admins can force a wipe with /racingseasonwipe.

Full option notes: shared/config.lua → Seasonal standings.

Skill win bonus

Extra podium % paid by the system (not from the pot):

Config.SkillWinBonusTiers = {
    { minRep = 100, bonus = 5 },
    { minRep = 400, bonus = 10 },
    { minRep = 1000, bonus = 15 },
    { minRep = 2000, bonus = 20 },
}

Export: exports['gs_racing']:GetSkillWinBonusPercent(source)

Track creation permission

Config.TrackCreateMinRep = 100
Config.TrackCreatorWhitelist = {
    -- 'citizenid_or_esx_identifier',
}
Config.RequireVerifiedTrackToHost = false

Bypass rep gate: admins, whitelist, or rows in gs_racing_creators (managed in Admin UI).

Racing admins

Someone is a racing admin if any of:

  1. ACE permission Config.AdminAce (default 'admin') — also checks command / admin
  2. Framework admin/god/mod (QB) or admin/superadmin (ESX)
  3. Identifier in Config.AdminIdentifiers
Config.AdminAce = 'admin'
Config.AdminIdentifiers = {
    -- 'CITIZENID_or_ESX_identifier',
}

Stewards tablet tools (verify courses, live lobbies, builders): Stewards (admin).

Illegal tunes

HasIllegalTune(plate) in server/edit.lua defaults to always legal. Hook your mechanic resource to block race joins when a plate is illegally tuned.

On this page