> For the complete documentation index, see [llms.txt](https://devmosaic.gitbook.io/devmosaic/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://devmosaic.gitbook.io/devmosaic/resources/devmosaic-ox-inventory-rework-v2/throwable-items.md).

# Throwable Items

The throwable-items system allows players to throw or place supported inventory items in the world. Once the item lands, it becomes a standard inventory drop that other players can open and c

### Make an Item Throwable

Open:

```
ox_inventory/data/items.lua
```

Add `modelp` to the item definition. The value must be a valid GTA object prop model.

```lua
['fishing_rod'] = {
    label = 'Fishing Rod',
    weight = 1500,
    stack = false,
    modelp = 'prop_fishing_rod_01',
    client = {
        image = 'fishing_rod.png'
    }
},
```

Another example:

```lua
['money'] = {
    label = 'Money',
    modelp = 'prop_cash_pile_01',
},
```

After adding or changing a throwable item, restart both resources:

```
restart ox_inventory
restart Dm-throwitems
```

### Configuration Reference

| Property       | Required    | Description                                                                                |
| -------------- | ----------- | ------------------------------------------------------------------------------------------ |
| `modelp`       | Yes         | GTA object prop used when the item is held, thrown, placed, and displayed as a world drop. |
| `weight`       | Recommended | Item weight. Heavier items are thrown with less force.                                     |
| `stack`        | Optional    | Standard `ox_inventory` stacking behavior.                                                 |
| `client.image` | Optional    | Inventory image file for the item.                                                         |
| `disableThrow` | Optional    | Set to `true` to keep the prop model while disabling the throwable Give workflow.          |

Example with throwing disabled:

```lua
['example_item'] = {
    label = 'Example Item',
    weight = 500,
    modelp = 'prop_cs_box_clothes',
    disableThrow = true,
},
```

### Player Usage

1. Open the inventory.
2. Select the quantity to move. Leaving the quantity at `0` uses the full stack.
3. Select **Give** from the item context menu.
4. Choose the required action:

| Control             | Action                                                      |
| ------------------- | ----------------------------------------------------------- |
| `Left Mouse Button` | Throw the item. Aim first to throw it toward the crosshair. |
| `E`                 | Give the item to a nearby player.                           |
| `N`                 | Place the item precisely on the ground.                     |
| `ESC`               | Cancel the action.                                          |

When placing an item:

| Control             | Action             |
| ------------------- | ------------------ |
| `Left Mouse Button` | Confirm placement. |
| `ESC`               | Cancel placement.  |

### How It Works

* Items with a valid `modelp` use the throwable Give workflow.
* Thrown items use physics until they stop moving.
* Thrown and placed items become standard `ox_inventory` drops.
* Players can open these drops and collect the items normally.
* The selected quantity is removed from the original inventory only when the action completes.
* Items can be thrown directly from the player inventory or from an opened backpack.
* Supported weapon items resolve their world model automatically when available.

### Important Notes

* Use an object prop model only. Ped and vehicle models are not supported.
* `modelp` must be added at the top level of the item definition.
* Use a model that exists in the base game or in a streamed resource loaded by your server.

### Troubleshooting

#### The item uses the normal Give action

Confirm that `modelp` exists at the top level of the item definition:

```lua
modelp = 'prop_cash_pile_01',
```

Then restart:

```
restart ox_inventory
restart Dm-throwitems
```

#### Invalid prop notification

The configured prop model could not be loaded. Check the spelling and confirm that the model is a valid GTA object prop.

#### The prop does not appear

Confirm that:

* `Dm-throwitems` is started after `ox_inventory`.
* The item has a valid top-level `modelp`.
* The prop is an object model, not a ped or vehicle.
* Any custom streamed prop resource is started before the item is used.

#### Backpack items do not use the throwable workflow

Confirm that the updated `ox_inventory` build is installed. Throwable items support the player inventory and opened backpacks.
