Skip to content

config.lua reference

Every option in config.lua, in the same order as the file. config.lua is shared with players’ clients, so never put secrets in it: API keys and webhooks go in server.cfg with set (see Installation). Restart the resource after any change (ensure sl-marketplace).

Option Default What it does
Config.Command 'market' Chat command that opens the marketplace
Config.OpenKey 'F6' Key that opens the marketplace
Config.AdminCommand 'marketadmin' Command for the admin panel (admins only, see Administration)
Config.Debug false Enables /marketdebug and /markettest for admins. Keep false in production
Config.DefaultLang 'en' Language for players who have not chosen one, and for texts not aimed at one player (Discord logs, listing labels, refund notes). Any file in locales/ adds a language

Behaviour of the hook system. Explained in How hooks work.

Option Default What it does
Debug false Prints every hook execution and its duration
SlowWarningMs 100 Warns when a hook takes longer (ms). 0 disables it
TrackMetrics true Keeps counters for /markethandlers
ValidateOnStart true Checks on start that every hook exists
EnableDiagnosticsCommand true Registers the diagnostics command
DiagnosticsCommand 'markethandlers' Its name
GuardFailurePolicy 'deny' If a guard throws an error: 'deny' blocks the action, 'allow' lets it through
DefaultDenyMessage (not set) Fixed message when a guard blocks without a reason. Not set = translated text from locales/
Option Default What it does
Config.ServerFee 0.05 Fee on every sale (5%). Removed from the economy, not given to anyone
Config.MinPrice 10 Minimum price for a listing or a bid
Config.MaxPrice 10000000 Maximum price
Option Default What it does
Config.MaxListingsPerPlayer 10 Active listings per player at the same time
Config.MaxImagesPerListing 4 Photos per listing
Config.PageSize 24 Listings per page in the browser
Config.BannedItems money, black_money Items that can never be listed. Add ['item_name'] = true
Config.InventoryBackend 'auto' 'auto' detects it; 'ox_inventory' or 'esx' force one
Config.BumpCost 500 Cost to push a listing back to the top. 0 = free

Featured listings are pinned at the top for a while.

Option Default What it does
Enabled true Allows featuring
Cost 5000 What the seller pays
DurationHours 24 How long it stays featured

Extra the buyer pays for choosing a delivery mode the seller did not mark as preferred. 0 makes that mode free.

Mode Default Meaning
mailbox 0 Item arrives in the in-game mailbox
meetup 100 Seller has to go to a meetup point
npc 0 The courier fee (NPCDelivery.Cost) is charged on top anyway
person 300 Seller has to meet the buyer in person

Config.RateLimits limits how often each player can do something: max actions every window seconds.

Action Default Limits
photoUpload 8 / 300 s Photo uploads
createListing 3 / 60 s New listings
bid 10 / 60 s Bids
proxyBid 10 / 60 s Proxy maximum changes
buy 10 / 60 s Purchases
message 20 / 60 s Chat messages
bump 1 / 300 s Bumps
meet 6 / 30 s Meeting point actions (propose, accept, cancel)
follow 20 / 60 s Follow / unfollow and seller alerts
deliverySpawn 4 / 60 s Courier van registration retries
deliveryClaim 6 / 30 s Arrival / failure confirmations
deliveryRobbery 8 / 30 s Robbery attempts

Config.Cleanup: old records deleted automatically (checked every hour).

Option Default What it does
CancelledHistoryDays 30 Days to keep cancelled and expired listings
ExpiredMailboxDays 90 Days to keep mailbox entries already collected
Option Default What it does
MinLength 3 Minimum length of a shop name
MaxLength 24 Maximum length
Pattern '^[%w%s_%-%.]+$' Allowed characters (Lua pattern): letters, numbers, spaces, _, - and .

List of hex colours players can pick for their avatar. Add or remove any.

Applies to normal (ascending) auctions.

Option Default What it does
MinDurationMinutes 15 Shortest auction
MaxDurationMinutes 1440 Longest auction (24 h)
MinBidIncrement 50 Minimum raise over the current bid…
MinBidIncrementPercent 0.02 …or this percentage of it, whichever is higher
AntiSnipeSeconds 60 A bid in the last N seconds extends the auction by N seconds
Option Default What it does
Blind.Enabled true Sealed-bid auctions: bids stay hidden until the end
ProxyBidding.Enabled true Automatic bidding up to a maximum
Dutch.Enabled true Price starts high and drops over time
Dutch.MinStepPercent / MaxStepPercent 5 / 25 Range of the drop per interval (%)
Dutch.MinIntervalMinutes / MaxIntervalMinutes 5 / 60 Range of the interval between drops
Dutch.MinFloorRatio 0.10 The floor price must be at least 10% of the starting price
Reverse.Enabled true Buyers post a request and sellers compete
Reverse.MaxDurationMinutes 4320 Longest request (3 days)
Reverse.DepositRequired true The buyer’s maximum is held until the request ends

