Get featured

RedM & FiveM script prompts (free)

Copy-paste prompts for AI coding tools that write FiveM and RedM resources. Each prompt asks only for the context its task needs, then says exactly what to hand back: new files for build tasks, findings and minimal diffs for debugging, reviews and audits. Every native or API the AI uses must come with a doc link, or be marked UNVERIFIED.

Each prompt has one skill level (Beginner, Experienced Developer or Advanced / Production) and says which game it covers. FiveM frameworks (ESX, QBCore, Qbox) and RedM frameworks (VORP, RSG) are kept separate. Any code an AI writes from these prompts is example code (we haven't tried it ourselves); test it on a local server first.

Safety: Test on a local development server first, never on your live server. Review every diff before running it. Keep backups of your database. Follow the Cfx.re/FiveM terms and Rockstar's rules for your game; don't use these prompts for cheats, exploits, bypassing anticheat, or reselling others' paid/escrowed resources. AI tools make mistakes: natives and framework APIs change, and FiveM and RedM natives differ.

New to AI coding agents? Get the free AI Coding Agent Safety Starter Kit.

Learn how: How to make a FiveM script with AI (step by step)

Learn how: How to choose an AI tool for FiveM

Learn how: How to make a RedM script with AI

Categories

Job Scripts

Delivery job with duty, routes and server-validated pay

Skill level: Experienced Developer Game: FiveM + RedM

Rules: Use only natives, exports and events you can cite from docs.fivem.net (natives reference), my framework's official docs, or the source code I paste. Give a link next to each one. If you can't cite it, write UNVERIFIED and don't use it in code until I confirm. FiveM (gta5) and RedM (rdr3) natives and frameworks differ. Never mix them. If an answer below is missing, ask me only for that item, then wait.

CONTEXT (answer these): 1) FiveM or RedM. 2) Framework + version (FiveM: ESX Legacy / QBCore / Qbox; RedM: VORP / RSG; or standalone). 3) Interaction: target resource name or keypress. 4) Paste the config I want reused, if any.
TASK: Build a delivery job resource. Duty toggle restricted by the framework's documented job check. Player picks up at a depot and delivers to one of N configured drop-offs. Pay ONLY on the server, after it checks: on duty, correct job, server-side route state for this saved source, distance from server-read ped coords (never client coords), minimum route time, per-player rate limit. Use the framework's documented money function (cite it).
OUTPUT: file tree; every new file in full, fxmanifest.lua first; list of natives/exports with links or UNVERIFIED; test steps.
SECURITY: client sends only "I arrived"; amount, route and position are decided on the server; log refused attempts.
TEST (local dev server): normal delivery pays once; teleport before min time = no pay; off-duty or wrong job triggering the event directly = refused + logged; spamming the event = rate-limited; restart mid-route = state cleared.

Example code an AI writes from this prompt: (we haven't tried it ourselves). Test it on a local server first.

Mechanic job: repair/service with billing and job grades

Skill level: Experienced Developer Game: FiveM only

Rules: Use only natives, exports and events you can cite from docs.fivem.net (natives reference), my framework's official docs, or the source code I paste. Give a link next to each one. If you can't cite it, write UNVERIFIED and don't use it in code until I confirm. FiveM (gta5) and RedM (rdr3) natives and frameworks differ. Never mix them. If an answer below is missing, ask me only for that item, then wait.

CONTEXT: 1) FiveM only; this prompt does not cover RedM. 2) Framework + version. 3) Target resource or keypress. 4) Billing: framework bills, an invoice resource (name), or direct charge.
TASK: On-duty mechanics repair or clean a vehicle in configured zones, with progress feedback. The server picks the price from config by repair type and job grade. The customer must accept. At accept time the server re-checks that both players and the vehicle are close.
OUTPUT: file tree, new files in full (fxmanifest.lua first), native/export list with links, test steps.
SECURITY: price and grade limits only server-side; the customer's accept event must match a pending bill ID created by the server; expire unanswered bills.
TEST: wrong-grade repair refused; customer walks away before accepting = no charge; forged accept for another bill ID = refused.

