Items

Items

Items are defined in the src/items/ folder. Each file contains a table that gets merged into Config.Items.

File Structure

src/items/
├── weapons.lua
├── food.lua
├── drugs.lua
├── misc.lua
├── magazines.lua
├── ammo.lua
└── clothing.lua

Basic Item

local items = {
    ['water'] = {
        label = "Waterflask",
        description = "A water flask",
        close = false,
        weight = 0.5,
        stack = false,
        size = {
            width = 1,
            height = 2,
        },
    },
}

for k, v in pairs(items) do
    Config.Items[k] = v
end

Properties

Property
Type
Required
Description

label

string

Display name

description

string

Item description

weight

number

Weight in kg (0.5 = 500g)

stack

boolean

Can stack multiple

size

table

Grid dimensions { width, height }

close

boolean

Close inventory on use

type

string

Item type (see below)

rarity

string

"common", "uncommon", "rare", "epic", "legendary"

maxCount

number

Max per stack (if stackable)

prop

hash

GTA prop model (backtick hash)

Item Types

Type
Description

nil

Normal item

"weapon"

Weapon (equippable in hotbar)

"armor"

Armor/vest

"phone"

Phone (goes in phone slot)

"bag"

Backpack (expands storage)

Weapon Item

Weapon Properties

Property
Type
Description

ammoType

string

Item name for ammo

magazineType

string

Default magazine item

acceptedMagazines

table

Compatible magazine item names

clipSize

number

Max ammo capacity

prop

hash

GTA weapon prop model

Phone Item

Armor Item

Full Example File

Last updated