Configuration
Edit config/config.lua:
return {
-- ox_inventory image path for item icons
ImageUrl = "nui://ox_inventory/web/images/",
-- Payment method: PaymentType.BANK or PaymentType.CASH
PaymentType = PaymentType.BANK,
CashItem = "money", -- item name if using CASH payment
-- Discord webhook URL for purchase logs (leave empty to disable)
DiscordWebhook = "",
Logging = {
Enabled = true,
UseOxLogger = true, -- log via ox_lib logger
UseDiscordWebhook = true, -- log via Discord webhook
},
-- How often NPCs relocate to a new position
-- Options: EVERY_30_MINUTES, EVERY_HOUR, EVERY_2_HOURS,
-- EVERY_4_HOURS, EVERY_6_HOURS, EVERY_12_HOURS, EVERY_DAY
RelocationSchedule = CronSchedule.EVERY_HOUR,
-- NPC vendor definitions
Peds = {
{
model = "g_m_m_chiboss_01",
scenario = "WORLD_HUMAN_STAND_IMPATIENT",
possibleLocations = {
vector4(-133.48, -673.64, 48.23, 71.55),
vector4(-141.21, -665.06, 48.22, 249.81),
vector4(-143.67, -672.10, 48.23, 340.16),
}
}
},
-- Shop categories and items
Categories = {
weapons = {
label = "Weapons",
icon = "fas fa-gun",
items = {
{ name = "WEAPON_PISTOL", label = "Pistol", price = 5000, maxAmount = 1 }
}
},
materials = {
label = "Materials",
icon = "fas fa-box",
items = {
{ name = "iron", label = "Iron", price = 100, maxAmount = 50 }
}
}
}
}NPC Relocation
NPCs randomly pick from their possibleLocations list on a cron schedule. All connected players receive the new positions and the peds respawn automatically. The schedule is based from midnight — e.g. EVERY_2_HOURS runs at 00:00, 02:00, 04:00, etc.
Adding Items
Add items to a category's items array:
{ name = "WEAPON_SMG", label = "SMG", price = 15000, maxAmount = 1 }
{ name = "lockpick", label = "Lockpick", price = 500, maxAmount = 5, metadata = { quality = 100 } }| Field | Type | Description |
|---|---|---|
name | string | ox_inventory item name |
label | string | Display name in the UI |
price | number | Price per unit |
maxAmount | number | Max quantity per purchase |
metadata | table? | Optional item metadata |
Localization
Locale files are in locales/. Includes English (en.json) and Danish (da.json). Uses ox_lib's locale system.