Before You Begin#
Before installing Books Creator, make sure your server meets the minimum requirements. Framework and inventory are detected on their own — there is nothing to switch on.
Requirement | Status | Notes |
|---|---|---|
| Required | Every book is stored in the |
|
Documentation
Install Books Creator on your FiveM server: requirements, download from the CFX Portal, load order, the qs_books table and the book item for ox_inventory, qs-inventory and qb-inventory.
Before installing Books Creator, make sure your server meets the minimum requirements. Framework and inventory are detected on their own — there is nothing to switch on.
Requirement | Status | Notes |
|---|---|---|
| Required | Every book is stored in the |
|
Required
Callbacks, and the Open / Edit menu shown when a written book is used. |
OneSync | Required | Enabled on any modern server. |
Framework | Required | ESX, QBCore or Qbox — auto-detected. |
Inventory with item metadata | Required | The book lives in its item's metadata. |
| Optional | Its HUD is hidden while a book is being written. |
The resource picks its framework and inventory by looking at what is already running:
Layer | Detected from |
|---|---|
Framework |
|
Inventory |
|
Integrations says how far each inventory is supported and how to add one that is not listed.
After purchasing Books Creator, the resource is automatically linked to your CFX Portal account.
Sign in to the CFX Portal using the same account used during checkout, open Granted Assets, and download Books Creator.
After extracting the download, you should have the following:
[books]/
├── qs-book-creator/ -- the resource
│ ├── config/ -- what you may edit
│ ├── custom/ -- framework bridges (open)
│ ├── server/custom/ -- inventory adapters (open)
│ ├── locales/ -- translations
│ └── database/ -- database.sql
├── [sql]/database.sql -- the same table, for convenience
├── [image]/book.png -- the item picture
└── ox_inventory_book.md -- the item block for ox_inventoryThe folder must be named
qs-book-creator. The ox_inventory item callsqs-book-creator.useBook, and every export is reached through that name — a renamed copy stops answering.
Move the qs-book-creator folder into your server's resources directory. It can live anywhere inside it, including a category folder:
resources/
└── [qs]/
└── qs-book-creator/Once copied, open your server.cfg and make sure every dependency — and the framework and inventory it should detect — starts before Books Creator:
ensure oxmysql
ensure ox_lib
# Framework
ensure qb-core
# ensure qbx_core
# ensure es_extended
# Inventory
ensure ox_inventory
# ensure qs-inventory
# ensure qb-inventory
ensure qs-book-creatorThe loading order matters. Detection only sees resources that are already started, so an inventory that starts after Books Creator is not found, and books cannot be stored in items.
Every book — its cover, pages and pictures — is kept in a single table, qs_books. Open your database manager (HeidiSQL, phpMyAdmin, DBeaver or your host's panel), select your server's database and run database.sql.
Column | Holds |
|---|---|
| The book's id — the same value its items carry as |
| Who first wrote it: the ESX |
| The cover. |
| Every page, in order, as JSON. |
| The item name the book belongs to. |
| Set automatically. |
The
jobandjob_gradescolumns are reserved and stay empty in this version.
Books Creator listens to one item, set by Config.BookDefaults.item — book unless you change it. Register it in your inventory as a unique, usable item, and copy [image]/book.png into your inventory's image folder.
Add the block from ox_inventory_book.md to ox_inventory/data/items.lua, and the picture to ox_inventory/web/images/:
['book'] = {
label = 'Book',
weight = 200,
stack = false,
close = true,
consume = 0,
description = 'A readable book.',
server = {
export = 'qs-book-creator.useBook',
},
},The server.export line is what makes it work: ox_inventory hands the use straight to Books Creator. Without it, the item does nothing.
Add the item to qs-inventory/shared/items.lua, and the picture to qs-inventory/html/images/:
['book'] = {
name = 'book',
label = 'Book',
weight = 200,
type = 'item',
image = 'book.png',
unique = true,
useable = true,
shouldClose = true,
description = 'A readable book.',
},Add the item to qb-core/shared/items.lua, and the picture to qb-inventory/html/images/:
book = {
name = 'book',
label = 'Book',
weight = 200,
type = 'item',
image = 'book.png',
unique = true,
useable = true,
shouldClose = true,
description = 'A readable book.',
},The item must never stack —
stack = falseon ox_inventory,unique = trueelsewhere. Items in one stack share one set of metadata, so two stacked books would be the same book.
Almost nothing needs configuring — books are written in game. What there is lives in config/main.lua:
Option | Default | What it does |
|---|---|---|
|
| The interface language. See Usage → Languages. |
| auto |
|
| auto | The detected inventory, or |
|
| The title pre-filled in a blank book. |
|
| The author pre-filled in a blank book. |
|
| The item that works as a book. |
|
| The most pages a book can have. |
| police, ambulance | Jobs reported by the |
|
| Prints extra lines to the console, including the detected inventory. |
|
| Mutes the interface sounds: page turns, saving and errors. |
The values worth reviewing first:
Config.Locale = 'en'
Config.BookDefaults = {
title = 'New Book', -- pre-filled title
author = 'Unknown', -- pre-filled author
item = 'book', -- the item that works as a book
maxPages = 50, -- pages per book
}
Config.Debug = false
Config.DisableSounds = falseChanging
item? Register the new name in your inventory as well, and restart. Items under the old name stop opening on qs-inventory and qb-inventory, because only the configured name is made usable.
Set Config.Debug = true, restart your server and read the console. It names the framework it loaded and the inventory it registered the book with:
[INFO] Successfully loaded the framework. qb
[DEBUG 2.0.1] Registered usable book item: book inventory: ox_inventory
[DEBUG 2.0.1] Book inventory usables registered: ox_inventoryIf the inventory reads standalone, no supported inventory was running when Books Creator started — check the load order. Then join your server and work through the first loop:
Use your framework's give command, for example /giveitem 1 book 1.
Use the book from your inventory. It is blank, so the writer opens. Give it a title and an author, add a page with some text, and press Save.
Use it again. A small menu offers Open and Edit — Open shows your book. From there, Usage covers everything a book can hold.
Nothing needs a restart from here on. Every book is written, edited and deleted in game.