Skip to main content
Complete Redzone installation, game-mode, hook, theme, and API reference.
fnx-pvp-redzone runs instanced free-for-all combat zones with loadouts, boundaries, respawns, stats, and leaderboards.

First installation

ensure oxmysql
ensure community_bridge

ensure fnx-pvp-panel
ensure fnx-pvp-killfeed
ensure fnx-pvp-redzone
The resource creates its required database tables automatically. You do not need to import an SQL file.

First setup

Edit both public cfg files. Test every respawn, polygon, inventory item, return bucket, and optional map dependency.

Client configuration

Plugin

KeyDefaultExplanation
Plugin.id"redzone"Unique panel plugin ID.
Plugin.labelKey"plugins.redzone.label"Title locale key.
Plugin.descriptionKey"plugins.redzone.description"Description locale key.
Plugin.icon"fa-solid fa-crosshairs"Font Awesome icon.
Plugin.resourcePVP_REDZONE_RESOURCEResource owning the plugin.
Plugin.ui"web/dist/index.html"Built NUI page.
Plugin.order35Panel sort position.
Plugin.enabledtrueEnables registration.

Commands, runtime, death, and respawn

KeyDefaultExplanation
Commands.open.enabledtrueEnables /redzone.
Commands.open.name"redzone"Open command name.
Commands.leave.enabledtrueEnables leave command/key.
Commands.leave.name"leaveredzone"Leave command name.
Commands.leave.key"F6"Default leave key.
Commands.leave.keyDescription"Leave Redzone"FiveM keybind label.
Runtime.closePanelOnJointrueCloses the panel on join.
Runtime.deathEventstrueEnables built-in death-event handling. Disable when a custom detector is the only source.
Runtime.invincible.enabledtrueMaster switch for transition invincibility.
Runtime.invincible.beforeRoundtrueProtects before combat begins.
Runtime.invincible.afterRoundtrueProtects after combat/round end.
Runtime.outOfArea.timeoutSeconds5Seconds allowed outside the polygon.
Runtime.outOfArea.disableFiringtrueBlocks firing while outside.
Runtime.returnCoordsnilOptional client return vec4.
ClientCfg.Death{}Overrides panel death defaults; empty inherits all defaults.
Respawn.mode"area"Respawn selection strategy; area uses configured mode spawns.

Client hooks

KeyArgumentsCalled when
Events.OnRedzoneJoinpayloadJoining; default code equips the ox_inventory weapon.
Events.OnRedzoneLeavenoneLeaving.
Events.OnRedzoneHudOpenpayloadHUD opens.
Events.OnRedzoneHudUpdatepayloadHUD changes.
Events.OnPlayerDeadOnRedzonepayload, modeLocal player death is accepted.
Events.OnPlayerRespawnOnRedzonemodeLocal respawn; default code equips ox_inventory weapon.
Events.OnGameEventTriggeredcallback or nilOptional raw game-event callback.

Server configuration

KeyDefaultExplanation
Inventory.enabledbridge-dependentEnables inventory handling.
Inventory.keepInventoryfalseDisables Redzone inventory/loadout management and lets players keep items.
Inventory.mode"auto"auto, bridge, or native.
Inventory.weaponMetadata.enabledtrueGives weapon ammo/components inside weapon metadata instead of as separate inventory items.
Inventory.weaponMetadata.durability10000Durability value written to weapon metadata when metadata mode is enabled.
Inventory.weaponMetadata.ammotrueStores configured ammo in weapon metadata and skips the separate ammo item grant.
Inventory.weaponMetadata.componentstrueStores configured components in weapon metadata and skips separate component item grants.
Inventory.ammoRefill.enabledtrueEnables automatic ammo refill checks.
Inventory.ammoRefill.threshold0.5Refill only when current ammo is below this fraction of configured ammo.
Inventory.ammoRefill.respawntrueChecks/refills ammo after Redzone respawn.
Join.warning.enabledbridge-dependentEnables inventory-change warning.
Join.warning.holdSeconds1Confirmation hold time in seconds.
Join.warning.timeoutSeconds30Confirmation expiry in seconds.
Redzone.returnCoordsnilOptional server return vec4.
Redzone.bucketBase60000First Redzone routing bucket.
Redzone.returnBucket0Bucket restored on leave.
Runtime.defaultElo0Starting Redzone Elo.
Runtime.gamemodesarrayAvailable modes.

