Skip to content

Items and props

An item gets the first of these that matches:

  1. data/items.lua, by exact item name.
  2. SLTrunk.WeaponProps (data/fallback.lua): GTA weapons by item name.
  3. SLTrunk.Keywords: a word in the item name (water, ammo, phone…). Money, documents and keys are not shown.
  4. SLTrunk.BySize: the weight of one unit, from your inventory’s item list.
  5. SLTrunk.DefaultProp (a cardboard box).

The server console tells you once which prop each unlisted item got, so you can list it if you want another one.

In data/items.lua:

data/items.lua
SLTrunk.Items = {
my_item = 'prop_cs_cardbox_01', -- one prop per unit
my_ammo = { prop = 'prop_ld_ammo_pack_01', per = 30 }, -- one prop per 30 units
my_card = false, -- takes no space and is not shown
}

Any GTA prop works, or an addon prop your server streams.

The 3D packer needs the size of each prop. You do not have to do anything: the first time an item with a new prop enters a trunk, a connected player’s game measures the model and the server keeps the size in data/footprints_auto.lua. Until then the item shows with its automatic prop.

  • Delete a line of data/footprints_auto.lua to measure that prop again.
  • A prop that does not exist in the game is reported in the console, and the item keeps its automatic prop.

Weapon models (w_*) always lie on their side. Add other long props to SLTrunk.LieFlat in data/fallback.lua:

data/fallback.lua
SLTrunk.LieFlat = { prop_my_long_thing = true }