NX Creative

Installation

Resource-specific setup for nx_write. Dependencies, database tables, item registration, and the right-click Place button.

On this page

For server-wide prerequisites (artifacts, oxmysql, ox_lib), work through the generic install guide first. This page only lists what is specific to nx_write.

Dependencies#

Framework detection is automatic: ESX, QBCore, or QBox. Start the framework resource before nx_write. In practice you will want both ox_inventory and ox_target: the resource is driven by an inventory item, and pickup of placed notes uses a target zone.

  • oxmysqlRequired

    Database driver for saved documents and placements.

  • ox_libRequired

    Callbacks, notifications, and locale utilities.

  • nx-3dRequired

    Renders the writing surface onto the notepad prop and the placed page onto its prop.

  • ox_inventoryOptional

    Provides the notepad and post-it items and the use / place flow. Required for the intended experience.

  • ox_targetOptional

    Adds the "Pick up" interaction on placed notes.

Database#

nx_write creates its tables on first start using an EnsureTable pattern, so no manual import is required. If you prefer to seed the schema by hand, import sql/create.sql into the database oxmysql points at:

Shell
mysql -u <user> -p <database> < sql/create.sql

The schema creates:

  • nx_write_documents. Saved document rows: owner, author, paper kind, title, content, and a preview image.
  • nx_write_placements. Notes placed in the world: kind, linked document, position, and a quaternion rotation.

[!tip] sql/create.sql uses CREATE TABLE IF NOT EXISTS and an idempotent migration step, so running it on an existing install is safe and leaves your data untouched.

server.cfg order#

Shell
ensure oxmysqlensure ox_libensure nx-3d# ensure your framework here (es_extended, qb-core, or qbx_core)ensure ox_inventoryensure ox_targetensure nx_write

Items#

nx_write does not register its items for you. Add the notepad and postit definitions below to [core_ox]/ox_inventory/data/items.lua, and copy notepad.png / postit.png from nx_write/inventory-images/ into ox_inventory/web/images/.

[!warning] The client block is what routes using the item to the writing session. Leave it out and using the item does nothing — the inventory just closes and no error is printed. If the notepad never appears in hand, a missing client.event is the first thing to check.

The buttons block adds the right-click Place action for saved notes, which calls the placeFromSlot export. Keep both blocks.

Lua
['notepad'] = {    label = 'Notepad',    weight = 1,    stack = false,    close = true,    consume = 0,    description = 'A spiral notepad. Use it to write or continue writing.',    client = {        event = 'nx_write:client:useItem',        kind = 'notepad',    },    buttons = {        {            label = 'Place',            action = function(slot)                exports.nx_write:placeFromSlot(slot)            end,        },    },},['postit'] = {    label = 'Post-it Note',    weight = 1,    stack = true,    close = true,    consume = 0,    description = 'A sticky note. Write a short message; place anywhere.',    client = {        event = 'nx_write:client:useItem',        kind = 'postit',    },    buttons = {        {            label = 'Place',            action = function(slot)                exports.nx_write:placeFromSlot(slot)            end,        },    },},

A note must be saved at least once before it can be placed. Saving stamps the document id onto the slot; placing reads it from there.

Convars#

Set this in server.cfg to override the locale without editing the config file:

Shell
setr nx_write:locale "fi"

We are not affiliated with or endorsed by Rockstar North, Take-Two Interactive or other rights holders. FiveM is a copyright and registered trademark of Take-Two Interactive Software, Inc. Our checkout process is owned & operated by Tebex Limited, who handle product fulfilment, billing support and refunds.