Tiers
Overview
Export Usage
exports['Loyalty']:GetPlayerTier(playerId, function(success, tier)
-- Your code here
end)Parameters
Example Implementations
1. Basic Shop Discount System
-- In your shop script
function CalculatePrice(playerId, basePrice)
exports['Loyalty']:GetPlayerTier(playerId, function(success, tier)
if not success then
return basePrice -- No discount if error
end
local discount = 0
if tier == "Silver" then
discount = 0.05 -- 5% discount
elseif tier == "Gold" then
discount = 0.10 -- 10% discount
elseif tier == "Platinum" then
discount = 0.15 -- 15% discount
end
return basePrice * (1 - discount)
end)
end2. VIP Area Access
3. Special Item Access
Important Notes
Tier Thresholds
Last updated