Tiers shown as coloured badges: common, uncommon, rare, epic, legendary. You can change color, minPrice (minimum price for that tier), label and labels (per language). Do not rename the keys.

Forces the rarity of specific items: ['weapon_pistol'] = 'uncommon'. Items not listed are common.

Categories players can browse: weapons, ammo, food, drinks, drugs, vehicles, tools, materials, electronics, clothes, other. You can change label, labels and icon. Do not rename the keys.

Forces the category of specific items: ['bread'] = 'food'. Categories are detected automatically from your inventory; only add items that are detected wrong.

Option Default What it does
Enabled true Allows listing photos
Provider 'imgbb' Image host. 'imgbb' is free and recommended
ImgbbExpiration 0 How long Imgbb keeps images, in seconds. 0 = forever
Encoding 'jpg' 'jpg' (smaller) or 'png' (better quality)
Quality 0.85 0.0 to 1.0
MaxBase64Length 8 MB Maximum size of an upload

The key goes in server.cfg: set sl_marketplace_imgbb_key "…".

Config.Photo.Camera: free camera used to take photos.

Option Default What it does
MoveSpeed 8.0 Movement speed (units/s)
FastMultiplier 3.0 Multiplier while holding Shift
RotSpeed 4.0 Mouse sensitivity
MoveLerp 12.0 Smoothing (higher = more responsive)
MaxDistance 50.0 Maximum distance from the player
FovDefault / FovMin / FovMax 60 / 20 / 90 Field of view: initial, maximum zoom, minimum zoom
FovStep 5.0 Degrees per scroll step

Config.ItemIcons: images shown on listings without a photo. Tried in order: ox_inventory icons, html/images/<item>.png in the resource, and an external CDN.

Option Default What it does
Enabled true Shows icons
UrlPatterns ox_inventory, then html/images/ Local paths tried in order (%s = item name)
Bitcode.Enabled true Uses the external CDN as a last resort
Bitcode.CategoryMap, FallbackCategories — CDN folders per category
VehicleFallback, WeaponFallback Included images Generic icons for vehicles and weapons

To add an icon, put a 96×96 PNG named after the item in html/images/.

Ring that marks the pickup NPC and in-person meeting points. Its colour comes from the player’s marketplace theme.

Option Default What it does
Radius 1.1 Ring radius (m)
FadeStart / FadeEnd 20.0 / 4.0 Distance where it starts to show / is fully visible
MinAlpha / MaxAlpha 45 / 170 Opacity far / near (0–255; never use 255)
PulseMs 2200 Duration of one pulse
FallbackColor { 168, 255, 62 } Colour until the theme is known
PickupColor, MeetColor nil Set one to force a fixed colour

The timing ring used to force a courier van’s cargo hold.

Option Default What it does
Phases 3 phases Each with duracion (lap time in ms) and arco (width of the target zone in degrees). Default: 1700/58, 1250/42, 950/30
Keys E, Q, R, F Keys the phases use, shuffled each time (control = GTA control ID)
ZoneMin / ZoneMax 110 / 300 Where the target zone can appear (degrees)
Pause 320 Pause between phases (ms)
ResultMs 260 How long the result stays on screen (ms)
LockMovement true Freezes the player’s feet during the minigame
Sounds 4 sounds phase, hit, miss, passed. false = silent
LatencyMs 30 Sync between game and interface; raise it if presses feel early

Easier: raise duracion or arco. Harder: lower them.

Pickup points for the meetup delivery mode. An NPC and a map blip appear at each one.

Field Meaning
id Unique number
coords vector3 position
heading Direction the NPC faces
label Name on the blip and in the interface
sprite, color Blip icon and colour

Four points by default: Downtown LS, Legion Square, Pillbox Hill and Vinewood.

Config.Discord. The webhook goes in server.cfg: set sl_marketplace_discord_webhook "…".

