Skip to content

10. Store (Tebex)

The STORE button opens this. Nothing here charges anybody — it is a shop window onto your Tebex store, and an entitlement exists once the grant is written. The command to paste into each package is in README.md.

Option Notes
enabled Off, and the STORE button shows Config.InfoPanels.store instead
url Shown on screen and copied by COPY LINK. A FiveM client cannot be made to open a browser
currencySymbol
note Small print under the packages
Option Notes
enabled Sync names and prices from the Plugin API, so this screen cannot drift out of step with the webstore
secret Leave empty. Put it in server.cfg: set nuggs_tebex_secret "xxxxxxxx-…". sv_tebexSecret is read too, so a server already running the official tebex resource or txAdmin needs nothing extra
refreshSeconds How often packages (and payments) are pulled again
autoDeliver Deliver purchases ourselves instead of waiting for Tebex to run a command

On autoDeliver. Tebex only delivers if you attached a command to the package, and an ONLINE command that fires while the buyer is offline is lost. With this on, the recent payment list is read (a read — it drains no queue) and matched against each player as they reach the character screen.

Safe alongside Tebex’s own command: every grant is keyed on the transaction id and that column is UNIQUE, so the two routes cannot pay out twice for one purchase. For this to find anything, the package’s webstore id must be the tebexId of an entry in packages.

Field Notes
id Internal key, referenced by a tier’s store
tebexId Package id on the webstore. Leave it 0 and the values below are used as written
kind "tier" sells a membership, "slots" sells characters alone
tier For kind = "tier", which tier id it grants
slots For kind = "slots", how many
days Subscription length. Pass the same number to the grant command so the tier lapses if the sub is cancelled
name / price / blurb / features / badge Card copy

A permanent slot has to cost more than a month of the membership that includes the same slot, or the membership is dead on arrival. The shipped numbers are set so a permanent pack pays for itself after two to three months — 15 for one slot against 6 a month for bronze, 35 for three against 18 a month for gold. Keep that gap whatever you change them to.