Rewards

ServerCfg.Rewards controls item/account rewards. Rewards are given independently from Redzone loadouts, so they still work when Inventory.keepInventory is true.
KeyExplanation
Rewards.kill.enabledEnables rewards for every kill.
Rewards.kill.itemsItems/accounts given on kill.
Rewards.killStreaks.enabledEnables killstreak rewards.
Rewards.killStreaks.publicWhen false, players need command-granted access before receiving streak rewards.
Rewards.killStreaks.rewards[streak]Rewards given when the player reaches that streak value.
reward.itemInventory item name given through the configured inventory bridge.
reward.accountFramework account name such as bank; requires a framework/account bridge.
reward.amountBase reward amount. It is multiplied by the player’s reward multiplier.
reward.metadataOptional item metadata passed to the inventory.

Logs

Each log category supports enabled, username, avatar, webhooks, and embed. webhooks is an array, so one category can send to multiple Discord webhooks. embed is a Lua function and can be fully customized per server.
CategorySent when
Logs.adminAdmin/internal actions such as reward permission or multiplier changes.
Logs.killsA Redzone kill is recorded. On large servers this can be noisy/rate-limited.
Logs.joinA player joins a Redzone mode.
Logs.exitA player exits or drops from Redzone, including kills/deaths.
Logs.inventoryStoredA player’s inventory snapshot is stored before Redzone loadout is applied.
Logs.inventoryRestoreA player’s original inventory and pending rewards are restored.

Reward commands

KeyExplanation
Commands.giveStreakRewards.activeRegisters the streak reward access command.
Commands.giveStreakRewards.nameDefault command name: giveredzonestreakrewards.
Commands.giveStreakRewards.permissionPermission required to use the command.
Commands.setRewardMultiplier.activeRegisters the reward multiplier command.
Commands.setRewardMultiplier.nameDefault command name: setredzonerewardmultiplier.
Commands.setRewardMultiplier.permissionPermission required to use the command.

Game-mode schema

KeyTypeExplanation
idnumber/stringUnique mode ID.
namestringDisplay name.
descriptionstringMenu description.
imagestringMenu image source.
resourcestring/array or nilOptional required map resource names.
maxPlayersnumberMode capacity.
respawnPointsvector4 arrayRandom/available spawn positions and headings.
area.typestringArea type; defaults use poly.
area.pointsvector3 arrayPolygon vertices in boundary order.
area.thicknessnumberVertical polygon tolerance.
area.debugbooleanDisplays area debugging. Disable in production.
respawnTimenumberDeath-to-respawn delay in seconds.
weaponsarrayMode loadouts.

Weapon schema

KeyExplanation
idUnique loadout ID.
hashFiveM weapon hash.
labelHuman-readable name.
ammoAmmo issued.
componentsGTA component hashes applied to the weapon.
itemsData.weaponInventory weapon item.
itemsData.ammoInventory ammo item.
itemsData.componentsInventory component items.

Server hooks

KeyArgumentsCalled when
Events.OnRedzoneJoinplayer, modePlayer joins.
Events.OnRedzoneLeaveplayer, mode, droppedPlayer leaves/disconnects.
Events.OnPlayerDeadOnRedzonevictimPlayer, killerPlayer, payload, modeDeath is accepted.
Events.OnPlayerKillOnRedzonekillerPlayer, victimPlayer, payload, modeKill is accepted.

Shared files

Private shared files contain internal helpers. There is no public shared cfg.