Example code an AI writes from this prompt: (we haven't tried it ourselves). Test it on a local server first.

Back to categories

NPC Scripts

Shopkeeper / interaction NPCs with proper model loading and cleanup

Skill level: Beginner Game: FiveM + RedM

Rules: Use only natives, exports and events you can cite from docs.fivem.net (natives reference), my framework's official docs, or the source code I paste. Give a link next to each one. If you can't cite it, write UNVERIFIED and don't use it in code until I confirm. FiveM (gta5) and RedM (rdr3) natives and frameworks differ. Never mix them. If an answer below is missing, ask me only for that item, then wait.

CONTEXT: 1) Game (ped natives differ). 2) Target resource name or keypress. 3) NPC list: model, coords, heading, optional scenario.
TASK: Spawn configured interaction NPCs only when a player is within a set radius; despawn when they leave. Load the model with request + wait-until-loaded with a timeout + release. Make peds non-hostile and non-fleeing. Delete every ped in an onResourceStop handler that checks the resource name.
OUTPUT: file tree, files in full (fxmanifest.lua first), each ped native with its doc link for MY game, a short "how to install" (folder, ensure line in server.cfg), and how to read an F8 error if it fails.
SECURITY: the NPC is cosmetic. Anything it "gives" goes through a server event that validates.
TEST: restart the resource = zero orphan peds; bad model name = clear error, no infinite loop; walking away despawns; idle loop waits 500 ms or more when nobody is near.

Example code an AI writes from this prompt: (we haven't tried it ourselves). Test it on a local server first.

Ambient NPC population tweak (client-only, performance-safe)

Skill level: Experienced Developer Game: FiveM + RedM

Rules: Use only natives, exports and events you can cite from docs.fivem.net (natives reference), my framework's official docs, or the source code I paste. Give a link next to each one. If you can't cite it, write UNVERIFIED and don't use it in code until I confirm. FiveM (gta5) and RedM (rdr3) natives and frameworks differ. Never mix them. If an answer below is missing, ask me only for that item, then wait.

CONTEXT: 1) Game. 2) Area coords + radius, ped count cap. 3) Should other players see the same peds (networked) or not?
TASK: Client script adding a capped number of ambient peds in one area, despawned when the player leaves. Explain the local-vs-networked choice and its cost; default local.
OUTPUT: client file(s) + fxmanifest.lua changes only, native list with links, resmon measurement plan.
TEST: never exceeds the cap; zero peds after leaving or restarting; resmon near idle outside the area.

Example code an AI writes from this prompt: (we haven't tried it ourselves). Test it on a local server first.

Back to categories

Shops & Economy

Shop with server-side pricing and stock

Skill level: Experienced Developer Game: FiveM + RedM

Rules: Use only natives, exports and events you can cite from docs.fivem.net (natives reference), my framework's official docs, or the source code I paste. Give a link next to each one. If you can't cite it, write UNVERIFIED and don't use it in code until I confirm. FiveM (gta5) and RedM (rdr3) natives and frameworks differ. Never mix them. If an answer below is missing, ask me only for that item, then wait.

CONTEXT: 1) Game + framework + version. 2) Inventory resource (FiveM e.g. ox_inventory/qb-inventory; RedM vorp_inventory/rsg-inventory). 3) Stock in DB? If yes, oxmysql version. 4) UI: NUI or the framework menu.
TASK: Server-side price list. The client sends item name + quantity only. The server validates: item in config, integer quantity within limits, player near the shop (server coords), enough money (documented framework function), carry space (documented inventory function). Then it removes money, adds the item, and refunds if the add fails.
OUTPUT: file tree, files in full, SQL migration if stock is used, API list with links/UNVERIFIED, test steps.
SECURITY: client price ignored; all SQL uses ? placeholders; per-player purchase rate limit.
TEST: forged price ignored; quantity -1, 0.5 and 1e9 rejected; full inventory = refund; two fast purchases of the last stock = only one succeeds.

Example code an AI writes from this prompt: (we haven't tried it ourselves). Test it on a local server first.

Back to categories

Inventory & Items

Usable item with server-side effect

Skill level: Beginner Game: FiveM + RedM

Rules: Use only natives, exports and events you can cite from docs.fivem.net (natives reference), my framework's official docs, or the source code I paste. Give a link next to each one. If you can't cite it, write UNVERIFIED and don't use it in code until I confirm. FiveM (gta5) and RedM (rdr3) natives and frameworks differ. Never mix them. If an answer below is missing, ask me only for that item, then wait.

CONTEXT: 1) Game + framework + inventory. 2) Item name, effect, cooldown seconds.
TASK: Register the item as usable with my framework's documented function (cite it). Server-side registration to check against my version: ESX ESX.RegisterUsableItem(item, cb) (skipped by ESX if Config.CustomInventory is set; then use the inventory's own method); QBCore QBCore.Functions.CreateUseableItem(item, fn); Qbox exports.qbx_core:CreateUseableItem(item, fn) (or define the item in ox_inventory); RSG RSGCore.Functions.CreateUseableItem(item, fn); VORP exports.vorp_inventory:registerUsableItem(item, fn, GetCurrentResourceName()). Cite the file in MY installed version. The server removes the item first, applies the cooldown, then tells the client to play the effect.
OUTPUT: only the files to add or change, in full, plus the item-registration steps for my inventory and the install steps.
SECURITY: the effect is decided on the server; validate metadata on the server.
TEST: using without the item does nothing; spamming respects the cooldown; restart keeps working.

