Example Manifests
Ready-to-use cfxainstall.yml files for common resource types. Each example is annotated with the intent behind every task.
Multi-character selector
Installs a QBCore/QBox multi-character selector, optionally removing the default qb-spawn resource and patching the QBox core to enable external character selection. Demonstrates install options, conditional remove_resource, patch_lua_value, and comment_line / uncomment_line.
remove_resource, a patch_lua_value on a QBox core dependency, and comment_line / uncomment_line for fxmanifest management across QBCore vs QBox.
schemaVersion: "1.0"
id: qb-multicharacter
name: QB Multicharacter
version: "1.x"
author: YourName
description: Multi-character selector for QBCore and QBox servers.
integrationCategory: Multicharacter
tasks:
# ── Install Options ──────────────────────────────────────────────────────
- action: install_option
key: remove_qb_spawn
type: boolean
label: "Replace qb-spawn with built-in spawn selector"
description: "Removes qb-spawn and uses the resource's built-in spawn selector."
default: "false"
group: "Spawn Selector"
# ── Remove conflicting resources ─────────────────────────────────────────
- action: operation
operationType: remove_resource
target: qb-spawn
condition: "opt:remove_qb_spawn=true"
description: "Remove qb-spawn (using built-in spawn selector)"
# ── QBox: enable external characters ────────────────────────────────────
- action: operation
operationType: patch_lua_value
target: qbx_core
file: config/client.lua
luaPath: useExternalCharacters
value: "true"
condition: "framework=qbx"
description: "Set qbx_core useExternalCharacters = true (required for QBox)"
# ── fxmanifest.lua: qb-apartments dependency ─────────────────────────────
- action: operation
operationType: comment_line
target: qb-multicharacter
file: fxmanifest.lua
value: "@qb-apartments/config.lua"
condition: "framework=qbx"
description: "Comment out @qb-apartments/config.lua (not needed on QBox)"
- action: operation
operationType: uncomment_line
target: qb-multicharacter
file: fxmanifest.lua
value: "@qb-apartments/config.lua"
condition: "framework=qb"
description: "Ensure @qb-apartments/config.lua is active (QBCore)"
Generic resource
A minimal template demonstrating all supported operation types, multiple option types (boolean, choice), and how whenMissing controls graceful degradation when files aren't present.
patch_lua_value, remove_resource with whenMissing: skip, copy_file with whenMissing: warn, and an add_note post-install message.
schemaVersion: "1.0"
id: my-resource
name: My Resource
version: "1.0.0"
author: YourName
description: A generic resource demonstrating all supported task types.
metadata:
docsUrl: "https://github.com/example/my-resource"
tasks:
# ── Install Options ──────────────────────────────────────────────────────
- action: install_option
key: enable_hud
type: boolean
label: "Enable HUD integration"
description: "Patches config to enable the built-in HUD."
default: "true"
group: "Features"
- action: install_option
key: framework_override
type: choice
label: "Framework"
description: "Select your server framework."
choices: ["auto", "qbcore", "esx"]
default: "auto"
required: true
group: "Framework"
# ── Operations ───────────────────────────────────────────────────────────
- action: operation
operationType: patch_lua_value
target: my-resource
file: config/shared.lua
luaPath: Config.EnableHud
value: "true"
condition: "opt:enable_hud=true"
description: "Enable HUD in config"
- action: operation
operationType: remove_resource
target: old-my-resource
description: "Remove legacy version"
whenMissing: skip
- action: operation
operationType: copy_file
target: my-resource
source: templates/config.example.lua
destination: config/config.lua
whenMissing: warn
description: "Copy default config template"
# ── Notes ────────────────────────────────────────────────────────────────
- action: add_note
message: "Remember to restart your server after installation."
Multi-framework banking resource
Shows how to patch framework-specific config values using conditions, declare multiple install options, use requiresFeatures to advertise capability requirements, and include a SQL reminder note. File paths and Lua keys are illustrative — adapt them to match the actual resource config structure.
requiresFeatures, two boolean install options, a conditional remove_resource, three mutually-exclusive framework patch_lua_value ops, option-gated config patches, and a post-install SQL note.
schemaVersion: "1.0"
id: ox_banking
name: OX Banking
version: "1.x"
author: YourName
description: Advanced banking resource supporting QBCore, QBox, and ESX.
integrationCategory: Banking
requiresFeatures:
- lua_patch
tasks:
# ── Install Options ──────────────────────────────────────────────────────
- action: install_option
key: atm_blips
type: boolean
label: "Show ATM blips on map"
default: "true"
group: "Features"
- action: install_option
key: transaction_log
type: boolean
label: "Enable transaction logging"
description: "Logs all transactions to the database for admin review."
default: "false"
group: "Features"
# ── Remove conflicting banking ───────────────────────────────────────────
- action: operation
operationType: remove_resource
target: qb-banking
condition: "framework=qb|qbx"
description: "Remove qb-banking (replaced by ox_banking)"
# ── Framework-specific config ────────────────────────────────────────────
- action: operation
operationType: patch_lua_value
target: ox_banking
file: shared/config.lua
luaPath: Config.Framework
value: "'QBCore'"
condition: "framework=qb"
- action: operation
operationType: patch_lua_value
target: ox_banking
file: shared/config.lua
luaPath: Config.Framework
value: "'QBX'"
condition: "framework=qbx"
- action: operation
operationType: patch_lua_value
target: ox_banking
file: shared/config.lua
luaPath: Config.Framework
value: "'ESX'"
condition: "framework=esx"
# ── Feature flags ────────────────────────────────────────────────────────
- action: operation
operationType: patch_lua_value
target: ox_banking
file: shared/config.lua
luaPath: Config.ShowAtmBlips
value: "true"
condition: "opt:atm_blips=true"
- action: operation
operationType: patch_lua_value
target: ox_banking
file: shared/config.lua
luaPath: Config.TransactionLog
value: "true"
condition: "opt:transaction_log=true"
# ── Notes ────────────────────────────────────────────────────────────────
- action: add_note
message: "Import ox_banking.sql into your database if this is a fresh install."