Agents can also search and read this documentation through its MCP server.
Installation
Installation
Requirements
| Resource | Description |
|---|---|
| oxmysql | Required. Used to store the player points. |
qb-core or es_extended |
Framework used to give the items. |
General Setup
- Extract the resource into your server's
resourcesfolder. - Make sure the folder name is strictly
hkn_playreward. - Open
shared/config.luaand set your admin identifiers and inventory image path. - Open your
server.cfg. - Make sure
oxmysqland your framework are started before this script. - Add the following line:
ensure oxmysql
ensure qb-core # or es_extended
ensure hkn_playreward
Database
The table is created automatically when the resource starts. If you prefer to create it manually, import the hkn_playreward.sql file into your database.
CREATE TABLE IF NOT EXISTS `hkn_playreward` (
`id` INT AUTO_INCREMENT PRIMARY KEY,
`identifier` VARCHAR(60) NOT NULL,
`points` INT DEFAULT 0,
UNIQUE (`identifier`)
);
Usage
Commands
| Command | Description |
|---|---|
/playreward |
Opens the reward shop. |
/rewardcoin |
Shows your current point balance. |
/rewardsendcoin [id] [amount] |
Sends points to another player. |
/rewardadmincoin [id] [amount] |
Gives points to a player. Admins only. |
Configuration
Below are all available configuration options for hkn_playreward. The config file is located at shared/config.lua.
Update Check
Enable or disable the version check on resource start.
Config.UpdateCheck = true
Language
Select the language used by the interface.
Config.Locale = 'tr'
Theme Color
Customize the interface theme color.
Config.ThemeColor = '#ff0066'
Reward Settings
Control how often players are rewarded and how many points they receive.
Config.TimerDuration = 60
Config.RewardPoints = 10
Options
| Setting | Description |
|---|---|
TimerDuration |
Playtime required for each reward, in minutes. |
RewardPoints |
Points given every time the timer is completed. |
Image Path
Path to your inventory's item images.
Config.ImagePath = 'nui://qb-inventory/html/images/'
Commands
Change the commands used by the script.
Config.ShopCommand = 'playreward'
Config.CoinCommand = 'rewardcoin'
Config.SendCoinCommand = 'rewardsendcoin'
Config.AdminCoinCommand = 'rewardadmincoin'
Discord Logging
Webhook used for the purchase logs.
Config.DiscordWebhook = ""
Config.ServerName = "HKN PlayReward"
Config.LogColor = 16711821
Admin Identifiers
Players allowed to use the admin command.
Config.AdminIdentifiers = {
'steam:109000000000000',
'license:0000000000000000000000000000000000000000',
}
Shop Items
Items sold in the reward shop are listed in shared/items.lua.
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' },
}
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending
.mdto page URLs; this page is available as Markdown.