> For the complete documentation index, see [llms.txt](https://codebyrave.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://codebyrave.gitbook.io/docs/free-resources/cr-bonus-claim/configuration/config.md).

# Config

## Intruction&#x20;

{% hint style="warning" %}
Config.Framework: framework u server runs
{% endhint %}

{% hint style="success" %}
Config.MoneyAmount: set amount of money or bank, ect.
{% endhint %}

{% hint style="success" %}
Config.MoneyAccount: which payment methods players get on their account.
{% endhint %}

```
---------------------------------------------
-- ClaimBonus Configuration
-- By CodebyRave
---------------------------------------------

Config = {}

Config.Locale = "en-GB"                 -- Timezone: server 'locales'

-- General settings
Config.UseOxMySQL = true                -- true = oxmysql, false = mysql-async
Config.Framework = "esx"                -- "qbcore" | "esx" | "none"

-- Bonus settings
Config.MoneyAmount = 25000              -- Amount of bonus money
Config.MoneyAccount = "bank"            -- QBCore/ESX account: "bank", "cash", "money", etc.

-- Commands
Config.Commands = {
    Claim = {
        name = "claimbonus",
        description = "Claim your bonus reward.",
        args = {} 
    },
    Reset = {
        name = "resetbonus",
        description = "Reset another player's bonus. (Admin only)",
        args = {
            { name = "id", help = "Target player ID" }
        }
    },
    Check = {
        name = "checkbonus",
        description = "Check the bonus info of a player.",
        args = {
            { name = "id", help = "Target player ID" }
        }
    }
}

Config.Notify = {
    Type = "auto" -- options: "auto" | "esx" | "qbcore" | "okok" | "ox" | "wasabi" | "codem" | "gta" | "chat"
}

-- Messages
Config.Messages = {
    ClaimedSuccess   = "You have successfully received $%s %s!",
    AlreadyClaimed   = "You have already claimed your bonus.",
    ErrorGiveMoney   = "An error occurred while giving the bonus.",
    ErrorIdentifier  = "Failed to retrieve player ID.",
    ResetNoId        = "Usage: /resetbonus <id>",
    ResetSuccess     = "Bonus has been reset for player: %s",
    ResetNotify      = "A admin has made your bonus available again.",
    InvalidPlayer    = "Invalid player ID.",
    CheckNoId        = "Usage: /checkbonus <id>",
    Claimed          = "Claimed",
    NotClaimed       = "Not claimed",
    NoPermission     = "You do not have permission to use this command.",
}

-- Scaleform notification configuration
Config.Scaleforms = {
    success = {
        title = "BONUS CLAIMED!",
        message = "You received $%s %s on your account!",
        duration = 6000,
        color = {0, 255, 0, 255},
        sound = { name = "PROPERTY_PURCHASE", set = "HUD_AWARDS" }
    },
    already = {
        title = "ALREADY CLAIMED",
        message = "You have already claimed your bonus.",
        duration = 4000,
        color = {255, 255, 0, 255},
        sound = { name = "ERROR", set = "HUD_FRONTEND_DEFAULT_SOUNDSET" }
    },
    error = {
        title = "ERROR",
        message = "Something went wrong while claiming your bonus.",
        duration = 5000,
        color = {255, 0, 0, 255},
        sound = { name = "Bed", set = "HUD_FRONTEND_DEFAULT_SOUNDSET" }
    }
}

-- Menu Settings
Config.Menu = {
    Title = "**Bonus** Check: %s",
    Description = "View this player's bonus information below:",
    StatusLabels = { 
        Claimed = "Bonus already claimed!",
        NotClaimed = "Bonus not yet claimed!"
    },
    Options = {
        { title = "Player Name", description = "{{name}}", icon = "fa-solid fa-user" },
        { title = "Identifier",  description = "{{identifier}}", icon = "fa-solid fa-id-card" },
        { title = "Status",      description = "{{status}}", icon = "fa-solid fa-circle-info" },
        { title = "Claim Date",  description = "{{date}}", icon = "fa-solid fa-clock" },
        { title = "Bonus Amount", description = "{{amount}} {{account}}", icon = "fa-solid fa-money-bill-wave" }
    }
}

-- Discord logging
Config.Discord = {
    Enabled = true,
    Webhook = "https://discord.com/api/webhooks/YOUR-WEBHOOK-HERE",
    Username = "CR_ClaimBonus Logs",
    Avatar = "https://i.imgur.com/yourlogo.png",
    Color = 65280 -- green
}

-- Discord templates (optional)
Config.DiscordMessages = {
    Claimed = {
        title = "Bonus Claimed!",
        msg = "**%s** has claimed a bonus of $**%s %s**.",
        color = 65280
    },
    DoubleClaim = {
        title = "Double Claim Attempt",
        msg = "**%s** tried to claim again.",
        color = 16776960
    },
    PayoutError = {
        title = "Payout Error",
        msg = "Something went wrong while paying out **%s**.",
        color = 16711680
    },
    Reset = {
        title = "Bonus Reset",
        msg = "**%s** has reset the bonus for **%s**.",
        color = 255
    },
    Check = {
        title = "Bonus Check Performed",
        msg = "**%s** checked bonus info for **%s** | Status: **%s** | Date: **%s**",
        color = 3447003
    }
}

```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://codebyrave.gitbook.io/docs/free-resources/cr-bonus-claim/configuration/config.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
