πŸ”₯All scripts on our website are 50% off!πŸ”₯
Logo

Trigger

Open Menu

To open the daily rewards menu from another script or resource, use the following trigger:

TriggerClientEvent('bit-rewards:open')

Usage Examples

From Server Side

RegisterCommand('openrewards', function(source, args, rawCommand)
    TriggerClientEvent('bit-rewards:open', source)
end, false)

From Client Side

RegisterCommand('myrewards', function()
    TriggerEvent('bit-rewards:open')
end, false)

With Target System

You can integrate the rewards menu with your target system:

-- Example with qb-target
exports['qb-target']:AddBoxZone("daily_rewards", vector3(0, 0, 0), 1.0, 1.0, {
    name = "daily_rewards",
    heading = 0,
    debugPoly = false,
    minZ = 0,
    maxZ = 2,
}, {
    options = {
        {
            type = "client",
            event = "bit-rewards:open",
            icon = "fas fa-gift",
            label = "Daily Rewards",
        }
    },
    distance = 2.5
})

With NPC Interaction

You can add an NPC that opens the rewards menu:

-- Example NPC setup
local rewardsNPC = {
    model = "a_m_m_business_01",
    coords = vector4(0, 0, 0, 0),
    scenario = "WORLD_HUMAN_CLIPBOARD"
}

-- When player interacts with NPC
TriggerEvent('bit-rewards:open')

Default Command

The script includes a default command that can be configured in the configuration file:

Config.command = "rewards"

Players can use /rewards in chat to open the menu.