Theme system

KeyControls
colors.panelBgMain background.
colors.panelBgStrongDark background.
colors.accentPrimary highlight.
colors.accentStrongStrong highlight.
colors.textPrimary text.
colors.mutedTextSecondary text.
colors.surfaceCard surface.
colors.surfaceStrongStrong card surface.
colors.borderBorders.
colors.overlayOverlay.
colors.successSuccess foreground.
colors.successBgSuccess background.
colors.dangerDanger foreground.
colors.dangerBgDanger background.
colors.warningWarning foreground.
colors.warningBgWarning background.
colors.infoInfo foreground.
colors.infoBgInfo background.
radii.panelPanel radius in pixels.
radii.cardCard radius.
radii.controlControl radius.
radii.pillPill/badge radius.
fonts.bodyNormal-text font stack.
fonts.displayHeading font stack.

Developer info

Client exports

ExportParametersReturns / purpose
OpenMenunoneOpens the Redzone menu.
CloseMenunoneCloses the Redzone menu.
IsInRedzonenoneReturns whether the local player is currently in Redzone.
SetHudpayloadReplaces or opens the Redzone HUD data.
ReportDeathpayloadReports a local Redzone death to the resource.
CanReportDeathnoneReturns whether a new death report is currently accepted.
HandleDamageEventeventName, argsPasses a game damage event into Redzone death handling.

Server exports

ExportParametersReturns / purpose
GetLeaderboardPagerequestReturns the requested Redzone leaderboard page.
GetLeaderboardEntrieslimit, sortMetricReturns Redzone leaderboard entries with optional limit and sorting.

Common issues

Immediately outside the zone

Check polygon order, Z values, and thickness; enable debug temporarily.

Spawning inside objects

Test every respawnPoints entry and keep it inside the polygon.

Loadouts fail

Verify inventory mode plus weapon, ammo, and component item names.

Some configured weapons are not given

Each weapon is applied with its ammunition and components as one package. If a complete package does not fit, only that weapon is skipped. Other weapons are still given and the player receives one notification showing how many weapons were skipped.

Deaths count twice

Use built-in detection or one custom reporter, and check CanReportDeath() first.

Common folders

PathWhat it is for
fxmanifest.luaFiveM manifest. It loads the resource files in the correct order.
settings/public/client/cfg.luaClient settings that server owners are expected to edit.
settings/public/server/cfg.luaServer settings that server owners are expected to edit.
settings/private/**/_cfg.luaInternal/default settings. Do not edit unless you are modifying the resource itself.
client/public/*.luaPublic client API files and safe integration files.
client/private/*.luaInternal client runtime code.
server/public/*.luaPublic server API files and exports.
server/private/*.luaInternal server runtime code.
shared/public/*.luaShared public data or integration constants.
shared/private/*.luaShared internal helpers loaded by the resource.
locales/*.jsonLocales for ui and game.
web/dist/Built NUI files used in-game. Do not edit these by hand.
fnx-pvp-redzone/
|-- client/
|   |-- private/
|   |   \-- _main.lua
|   \-- public/
|       \-- main.lua
|-- locales/
|   \-- *.json
|-- server/
|   |-- private/
|   |   |-- _database.lua
|   |   |-- _events.lua
|   |   |-- _inventory.lua
|   |   |-- _main.lua
|   |   |-- _modes.lua
|   |   |-- _runtime.lua
|   |   \-- _state.lua
|   \-- public/
|       \-- main.lua
|-- settings/
|   |-- private/
|   |   |-- client/
|   |   |   \-- _cfg.lua
|   |   \-- server/
|   |       \-- _cfg.lua
|   \-- public/
|       |-- client/
|       |   \-- cfg.lua
|       \-- server/
|           \-- cfg.lua
|-- shared/
|   \-- private/
|       \-- _main.lua
|-- web/
|   \-- dist/
\-- fxmanifest.lua