🪑 Furniture As Items
Requirements
- ox_inventory - Furniture items are created and consumed through ox_inventory.
Configuration
Ensure the furniture command and permissions are enabled in your config.lua:
lua
Adding the Furniture Item to ox_inventory
Add the following item to your ox_inventory/data/items.lua:
lua
Give Furniture Command
Use the command to give a furniture item to a player:
Code
Example:
Code
Only players with the give_furniture permission (configured in Config.RealEstateJobs) can use this command.
Furniture Names
The furnitureName argument must match a furniture object in furniture.lua under FurnitureConfig.Furniture.
Example entries:
lua
If a model does not exist in that list, the command will return "Furniture not found".
Using the Item
When the player uses the furniture item in ox_inventory, the nolag_properties.UseFurniture export is called:
- If the player is inside a property, the furniture placement starts immediately.
- If the player is in a yard zone shared by multiple properties, a context menu appears to choose the property.
- If the player is not in a property or yard zone, they will receive an error notification.
Exports
Server exports for integrations:
lua