Studios
Tebexhouse-3.jpg

Examples

SoonTebexQbox
PAGE 05 OF 07  ·  TEBEX SETUP → EXAMPLES → TROUBLESHOOTINGdocs.glitchstudios.dev
Browse docs

A token pack and a membership#

Config.Packages = {
    { type = 'tokens', id = 1234567, name = 'Starter Stash', price = 4.99, tokens = 500 },

    { type = 'membership', id = 1234568, name = 'Insider', price = 19.99, tokens = 1200, xpboosts = 1, popular = true,
      perks = { '5% dealership discount', '+1 character slot' },
      flags = { charslots = 1, discount = 5, verified = true, number = true, plates = true, tvs = 1 } },
}

Replace the ids with your own Tebex package ids and keep the names identical to the Tebex package names.

A one-off vehicle package#

{ type = 'other', id = 1234569, name = 'Starter Car', price = 12.95, grants = {
    { type = 'vehicle', model = 'sultan' },
} },

Products bought with tokens#

Config.Products = {
    { id = 'veh_sultan', cat = 'vehicles', name = 'Sultan', maker = 'Karin', price = 2500, model = 'sultan',
      icon = 'car', featured = true, grant = { type = 'vehicle', model = 'sultan' },
      stats = { 70, 68, 60, 72 }, desc = 'A sedan delivered straight to your garage.' },

    { id = 'lockpick_kit', cat = 'items', name = 'Lockpick x3', price = 150, img = 'lockpick', icon = 'speaker',
      grant = { type = 'item', name = 'lockpick', count = 3 }, desc = 'Three lockpicks for your pockets.' },
}

VIP queue priority#

Call HasPerk from your queue resource while a player connects. It only reads memory, so it is safe to call there:

local hasVip = exports['glitch-tebex']:HasPerk(source, 'vip')

A dealership discount from a membership#

local membership = exports['glitch-tebex']:GetMembership(source)
local discount = 0
if membership and membership.flags.discount then
    discount = membership.flags.discount
end

Block selling a store vehicle#

if exports['glitch-tebex']:IsStoreVehiclePlate(plate) then
    return false, 'Store vehicles cannot be sold.'
end

Move the TV#

Set Config.Debug = true and give yourself the command.tebextv ace. Stand where you want the TV, run /tebextv, then copy the printed line into Config.Screen.tv. If the picture is missing or on the wrong side, try /tebextv flip and /tebextv winding.