FiveM / GTA V development (local documentation database)
This skill answers FiveM / GTA V questions from a local documentation database made of two parts, each in its own home-directory folder:
- Natives →
~/.fivem-natives/— every GTA V native. - Guides & references →
~/.fivem-docs/content/docs/— events, functions, convars, game references, server config, guides (thecontent/docsof thecitizenfx/fivem-docsrepo).
The ~/ symbol resolves to the user's home directory. Depending on the OS, these absolute paths are:
- Windows:
C:/Users/<username>/.fivem-natives/andC:/Users/<username>/.fivem-docs/content/docs/ - Linux:
/home/<username>/.fivem-natives/and/home/<username>/.fivem-docs/content/docs/ - macOS:
/Users/<username>/.fivem-natives/and/Users/<username>/.fivem-docs/content/docs/
Managing the database (your job — do it without asking the user)
You are responsible for keeping this local database available. Before answering a FiveM question, follow this procedure:
- Check whether the database is installed. You can verify this by checking if the folders (
~/.fivem-natives/,~/.fivem-docs/) exist, or by running the script below with thestatuscommand. - If it is missing, install it — run the one command for the user's OS below, then
continue. A single
installdownloads both parts (~22 MB, one-time). Tell the user once that you are downloading the FiveM docs. Do not silently fall back to the web while the database is missing. - Refresh only when asked — if the user asks for the latest / updated docs, run the
same command with
updateinstead ofinstall. Do not auto-update on every question.
Commands (run straight from GitHub — no repo clone needed). Replace install with one of the following actions as needed:
-
install— downloads and sets up the database. -
update— fetches the latest updates for the database. -
status— checks if the database is currently installed. -
uninstall— completely removes the downloaded databases. -
Windows (PowerShell):
& ([scriptblock]::Create((irm https://raw.githubusercontent.com/anx-scripts/fivem-skills/main/scripts/fivem-skills.ps1))) install -
Linux / macOS:
curl -fsSL https://raw.githubusercontent.com/anx-scripts/fivem-skills/main/scripts/fivem-skills.sh | bash -s -- install
Part 1 — GTA V natives (~/.fivem-natives/)
When you need to find a native, check its signature, parameters, return type or usage example — search here first, before reaching for the internet.
Structure:
- Natives are grouped into subdirectories by category, e.g.
PLAYER/,VEHICLE/,PED/,ENTITY/,STREAMING/,TASK/,MISC/, etc. - Each native is a separate
.mdfile named in PascalCase, e.g.~/.fivem-natives/PLAYER/ChangePlayerPed.md.
How to search:
- ALWAYS use the dedicated search script with the
--nativesflag to only search natives. - AND logic (Recommended): To search for multiple words anywhere in the file, pass them without quotes:
node ~/.fivem-natives/search.js --natives create vehicle network - Exact phrase: To search for an exact phrase, wrap it in quotes:
node ~/.fivem-natives/search.js --natives "CreateVehicle" - Limit results: Use
--limit Nto change the maximum number of results (default is 20):node ~/.fivem-natives/search.js --natives --limit 5 create vehicle - If Node.js says
Cannot find module ...or the script returns a missing database error, you MUST run the installation script (.ps1or.shfrom above) to download it first. - If the script outputs an
[INFO FOR AI]note about the database being old, kindly remind the user to run theupdatecommand. - Once you have the file path from the search results, use your file reading tool to read the full file. Do NOT use
grep.
Only when a native does not exist in this local documentation, use https://docs.fivem.net/natives/.
Part 2 — Guides & references (~/.fivem-docs/content/docs/)
When you need FiveM knowledge that is NOT a native — e.g. events, client/server functions, convars, resource manifest, OneSync, NUI, game data (blips, markers, vehicle/ped models, weapon hashes, controls, text formatting), server configuration, guides — search here first, before reaching for the internet.
Structure (subdirectories of ~/.fivem-docs/content/docs/):
scripting-reference/— scripting reference:client-functions/,server-functions/,events/,convars/,onesync/,resource-manifest/,runtimes/.scripting-manual/— scripting guides: events, networking, NUI, scaleform, voice, migrations, runtimes.game-references/— game reference data:blips.md,markers.md,controls.md,ped-models.md,weapon-models.md,vehicle-references/,hud-colors.md,game-events.md,net-game-events.md,text-formatting.md,pickup-hashes.md,zones.md, etc.cookbook/— practical examples/recipes (grouped by year).developers/— coding guidelines, script runtimes, server security, sandbox.resources/— documentation of standard resources (chat, spawnmanager, mapmanager, sessionmanager, baseevents, txAdmin, etc.).server-manual/,client-manual/,getting-started/,fxdk/,assets-manual/— server/client configuration and operation.
Each topic is a .md file (kebab-case names, e.g. game-references/markers.md), and the _index.md in a directory describes its contents.
How to search:
- ALWAYS use the dedicated search script with the
--docsflag to only search guides & references. - AND logic (Recommended): To search for multiple words anywhere in the file, pass them without quotes:
node ~/.fivem-natives/search.js --docs blip color - Exact phrase: To search for an exact phrase, wrap it in quotes:
node ~/.fivem-natives/search.js --docs "add blip" - Limit results: Use
--limit Nto change the maximum number of results (default is 20):node ~/.fivem-natives/search.js --docs --limit 5 blip color - If Node.js says
Cannot find module ...or the script returns a missing database error, you MUST run the installation script (.ps1or.shfrom above) to download it first. - If the script outputs an
[INFO FOR AI]note about the database being old, kindly remind the user to run theupdatecommand. - Once you have the file path from the search results, use your file reading tool to read the full file. Do NOT use
grep.
Only when a topic does not exist in this local documentation, use https://docs.fivem.net/docs/.