Option Default What it does
Enabled false Sends logs to Discord
Username, Avatar 'Marketplace' Bot name and avatar
Color 0x4cc9f0 Embed colour
Events.listed true New listing
Events.sold true Sale
Events.bid false Bid
Events.cancelled false Cancelled listing
Events.expired false Expired listing
Events.rated true Rating
Events.featured true Featured listing
Events.offer false Price offer

Config.Admin

Option Default What it does
AceGroup 'marketplace.admin' ACE permission for the panel. In server.cfg: add_ace group.admin marketplace.admin allow
Identifiers {} Extra admins by identifier ('license:…', 'steam:…')

Timed discounts a seller can start on their listings.

Option Default What it does
Enabled true Allows flash sales
MinDiscount / MaxDiscount 10 / 70 Discount range (%)
MinDurationMinutes / MaxDurationMinutes 10 / 120 Duration range
Option Default What it does
Enabled true Allows bundles
MinItems / MaxItems 2 / 8 Items per bundle

The courier van that drives the item to the buyer and can be robbed.

Option Default What it does
Enabled true Allows courier delivery
Cost 500 Paid by the buyer
InsuranceCost 0.10 Optional insurance: 10% of the price
InsurancePayout 0.80 If an insured van is robbed or destroyed, the seller still gets 80%
Interceptable true Other players can rob the van
MinValueForIntercept 10 Cheaper orders cannot be robbed
NotifyJob nil Job that gets a notice and blip when a robbable delivery starts (e.g. 'robber')
NotifyJobBlipSprite 67 Blip for that job
MinDistance / MaxDistance 100.0 / 200.0 Distance of the van’s starting point from the buyer (m)
Speed 15.0 Maximum speed (m/s)
DeliveryTimeout 600 Seconds before the delivery fails and the buyer is refunded
ArrivalRadius 10.0 Distance that counts as arrived
IntimidationDistance 6.0 Maximum distance to threaten the driver
ExtractionMinSeconds 1 Minimum time the server accepts between starting and finishing the robbery (anti-cheat)
ExtractionAttempts 3 Tries per player at forcing the cargo hold
ExtractionAnim mini@repair Animation while forcing it. false = none
PoliceAlertOnKill true Killing the driver counts as a robbery (fires OnDeliveryRobbed)
ShowBlipToBuyer true The buyer sees the van on the map
BlipSpriteBuyer 280 That blip
Models.Peds, Models.Vehicles 4 peds, 3 vans Models chosen at random
Option Default What it does
Enabled true Public shop page per seller
MaxPinned 3 Pinned listings
LongDescriptionMaxLen 1500 Characters in the description
BannerAllowed true Sellers can set a banner
Option Default What it does
Enabled true Allows refund requests
WindowDays 7 Days after the purchase to request one
AutoApproveAfterHours 72 Unanswered requests are approved automatically (checked hourly). 0 disables it
AllowForSeller false The seller can start a refund
ServerFeeRefunded true The platform fee is also returned
Option Default What it does
Enabled true Allows the in-person delivery mode
ProximityMeters 3.0 How close both players must be to exchange
LocationRadiusMeters 20.0 Size of the meeting area
TimeoutMinutes 120 Time to complete the trade before it is cancelled and refunded
AllowCustomLocation true Any point on the map (false = only meetup points)
AbandonTimeoutSeconds 60 Time outside the area before the trade is cancelled
MeetRequestTimeoutSeconds 300 Time to answer a meeting proposal
MeetWindowSeconds 600 Time to exchange once both have arrived
Option Default What it does
Enabled true Allows barter listings
AllowMoneyComponent true Proposals can include money
MaxItemsPerProposal 6 Different items per side
DurationMinutes 4320 Lifetime of a barter listing (3 days)

Verified badge, given automatically when a seller meets all three thresholds.

Option Default
Enabled true
MinSales 50
MinRatingAvg 4.5
MinRatingCount 10
Option Default What it does
Enabled true Allows reporting listings
Reasons 8 reasons scam, fraud, fake_item, inappropriate, overpriced, wrong_category, duplicate, other
AutoHideThreshold 5 Open reports that hide a listing until reviewed
Option Default What it does
Enabled true Allows wishlists
MaxPerPlayer 20 Entries per player

Config.Phone

Option Default What it does
Enabled false Registers the marketplace as a phone app
Resource 'lb-phone' Phone resource. Only lb-phone is supported out of the box
Option What it does
Config.Notify(src, msg) Shows a notification to a player. Replace it with your system. Details
Config.OnDeliveryRobbed(thiefSrc, deliveryId, value, trigger) Called when a courier van is robbed. Details