New Category
Step 1 — Declare the category
Config.Categories = {
{name = "tokens", label = "Tokens"},
{name = "vip", label = "VIP"},
{name = "vehicles", label = "Vehicles"},
-- ...
{name = "services", label = "Services"}, -- 👈 new
}Step 2 — Write the reward handler
RegisterReward('services', function(payload)
local src = payload.recipient -- always deliver to the recipient
local product = payload.product -- the product's "value"
local info = payload.info -- full product table + custom fields
-- Example: grant a perk based on a custom "amount" field
local amount = tonumber(info['amount']) or 1
local ok = SomeExport:grantService(src, product, amount)
return ok and true or false -- false = refund, no charge
end)Step 3 — Add products
Step 4 — Test
Checklist
Last updated