> For the complete documentation index, see [llms.txt](https://5scripts-1.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://5scripts-1.gitbook.io/docs/assets/5s_building/faq.md).

# FAQ

<details>

<summary>I'm using inventory which is not supported by 5s_lib</summary>

Go to <kbd>5s\_building/server/editable/inventory.lua</kbd> and replace functions with those from your inventory

For example, core-inventory:

```lua
 function getItemCount(source, itemName)
	return exports.core_inventory:getItemCount(source, itemName)
end

function removeItem(source, itemName, count)
	local itemCount = getItemCount(source, itemName)

	assert(
		itemCount >= count,
		locale("server_insufficient_item")
			.. count
			.. " of "
			.. itemName
			.. " but only have "
			.. itemCount
	)

	exports.core_inventory:removeItem(source, itemName, count)
end

function addItem(source, itemName, count)
	exports.core_inventory:addItem(source, itemName, count)
end

```

</details>

<details>

<summary>Can I add additional buildable items?</summary>

The building system supports **two types of constructions** that can be added:

1. **Item-based** – e.g. chairs, boxes, etc.\
   These require a specific inventory item to place (for example, `chair`).
2. **Resource-based (toolbox)** – e.g. walls, barricades, foundations.\
   These consume materials from your inventory (like wood, metal, etc.) when built.

All new buildable items must be added inside `Config.specialModels = {}`

```lua
[GetHashKey("prop_old_wood_chair")] = {
        type = "chair", -- chair 
        item = "chair", -- Required inventory item
        health = 100, -- Chair health points
        requireFoundation = false, -- Must be on foundation
        requireAttach = false, -- Doesn't need attachment
        offset = { x = 0.0, y = 0.0, z = 0.25 }, --  placement offset
        canFreeRotate = true, -- Allow rotation
        canFreeMove = true, -- Allow free movement up and down
        returnItem = true, -- Return item when removed
        events = {
            place = {
                client = "5s_building:createChair",
            },
            remove = {
                client = "5s_building:removeChair",
            },
        },

        ui = {
            name = "Chair",
            description = "A chair",
            image = "./images/chair.webp",
        },

        includedInToolBox = true, -- if true, the object will be included in the toolbox and will be placed with resources not item
        resources = {
            ["wood"] = {label = "Wood", amount = 1},
        },
    },
```

</details>

<details>

<summary>Are your scripts open source?</summary>

No. We don't sell open source scripts, only escrowed. Config and some editable files stay open so you can configure and adapt everything to your server, but the core logic is protected with FiveM asset escrow.

</details>

<details>

<summary>Is 5s_building integrated with 5s_zombies?</summary>

Yes, and it's automatic. When both resources are running, they link up on their own with no extra config:

* **Tool Cupboard areas become no-spawn zones.** Zombies will not spawn inside a player's base territory. The zone is removed when the TC is destroyed.
* **Zombie safe zones and danger zones become no-build zones.** Players cannot build inside the safe zones or danger zones you defined in 5s\_zombies.

If 5s\_zombies is not running, 5s\_building skips this and works normally.

</details>