Example code an AI writes from this prompt: (we haven't tried it ourselves). Test it on a local server first.

Back to categories

Vehicles & Horses

Vehicle garage with ownership checks (FiveM)

Skill level: Experienced Developer Game: FiveM only

Rules: Use only natives, exports and events you can cite from docs.fivem.net (natives reference), my framework's official docs, or the source code I paste. Give a link next to each one. If you can't cite it, write UNVERIFIED and don't use it in code until I confirm. FiveM (gta5) and RedM (rdr3) natives and frameworks differ. Never mix them. If an answer below is missing, ask me only for that item, then wait.

CONTEXT: 1) FiveM framework + version (RedM: use the Stable prompt instead). 2) Owned-vehicles table name + columns (paste the schema). 3) Keys resource, if any.
TASK: List the player's owned vehicles from the DB (oxmysql, ? placeholders), spawn the chosen one at a clear configured spot, and store it back with plate + properties. Use the framework's documented property helpers if they exist (client side: QBCore QBCore.Functions.GetVehicleProperties/SetVehicleProperties; Qbox uses ox_lib lib.getVehicleProperties(vehicle) / lib.setVehicleProperties(vehicle, props, fixVehicle)); otherwise say so.
OUTPUT: file tree, files in full, SQL changes if any, API list, test steps.
SECURITY: ownership is checked by the framework identifier on the server, never a client-sent owner; a server "out" flag prevents double spawns; properties from the client are sanity-checked before saving.
TEST: another player's plate = refused; same vehicle twice = refused; server restart while out = consistent state.

Example code an AI writes from this prompt: (we haven't tried it ourselves). Test it on a local server first.

Horse stable: owned horses, call and store (RedM)

Skill level: Experienced Developer Game: RedM only

Rules: Use only natives, exports and events you can cite from docs.fivem.net (natives reference), my framework's official docs, or the source code I paste. Give a link next to each one. If you can't cite it, write UNVERIFIED and don't use it in code until I confirm. FiveM (gta5) and RedM (rdr3) natives and frameworks differ. Never mix them. If an answer below is missing, ask me only for that item, then wait.

CONTEXT: 1) VORP or RSG + version; your stable/horse resource name (paste its exports or events). 2) Horse data table schema.
TASK: Investigate first, read-only: list what your existing stable resource already exposes (cite the file:line or docs). Then propose the smallest change for: list owned horses, call or spawn one, store it. Don't reuse GTA vehicle concepts (plates, vehicle properties). Horse natives and framework APIs are UNVERIFIED until cited for rdr3.
OUTPUT: findings first; code only after I approve; minimal diffs.
SECURITY + TEST: ownership checked on the server; can't call another player's horse; no duplicate horses after a re-call or restart.

Example code an AI writes from this prompt: (we haven't tried it ourselves). Test it on a local server first.

Back to categories

Admin & Utility

Admin command set with ACE permissions and audit log

Skill level: Experienced Developer Game: FiveM + RedM

Rules: Use only natives, exports and events you can cite from docs.fivem.net (natives reference), my framework's official docs, or the source code I paste. Give a link next to each one. If you can't cite it, write UNVERIFIED and don't use it in code until I confirm. FiveM (gta5) and RedM (rdr3) natives and frameworks differ. Never mix them. If an answer below is missing, ask me only for that item, then wait.

CONTEXT: 1) Game. 2) Commands wanted. 3) Where logs go (server console/file, or a resource you name).
TASK: Server commands gated by ACE (add_ace / add_principal in server.cfg; cite https://docs.fivem.net/docs/server-manual/server-commands/). Log every action with admin identifier, target and time.
OUTPUT: server file(s) + fxmanifest.lua + the exact server.cfg lines + test steps.
SECURITY: any net event used by these commands re-checks ACE on the server; never trust a client-side admin flag.
TEST: non-admin command and direct event trigger both refused; each action logged; test_ace confirms the principal.

Example code an AI writes from this prompt: (we haven't tried it ourselves). Test it on a local server first.

Back to categories

NUI / UI

NUI panel with SendNUIMessage, RegisterNuiCallback and focus handling

Skill level: Experienced Developer Game: FiveM + RedM

Rules: Use only natives, exports and events you can cite from docs.fivem.net (natives reference), my framework's official docs, or the source code I paste. Give a link next to each one. If you can't cite it, write UNVERIFIED and don't use it in code until I confirm. FiveM (gta5) and RedM (rdr3) natives and frameworks differ. Never mix them. If an answer below is missing, ask me only for that item, then wait.

CONTEXT: 1) Game. 2) Existing resource to extend, or new? (Paste fxmanifest.lua if existing.) 3) Plain HTML/JS or a named UI framework already in the repo.
TASK: NUI panel. ui_page + every UI file in files. Open with SendNUIMessage + SET_NUI_FOCUS; close on Escape and on resource stop (release focus). The UI calls fetch(`https://${GetParentResourceName()}/<name>`, POST JSON). Every RegisterNuiCallback calls cb on every path.
OUTPUT: new resource: files in full; existing resource: minimal diffs only.
SECURITY: NUI input is untrusted; money/item actions go to a validated server event.
TEST: Escape always releases focus; no callback timeouts in devtools (localhost:13172 or nui_devTools); UI can't grant items alone.

