Studios
Tebexhouse-3.jpg

Commands & Exports

SoonTebexQbox
PAGE 07 OF 07  ·  TROUBLESHOOTING → COMMANDS & EXPORTSdocs.glitchstudios.dev
Browse docs

Commands#

Command Who What
/tebex Everyone Opens the store on screen near the TV, or sets a waypoint to it. The name comes from Config.Command
/tebexclaim Everyone Retries rewards that did not fit. Once every 10 seconds
/tebexorders command.tebexorders Lists staff orders that are waiting
/tebexdone <id> command.tebexdone Marks a staff order as delivered
/glitchtokens_give <server id or fivem id> <amount> [note] command.glitchtokens_give Gives tokens, or takes them with a negative amount
/tebextv command.tebextv, needs Config.Debug Prints the TV placement. The flip and winding arguments test the glass side and triangle order

The Tebex package commands (glitchpackage, glitchpackage_remove, glitchmembership_end, glitchtokens_add, glitchtokens_remove, glitchperk_add, glitchperk_remove) are restricted to the console and to players with the matching command ace. They are covered under Tebex Setup.

Server exports#

Export Returns
HasPerk(source, 'vip') True while the player has VIP queue priority. Reads memory only
GetMembership(who) { name, expires, flags } for an active tier, or nil. who is a server id or a fivem: identifier
HasMembershipPerk(who, flag) True while the active tier has that flag
IsStoreVehicleId(id) True for a vehicle id bought from the store
IsStoreVehiclePlate(plate) True for a plate on a store vehicle
IsStoreVehicleEntity(entity) True for a store vehicle entity
GetSupporterTVs(who) { allowed, list } where list holds { dbid, citizenid } rows
AddSupporterTV(who, citizenid, dbid, by) Records a supporter TV. Returns a boolean
RemoveSupporterTV(dbid) Removes the record, and the TV through glitch-audioProps. Returns a boolean
useXPBoostItem The ox_inventory use export for the XP boost item. It is wired up in the item definition

Client exports#

None. The resource only calls other resources' exports.

Events#

Event Side What it does
glitch-tebex:balance Client Server to client. Sends the player's new token balance to the page
glitch-tebex:server:spawned Server Sent by the client when the player is in the city, so waiting claims are delivered then

These are internal. Use the exports above to read store state instead.

Callbacks#

These serve the store page and are rate limited per player. They are not meant to be called by other resources.

Callback Side Purpose
glitch-tebex:account Server Balance, perks and membership for the page
glitch-tebex:vehicles Server The player's vehicles for the Plate Studio
glitch-tebex:buy Server Buys a product with tokens
glitch-tebex:useBoost Server Starts an XP boost from a My account credit
glitch-tebex:usePlate Server Uses a plate change
glitch-tebex:confirmXPBoost Client Shows the XP boost confirm dialog

Database tables#

glitch_tebex_accounts, glitch_tebex_credits, glitch_tebex_orders, glitch_tebex_perks, glitch_tebex_memberships, glitch_tebex_verified, glitch_tebex_tvs, glitch_tebex_claims and glitch_tebex_vehicles.

Item#

xpboost, defined in install/items.txt. Using it asks the player to confirm, takes the item and starts the server-wide boost from Config.XPBoost.