Skip to content

Aid Item Definition

Medical aid item system for the Lilia framework.


name

Purpose

Sets the display name of the aid item

When Called

During item definition

Example Usage

ITEM.name = "Medical Kit"

desc

Purpose

Sets the description of the aid item

When Called

During item definition

Example Usage

ITEM.desc = "A medical kit that restores health"

model

Purpose

Sets the 3D model for the aid item

When Called

During item definition

Example Usage

ITEM.model = "models/weapons/w_package.mdl"

width

Purpose

Sets the inventory width of the aid item

When Called

During item definition

Example Usage

ITEM.width = 1  -- Takes 1 slot width

height

Purpose

Sets the inventory height of the aid item

When Called

During item definition

Example Usage

ITEM.height = 1  -- Takes 1 slot height

health

Purpose

Sets the amount of health restored by the aid item

When Called

During item definition (used in use functions)

Example Usage

ITEM.health = 25  -- Restores 25 health points

Example Item:

Example Usage

-- Basic item identification
ITEM.name = "Medical Kit"                    -- Display name shown to players
ITEM.desc = "A medical kit that restores 25 health points"  -- Description text
ITEM.model = "models/items/medkit.mdl"       -- 3D model for the item
ITEM.width = 1                               -- Inventory width (1 slot)
ITEM.height = 1                              -- Inventory height (1 slot)
ITEM.health = 25                             -- Health amount restored when used