Notepad
Lightweight notes app for fd_laptop, backed by MySQL and integrated with Qbox player/inventory data.
Features
- Create new notes
- Save and update notes by file name
- Open existing notes from a list
- Delete notes
- Notes are tied to the current laptop item metadata id
- Rich text editor (Quill) with JSON content storage
Requirements
ox_liboxmysqlqbx_coreox_inventoryfd_laptop
Installation
- Place this resource in your server resources folder.
- Import database.sql into your server database.
- Ensure dependencies are started before this resource.
- Add
ensure notepadto your server config.
Example start order:
cfg
ensure oxmysql
ensure ox_lib
ensure ox_inventory
ensure qbx_core
ensure fd_laptop
ensure notepadNotes about resource name
The NUI callbacks in web/script.js use https://notepad/.... Keep the resource folder name as notepad, or update callback URLs if you rename it.
Database
This resource uses the laptop_files table with a unique key on:
laptop_idfile_namefile_type
That allows save operations to upsert existing files for the same laptop and file type.
How it works
- Server reads the player laptop item from
ox_inventory. - Laptop metadata id is used as the per-device file owner.
- Save requests upsert JSON note contents into MySQL.
- List/read/delete actions are scoped to the same laptop id.