Example code an AI writes from this prompt: (we haven't tried it ourselves). Test it on a local server first.

Back to categories

Debugging & Performance

Debug a script error from the console output

Skill level: Beginner Game: FiveM + RedM

Rules: Use only natives, exports and events you can cite from docs.fivem.net (natives reference), my framework's official docs, or the source code I paste. Give a link next to each one. If you can't cite it, write UNVERIFIED and don't use it in code until I confirm. FiveM (gta5) and RedM (rdr3) natives and frameworks differ. Never mix them. If an answer below is missing, ask me only for that item, then wait.

CONTEXT: paste 1) the exact F8 or server console error, 2) the file(s) and lines in the stack trace, 3) fxmanifest.lua only if the error mentions loading or manifest. Tell me the game. Don't ask about database/inventory unless the error involves them.
TASK: 1) Explain the error in plain words and point to the line. 2) 2-3 likely causes, ranked, each with a quick way to confirm (a print, resmon, a manifest check). 3) After I confirm, the minimal fix as a diff.
OUTPUT: explanation + causes + diff only. NO new resource, NO full files, NO new fxmanifest.lua.
SECURITY: don't "fix" by removing server-side checks.
TEST: the error is gone after restart; the original feature still works; no new console warnings.

Example code an AI writes from this prompt: (we haven't tried it ourselves). Test it on a local server first.

Performance review: threads, waits and natives in loops

Skill level: Advanced / Production Game: FiveM + RedM

Rules: Use only natives, exports and events you can cite from docs.fivem.net (natives reference), my framework's official docs, or the source code I paste. Give a link next to each one. If you can't cite it, write UNVERIFIED and don't use it in code until I confirm. FiveM (gta5) and RedM (rdr3) natives and frameworks differ. Never mix them. If an answer below is missing, ask me only for that item, then wait.

CONTEXT: paste the client/server scripts and a resmon reading (ms) under typical load; player count; OneSync on/off.
TASK: Read-only review. Report with file:line: needless Wait(0) loops, distance checks that could sleep longer, per-frame natives that could be cached, entity-pool scans every tick, per-frame events, server loops over all players.
OUTPUT: a findings table (file:line, cost, fix, measurement). NO code changes and NO full files until I approve specific items; then minimal diffs.
TEST: resmon before/after on a local server with the same scenario; behaviour unchanged; a multi-client test if networking is touched.

Example code an AI writes from this prompt: (we haven't tried it ourselves). Test it on a local server first.

Back to categories

Security review

Server event security audit (never trust the client)

Skill level: Advanced / Production Game: FiveM + RedM

Rules: Use only natives, exports and events you can cite from docs.fivem.net (natives reference), my framework's official docs, or the source code I paste. Give a link next to each one. If you can't cite it, write UNVERIFIED and don't use it in code until I confirm. FiveM (gta5) and RedM (rdr3) natives and frameworks differ. Never mix them. If an answer below is missing, ask me only for that item, then wait.

CONTEXT: paste the server files that register net events, plus the client files that trigger them. Framework name only if handlers call it.
TASK: Read-only. For each RegisterNetEvent handler: what it trusts from the client, and what the server must check (saved source, job/permission, distance from server coords, amounts from config, cooldowns, types and ranges). Our advice, not a vendor quote: assume any client can trigger any registered net event with any arguments.
OUTPUT: a table (event, risk HIGH/MED/LOW, one-line exploit, fix), then minimal diffs for the ones I approve. NO full files, NO new fxmanifest.lua.
TEST: on a local server, trigger each fixed event with bad input (wrong type, negative, huge, another player's ID) and confirm it's refused and logged.

Example code an AI writes from this prompt: (we haven't tried it ourselves). Test it on a local server first.

Back to categories

Framework Migration

Migrate a resource between frameworks (same game only)

Skill level: Advanced / Production Game: FiveM + RedM

Rules: Use only natives, exports and events you can cite from docs.fivem.net (natives reference), my framework's official docs, or the source code I paste. Give a link next to each one. If you can't cite it, write UNVERIFIED and don't use it in code until I confirm. FiveM (gta5) and RedM (rdr3) natives and frameworks differ. Never mix them. If an answer below is missing, ask me only for that item, then wait.

CONTEXT: 1) Source and target framework + versions (FiveM: ESX / QBCore / Qbox; RedM: VORP / RSG; never across games). 2) Paste the resource. 3) Inventory on the target (Qbox normally uses ox_inventory).
TASK: First a mapping table: every framework call (player object, money, jobs, items, callbacks, notify) mapped to the target, with a doc/source link for both sides, or UNVERIFIED. Notes: on QBCore the core object is exports['qb-core']:GetCoreObject(). On Qbox, docs.qbox.re/converting says the core object no longer exists for native Qbox code (exports.qbx_core plus modules), though QB scripts are largely compatible; job/gang grades are numbers, not strings. Keep behaviour and every server-side check.
OUTPUT: mapping table, then diffs per file; list of DB changes with a backup step before any migration.
TEST: the same scripted scenarios on both frameworks; no validation removed; back up the DB before running SQL.

Example code an AI writes from this prompt: (we haven't tried it ourselves). Test it on a local server first.

Back to categories

Scaffolding & Exports

Scaffold a new resource with a correct fxmanifest.lua

Skill level: Beginner Game: FiveM + RedM

Rules: Use only natives, exports and events you can cite from docs.fivem.net (natives reference), my framework's official docs, or the source code I paste. Give a link next to each one. If you can't cite it, write UNVERIFIED and don't use it in code until I confirm. FiveM (gta5) and RedM (rdr3) natives and frameworks differ. Never mix them. If an answer below is missing, ask me only for that item, then wait.

CONTEXT: 1) Game. 2) Resource name. 3) Need UI? Need database (oxmysql)?
TASK: fxmanifest.lua with fx_version 'cerulean' and game 'gta5' or 'rdr3' (RedM: also add exactly rdr3_warning 'I acknowledge that this is a prerelease build of RedM, and I am aware my resources *will* become incompatible once RedM ships.'. FXServer refuses to start a RedM resource without it, per citizenfx/fivem ServerResources.cpp). Add client/, server/, shared/config.lua, and optionally html/ with ui_page + files. With oxmysql: '@oxmysql/lib/MySQL.lua' as the first server script and oxmysql in dependencies. Don't add lua54 (deprecated).
OUTPUT: file tree, every file in full, server.cfg ensure line, a "common mistakes" list (folder name vs resource name, missing files entries, ensure order).
TEST: starts with no manifest warnings; only client files are downloadable; restart works.

