🔬
byK3 Docs
  • SCRIPT DOCS
    • 🎃nkn_halloween
      • ⤵️Installation
      • 🛠️Config
      • 📍Coords
      • 🎨UI (HTML/JS)
  • 🎀nkn_dailyRewards
    • ⤵️Installation
    • 🛠️Config
    • 👀See the Config
  • 🎄nkn_advent
    • ⤵️Installation
    • 🛠️Script Configuration
    • 👀See the Config
  • ⚒️nkn_craftingTable
    • ⤵️Installation
    • 🛠️Script Configuration
    • 👀See the Config
Powered by GitBook
On this page
  • CONFIG.LUA
  • LANGUAGE.LUA
  • discord-config.lua
  1. nkn_dailyRewards

See the Config

See all configurable files

CONFIG.LUA

```lua
Config = {}

Config.Language = 'en' -- more options in language.lua
 
Config.ContinueAfterMaxDays = false -- continue after max days true/false (if false, player will not be able to claim rewards after reached the max days)

Config.RequireConsecutiveLogins = true -- require consecutive logins true/false (if false, player can claim rewards in any order)


Config.Command = "openrewards" -- command to open the UI


Config.Coords = {
    ["Spot 1"] = { -- dont use same name twice
        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 for each day (add as many as you want)

    [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 = '1000$ 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 = '50 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
function clientNotify(message)
    TriggerEvent("esx:showNotification", message)
end

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

```

LANGUAGE.LUA

local languages = {
    ['en'] = {
        ['pressE'] = "Press ~INPUT_CONTEXT~ to open the rewards menu", -- message when player is near the marker
        ['claimedAllRewards'] = "You already claimed all rewards", -- message when player already claimed all rewards
        ['claimedToday'] = "You already claimed your reward today", -- message when player already claimed reward today
        ['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
        ['error'] = "An error occured, contact the server team!" -- message when an error occured  
    },
    ['de'] = {
        ['pressE'] = "Drücke ~INPUT_CONTEXT~ um das Belohnungsmenü zu öffnen",
        ['claimedAllRewards'] = "Du hast bereits alle Rewards gesammelt", 
        ['claimedToday'] = "Du hast bereits heute deine Belohnung 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!",
        ['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

Discord = {}


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

Discord.Logging = {

    debugLogs = true, -- Logging debug messages (e.g. when a player is too far away from the pumpkin)

}

PreviousConfigNextnkn_advent

Last updated 1 year ago

🎀
👀