HKN Works Logo
HKN Works/Docs/hkn-works-resources

Agents can also search and read this documentation through its MCP server.

Config

The config file is located at shared/config.lua.

Config.UpdateCheck

Checks for a new version when the resource starts and prints the result to the server console.

Config.UpdateCheck = true

Config.Locale

Select the language used by the interface with Config.Locale. The value must match one of the languages inside shared/locales.lua.

Config.Locale = 'tr'

Available Languages

Value Language Value Language
en English ja Japanese
tr Turkish ko Korean
de German pl Polish
fr French pt-br Portuguese (Brazil)
es Spanish ru Russian
it Italian zh-cn Chinese (Simplified)
ar Arabic hi Hindi

Config.ThemeColor

Customize the interface to any color you want with Config.ThemeColor.

Config.ThemeColor = '#ff0066'

Config Reward Settings

These values define how often players are rewarded and how many points they receive.

Config.TimerDuration = 60
Config.RewardPoints = 10

Settings

Option Description
Config.TimerDuration Playtime required for each reward, in minutes.
Config.RewardPoints Points given every time the timer is completed.

Note: The timer restarts when a player reconnects to the server.


Config.ImagePath

Path to the item images of your inventory, used to display the items in the shop.

Warning: The path must end with a trailing slash.

Config.ImagePath = 'nui://qb-inventory/html/images/'

Examples

Inventory Path
qb-inventory nui://qb-inventory/html/images/
ox_inventory nui://ox_inventory/web/images/

Config Commands

These values define the commands used by the script.

Config.ShopCommand = 'playreward'
Config.CoinCommand = 'rewardcoin'
Config.SendCoinCommand = 'rewardsendcoin'
Config.AdminCoinCommand = 'rewardadmincoin'

Settings

Option Description
Config.ShopCommand Command that opens the reward shop.
Config.CoinCommand Command that shows the player's point balance.
Config.SendCoinCommand Command used to send points to another player ([id] [amount]).
Config.AdminCoinCommand Command used by admins to give points to a player ([id] [amount]).

Config Discord Logging

Discord webhook settings used for the purchase logs. Leave Config.DiscordWebhook empty to disable the logs.

Config.DiscordWebhook = ""
Config.ServerName = "HKN PlayReward"
Config.LogColor = 16711821

Settings

Option Description
Config.DiscordWebhook Discord webhook URL.
Config.ServerName Name used as the webhook username and in the log footer.
Config.LogColor Embed color of the log, written as a decimal color value.

Config.AdminIdentifiers

List of players allowed to use the admin command to give points.

Config.AdminIdentifiers = {
    'steam:109000000000000',
    'license:0000000000000000000000000000000000000000',
}

Items

List of items sold in the reward shop. This list is located in shared/items.lua.

Warning: The name value must be the same as the name the item is registered with in your inventory, otherwise the item cannot be given.

Items = {
    { id = 1, name = 'weapon_dagger', label = 'Dagger', price = 50, category = 'weapon', image = 'weapon_dagger.png' },
    { id = 105, name = 'tosti', label = 'Grilled Cheese Sandwich', price = 2, category = 'item', image = 'tosti.png' },
    { id = 201, name = 'suppressor_attachment', label = 'Suppressor', price = 300, category = 'other', image = 'suppressor_attachment.png' },
}

Settings

Option Description
id Unique number of the item.
name Item name as registered in your inventory.
label Display name shown in the shop.
price Price of the item in points.
category Shop category of the item: weapon, item or other.
image Image file name, loaded from Config.ImagePath.

For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs; this page is available as Markdown.