Example code an AI writes from this prompt: (we haven't tried it ourselves). Test it on a local server first.

Framework-agnostic exports bridge

Skill level: Experienced Developer Game: FiveM + RedM

Rules: Use only natives, exports and events you can cite from docs.fivem.net (natives reference), my framework's official docs, or the source code I paste. Give a link next to each one. If you can't cite it, write UNVERIFIED and don't use it in code until I confirm. FiveM (gta5) and RedM (rdr3) natives and frameworks differ. Never mix them. If an answer below is missing, ask me only for that item, then wait.

CONTEXT: 1) Game. 2) Which frameworks must be supported. 3) The functions to expose (paste them).
TASK: Expose functions with exports('name', fn). Add a bridge that detects the running framework by resource state, checking separately for: qbx_core (Qbox, native API), qb-core (QBCore), es_extended (ESX: UNVERIFIED name, confirm on your server), vorp_core / rsg-core (RedM: UNVERIFIED names, confirm), else standalone. Don't treat Qbox as QBCore.
OUTPUT: bridge file + export file(s) in full, a doc block per export (args, returns, side, example call), test steps.
TEST: works with each installed framework and with none; the export fails safely if the framework stops.

Example code an AI writes from this prompt: (we haven't tried it ourselves). Test it on a local server first.

Back to categories

Sources

The manifest fields, events, NUI, permission, database and framework APIs these prompts name were checked against these official docs. Where a framework has no API docs page, we link the function in its own official source code. Anything still unconfirmed (for example RedM horse natives) is tagged UNVERIFIED inside the prompt, which tells the AI to cite your installed version.