# See the Config

## CONFIG.LUA

```lua
Config = {}


-- ░██████╗░███████╗███╗░░██╗███████╗██████╗░░█████╗░██╗░░░░░
-- ██╔════╝░██╔════╝████╗░██║██╔════╝██╔══██╗██╔══██╗██║░░░░░
-- ██║░░██╗░█████╗░░██╔██╗██║█████╗░░██████╔╝███████║██║░░░░░
-- ██║░░╚██╗██╔══╝░░██║╚████║██╔══╝░░██╔══██╗██╔══██║██║░░░░░
-- ╚██████╔╝███████╗██║░╚███║███████╗██║░░██║██║░░██║███████╗
-- ░╚═════╝░╚══════╝╚═╝░░╚══╝╚══════╝╚═╝░░╚═╝╚═╝░░╚═╝╚══════╝

Config.Language = 'en' -- default: en/de  || more options in language.lua
Config.Debug = false -- enable debug mode true/false (will print debug messages in console)
Config.SQL = 'oxmysql' -- sql usage (mysql-async/oxmysql)
Config.Month = 12 -- dont touch this (month of the year)
Config.requiredPlaytime = 3 -- required playtime in hours to open the advent_calendar (if you want to disable this, set it to 0)
Config.Command = "advent" -- command to open the UI
Config.missedDays = true -- enable missed days true/false (if enabled, players can open the advent calendar for missed days)
Config.RewardType = "random" -- reward type (static or random) , static = reward based on day, random = random reward from the list below
Config.Item = { -- you can add advent calendar as item, so player can use item to open the UI 
    enable = true, -- enable item true/false
    name = 'adventcalendar', -- item name
    label = 'Advent Calendar', -- item label
}

-- ██████╗░░█████╗░░██████╗██╗████████╗██╗░█████╗░███╗░░██╗
-- ██╔══██╗██╔══██╗██╔════╝██║╚══██╔══╝██║██╔══██╗████╗░██║
-- ██████╔╝██║░░██║╚█████╗░██║░░░██║░░░██║██║░░██║██╔██╗██║
-- ██╔═══╝░██║░░██║░╚═══██╗██║░░░██║░░░██║██║░░██║██║╚████║
-- ██║░░░░░╚█████╔╝██████╔╝██║░░░██║░░░██║╚█████╔╝██║░╚███║
-- ╚═╝░░░░░░╚════╝░╚═════╝░╚═╝░░░╚═╝░░░╚═╝░╚════╝░╚═╝░░╚══╝

Config.Coords = {
    ["Spot 1"] = { -- dont use same name twice (copy paste and change values to make more spots)
        coords = vec3(-83.93, -835.70, 39.0), -- coords where DAILY Rewards Spot + the marker and blip will be

        marker = { -- marker settings
            enable = true, -- enable marker true/false
            type = 1, -- marker type , check https://docs.fivem.net/docs/game-references/markers/ for more info about marker types
            size = { -- marker size
                x = 1.0, -- x = width
                y = 1.0, -- y = length 
                z = 1.0, -- z = height
            },

            color = { -- marker color, color picker: https://www.w3schools.com/colors/colors_picker.asp
                r = 255, -- r = red
                g = 204, -- g = green
                b = 0, -- b = blue
                a = 100, -- a = alpha (transparency)
            },
        },

        blip = { -- blip settings
            enable = true, -- enable blip true/false
            sprite = 781, -- blip sprite , check https://docs.fivem.net/docs/game-references/blips/ for more info about blip sprites
            color = 5, -- blip color , check https://docs.fivem.net/docs/game-references/blips/ for more info about blip colors
            scale = 1.0, -- blip scale / size
            name = 'DAILY REWARD', -- blip name (will be shown on map)
        },

        npc = { -- npc settings
            enable = true, -- enable npc true/false
            model = 'a_m_y_skater_01', -- npc model , check https://wiki.rage.mp/index.php?title=Peds for more info about peds
            coords = vec3(-83.93, -835.70, 39.6), -- npc coords
            heading = 150.23, -- npc heading
        },

    },

}



-- ██████╗░███████╗░██╗░░░░░░░██╗░█████╗░██████╗░██████╗░░██████╗
-- ██╔══██╗██╔════╝░██║░░██╗░░██║██╔══██╗██╔══██╗██╔══██╗██╔════╝
-- ██████╔╝█████╗░░░╚██╗████╗██╔╝███████║██████╔╝██║░░██║╚█████╗░
-- ██╔══██╗██╔══╝░░░░████╔═████║░██╔══██║██╔══██╗██║░░██║░╚═══██╗
-- ██║░░██║███████╗░░╚██╔╝░╚██╔╝░██║░░██║██║░░██║██████╔╝██████╔╝
-- ╚═╝░░╚═╝╚══════╝░░░╚═╝░░░╚═╝░░╚═╝░░╚═╝╚═╝░░╚═╝╚═════╝░╚═════╝░


Config.Rewards = { -- rewards can be unlimited, when using random reward type, the script will choose a random reward from the list below (in static reward type, the script will choose the reward based on the day)

    [1] = { -- day 1 reward (item example)
        type = 'item', -- reward type (item, money, weapon, vehicle)
        name = 'bread', -- item name, weapon name, vehicle name or money type (cash, bank, black_money)
        amount = 1, -- item amount, money amount, weapon ammo, vehicle amount
        label = 'Bread', -- Label , the text that will be shown in the UI
    },

    [2] = { -- day 2 reward (money example)
        type = 'money', 
        name = 'cash', -- cash = money on hand, bank = money in bank, black_money = dirty money
        amount = 1000, -- amount of money
        label = ' $ Cash', -- Label , the text that will be shown in the UI
    },

    [3] = { -- day 3 reward (weapon example)
        type = 'weapon', 
        name = 'WEAPON_PISTOL', -- weapon name
        amount = 50, -- ammo 
        label = 'AMMO PISTOL', -- Label , the text that will be shown in the UI
    },

    [4] = { -- day 4 reward (vehicle example)
        type = 'vehicle',  
        name = 'adder', -- car name
        amount = 1, -- amount of cars
        label = 'ADDER', -- Label , the text that will be shown in the UI
    },

}


-- ██████╗░░█████╗░████████╗░█████╗░██████╗░░█████╗░░██████╗███████╗
-- ██╔══██╗██╔══██╗╚══██╔══╝██╔══██╗██╔══██╗██╔══██╗██╔════╝██╔════╝
-- ██║░░██║███████║░░░██║░░░███████║██████╦╝███████║╚█████╗░█████╗░░
-- ██║░░██║██╔══██║░░░██║░░░██╔══██║██╔══██╗██╔══██║░╚═══██╗██╔══╝░░
-- ██████╔╝██║░░██║░░░██║░░░██║░░██║██████╦╝██║░░██║██████╔╝███████╗
-- ╚═════╝░╚═╝░░╚═╝░░░╚═╝░░░╚═╝░░╚═╝╚═════╝░╚═╝░░╚═╝╚═════╝░╚══════╝


Config.vehicleSQL = {
    tableName = 'owned_vehicles', -- table name in database
    plateColumn = 'plate', -- column name for plate
    ownerColumn = 'owner', -- column name for owner
}




-- ████████╗██████╗░██╗░██████╗░░██████╗░███████╗██████╗░░██████╗
-- ╚══██╔══╝██╔══██╗██║██╔════╝░██╔════╝░██╔════╝██╔══██╗██╔════╝
-- ░░░██║░░░██████╔╝██║██║░░██╗░██║░░██╗░█████╗░░██████╔╝╚█████╗░
-- ░░░██║░░░██╔══██╗██║██║░░╚██╗██║░░╚██╗██╔══╝░░██╔══██╗░╚═══██╗
-- ░░░██║░░░██║░░██║██║╚██████╔╝╚██████╔╝███████╗██║░░██║██████╔╝
-- ░░░╚═╝░░░╚═╝░░╚═╝╚═╝░╚═════╝░░╚═════╝░╚══════╝╚═╝░░╚═╝╚═════╝░

-- Change trigger events to your own framework or script (if you dont know what you are doing, dont touch this)

function clientNotify(message)
    TriggerEvent("esx:showNotification", message)
end

function serverNotify(source, message)
    TriggerClientEvent("esx:showNotification", source, message)
end


function debug(msg)
    if Config.Debug then
        print(('^3[NKN-ADVENT]^0 %s'):format(msg))
    end
end


Config.Triggers = {
    playerLoaded = 'esx:playerLoaded', -- player loaded event
    playerDropped = 'playerDropped', -- player dropped event
}
```

