Listen to these server events to track user interactions
These events are only available for v1.2.3+
--- Succefully claimed the coins with transaction Id
---@param source number
---@param license string
---@param code string @The code/txid that was redeemed
---@param reward string @Amount of coins the user received
AddEventHandler("LuxuVipShop:logs:RedeemCode", function(source, license, code, reward) end)
--- When a player has opened a mystery box
---@param source number
---@param license string
---@param reward_type string
---@param reward_amount number
---@param reward_value number
---@param reward_raw table @The raw reward object
AddEventHandler("LuxuVipShop:logs:OpenMysteryBox", function(source, license, reward_type, reward_amount, reward_value, reward_raw)
-- print(source)
-- print(license)
-- print(reward_type)
-- print(reward_amount)
-- print(reward_value)
-- print(json.encode(reward_raw, { indent = true }))
end)
--- Purchase successful
---@param source number
---@param license string
---@param item StoreItem @Check product_types.lua for the structure
---@param userFinalBalance number
AddEventHandler("LuxuVipShop:logs:Purchase", function(source, license, item, userFinalBalance)
-- print(json.encode(item, { indent = true }))
end)
--- Item transfer successful
---@param source number
---@param license string
---@param item StoreItem @Check product_types.lua for the structure
---@param targetSource number
---@param targetLicense string
AddEventHandler("LuxuVipShop:logs:Transfer", function(source, license, item, targetSource, targetLicense)
-- print(json.encode(item, { indent = true }))
end)