Browse docs
Custom Rewards
Overview
Daily Rewards can send custom daily, streak, and randomized rewards to Functions.GiveCustomReward inside sky_base/config/sv_functions.lua.
Use this hook for rewards that are not handled by the default item, money, weapon, coin, or vehicle integrations.
Reward Structure
Every custom reward uses the same reward table structure:
{
label = "Pet Dog",
sort = "pet",
name = "dog",
amount = 1,
img = "dog.png"
}
| Key | Description |
|---|---|
label | Display name shown to the player. |
sort | Custom reward type. Use this value in GiveCustomReward to decide what should happen. |
name | Internal reward name, item name, vehicle model, pet id, or any identifier your integration needs. |
amount | Amount to give. |
img | Image used in the UI or configurator. |
Server Hook
Add your custom delivery logic in sky_base/config/sv_functions.lua:
sky_base/config/sv_functions.lua
function Functions.GiveCustomReward(source, reward)
if reward.sort == "pet" then
exports["some_petscript"]:GivePet(source, reward.name, reward.amount)
return
end
if reward.sort == "ticket" then
exports["some_ticket_script"]:GiveTicket(source, reward.name, reward.amount)
return
end
end
Keep custom reward logic server-side. The
source argument is the player receiving the reward.Config Example
Create a Daily Rewards reward with the same sort value:
{
label = "Daily Mystery Ticket",
sort = "ticket",
name = "mystery_ticket",
amount = 1,
img = "mystery_ticket.png"
}
The
sort value in the reward config must match the value you check in Functions.GiveCustomReward.