## LANGUAGE.LUA

```lua
local languages = {
    ['en'] = {
        ['pressE'] = "Press ~INPUT_CONTEXT~ to open the rewards menu", -- message when player is near the marker
        ['cantOpenToday'] = "You cant open this door today", -- message when player cant open the door today
        ['claimedAllRewards'] = "You already claimed all rewards", -- message when player already claimed all rewards
        ['alreadyClaimed'] = "You already claimed this reward", -- message when player already claimed reward
        ['claimedItemOrWeapon'] = "You received: %s x %s as reward", -- message when player received item or weapon
        ['claimedMoney'] = "You received %s $ in form of %s", -- message when player received money
        ['claimedVehicle'] = "You received a vehicle with the license plate: %s", -- message when player received vehicle
        ['notEnoughPlaytime'] = "You need %s minutes of playtime to open this door", -- message when player dont have enough playtime
        ['noItem'] = "You dont have %s", 
        ['error'] = "An error occured, contact the server team!" -- message when an error occured  
    },
    ['de'] = {
        ['pressE'] = "Drücke ~INPUT_CONTEXT~ um das Belohnungsmenü zu öffnen",
        ['cantOpenToday'] = "Diese Tür kann heute nicht geöffnet werden",
        ['claimedAllRewards'] = "Du hast bereits alle Rewards gesammelt", 
        ['alreadyClaimed'] = "Du hast diese Belohnung bereits erhalten",
        ['claimedItemOrWeapon'] = "Du hast: %s x %s erhalten als Belohnung",
        ['claimedMoney'] = "Du hast %s $ erhalten in Form von %s",
        ['claimedVehicle'] = "Du hast ein Fahrezeug mit dem Kennzeichen: %s erhalten!",
        ['notEnoughPlaytime'] = "Du benötigst %s Minuten Spielzeit um diese Tür zu öffnen",
        ['noItem'] = "Du hast kein %s",
        ['error'] = "Es ist ein Fehler aufgetreten, kontaktiere das Serverteam!"
    },
}



-- DONT TOUCH !!!!!! --
function Translate(key, ...)
    local lang = Config.Language or 'en'
    local translation = languages[lang][key] or "Translation Error"
    if select("#", ...) > 0 then
        return string.format(translation, ...)
    else
        return translation
    end
end
```

## discord-config.lua

```lua
Discord = {}


Discord.Webhook = ""
Discord.WebhookDebug = ""

Discord.Logging = {

    debugLogs = true, -- Logging debug messages
}
```
