Skip to main content
Complete installation, death system, NPC, theme, revive, and API reference.
fnx-pvp-panel is the core profile, settings, plugin, death, and revive service used by the PVP suite.

First installation

ensure oxmysql
ensure community_bridge

ensure fnx-pvp-panel
Start your framework, inventory, clothing, and ambulance resources before the panel so the bridge and revive auto-detection can see them. The resource creates its required database tables automatically. You do not need to import an SQL file.

First setup

Edit settings/public/client/cfg.lua and settings/public/server/cfg.lua. Configure access, death behavior, only the NPC sets used by your lobby, admin permissions, spawn lobby, and revive integration.

Client configuration

Access

KeyDefaultExplanation
Access.enabledtrueEnables panel command/key access.
Access.name"pvppanel"Command name without /.
Access.key"F7"Default FiveM key mapping.
Access.keyDescription"Open PVP Panel"Label in FiveM keybind settings.

Death defaults

KeyDefaultExplanation
Death.freezetrueFreezes the dead player’s ped.
Death.invisiblefalseControls normal/entity visibility while dead.
Death.invincibletruePrevents additional damage while in death state.
Death.localInvisibletrueHides the ped locally during death state.
Death.animation.enabledtrueEnables the death animation.
Death.animation.dict"dead"GTA animation dictionary.
Death.animation.name"dead_a"Animation clip name.
Death.animation.flag1GTA animation playback flag.
Death.revive.frameworktrueAllows configured framework/ambulance revive.
Death.revive.nativetrueAllows native local respawn handling.
Death.timing.preDelayMs2500Milliseconds before death-state setup continues.
Death.timing.postFrameworkWaitMs600Wait after triggering framework revive.
Death.fade.enabledtrueEnables death/respawn screen fades.
Death.fade.outMs250Fade-out duration in milliseconds.
Death.fade.inMs250Fade-in duration in milliseconds.
Plugin ClientCfg.Death tables override matching fields and inherit the rest.

NPC action schema

ClientCfg.PedActions is an array. Every entry supports:
KeyExplanation
enabledCreates the NPC when true.
resourceOne resource name or an array of acceptable/associated resources used to decide availability.
coordsNPC vec4: X, Y, Z, heading.
modelGTA ped model name.
scenarioGTA scenario string or nil.
freezeFreezes the NPC in place.
invinciblePrevents NPC damage.
interactControlFiveM/GTA control ID; 38 is normally E.
interactDistanceMaximum interaction distance.
drawDistanceMaximum distance for prompt/NPC processing.
promptInteraction text displayed to the player.
weaponsWeapon names associated with/removed for this interaction by its runtime behavior.
blip.enabledCreates the map blip.
blip.spriteGTA blip sprite ID.
blip.colorGTA blip color ID.
blip.scaleBlip size multiplier.
blip.labelMap legend label.
actionClient function executed on interaction; receives the NPC config as self.
The included list contains separate NPC groups for spawnlobby v1, v2, and v3. Disable or remove groups you do not use.

Advertisements

KeyExplanation
Ads[].idUnique card ID.
Ads[].titleCard heading.
Ads[].iconFont Awesome icon class.
Ads[].markdownMarkdown content, including supported links/images.

Server configuration

Spawn lobby

KeyExplanation
Lobby.spawnOnPlayerLoadedEnables automatic lobby spawn. Default is true only when the bridge framework is default.
Lobby.bucketRouting bucket assigned at lobby spawn.
Lobby.delayMsDelay after player load before teleporting.
Lobby.mapsCandidate spawn definitions.
Lobby.maps[].forceUseThisForces this candidate instead of normal resource-based selection. Enable only one forced candidate.
Lobby.maps[].resourceAssociated/accepted map resource names.
Lobby.maps[].coordsArray of possible spawn vec4 values.

Bridge events

ServerCfg.BridgeEvents lets standalone or custom-framework servers forward their own load/unload events into the panel/community bridge lifecycle.
KeyExplanation
BridgeEvents.playerLoaded.activeEnables the custom player-loaded event forwarder.
BridgeEvents.playerLoaded.eventSource event name to listen for.
BridgeEvents.playerLoaded.delayMsOptional delay before forwarding.
BridgeEvents.playerLoaded.sourceFunction that receives the event arguments and returns the player source.
BridgeEvents.playerUnload.activeEnables the custom player-unload event forwarder.
BridgeEvents.playerUnload.eventSource event name to listen for.
BridgeEvents.playerUnload.delayMsOptional delay before forwarding.
BridgeEvents.playerUnload.sourceFunction that receives the event arguments and returns the player source.
Use this only when the normal bridge/framework load and unload events are not available.

Command schema

Both giveNicknameChange and giveImageChange use these keys:
KeyExplanation
activeRegisters/enables the command.
nameCommand name.
helpHelp text.
argumentsCommand argument definitions.
arguments[].nameArgument identifier.
arguments[].typeBridge argument type.
arguments[].helpArgument help text.
argsrequiredRequires supplied arguments.
callbackServer function run by the command. Default grants nickname/avatar edit permission.
permissionRequired bridge permission, default admin.
FunctionExplanation
ServerCfg.IsAdmin(source)Final server-side admin check. Adapt it to your permission system if bridge framework admin detection is not enough.
ServerCfg.FrameworkRevive(source, payload)Sends the selected REVIVE_EVENT to one client. Replace it for a custom revive API.

Shared files and automatic revive

shared/public/_main.lua selects one revive event when the panel starts. Selection priority is:
Detected resourceSelected event
qbx_medical or qbx_ambulancejobqbx_medical:client:playerRevived
esx_ambulancejobesx_ambulancejob:revive
p_ambulancejobp_ambulancejob/client/death/revive
brutal_ambulancejobbrutal_ambulancejob:revive
ars_ambulancejobpvp-panel:revive:ars_ambulancejob (ars_ambulancejob:healPlayer)
tk_ambulancejobpvp-panel:revive:tk_ambulancejob (exports.tk_ambulancejob:revive)
ak47_qb_ambulancejobak47_qb_ambulancejob:revive
ak47_ambulancejobak47_ambulancejob:revive
qb-ambulancejobhospital:client:Revive
wasabi_ambulance_v2pvp-panel:revive:wasabi_ambulance_v2 (exports['wasabi_ambulance_v2']:RevivePlayer)
wasabi_ambulancepvp-panel:revive:wasabi_ambulance (exports['wasabi_ambulance']:RevivePlayer)
none detectedfallback esx_ambulancejob:revive
Detection happens while the shared file loads. Start the medical resource before the panel or restart the panel after changing medical resources.

Theme system

KeyExplanation
colors.panelBgMain panel background.
colors.panelBgStrongDarker background.
colors.accentPrimary highlight. Use a valid CSS color including # for hex.
colors.accentStrongStrong highlight.
colors.textPrimary text.
colors.mutedTextSecondary text.
colors.surfaceNormal surface.
colors.surfaceStrongStrong surface.
colors.borderBorders.
colors.overlayModal overlay.
colors.successSuccess foreground.
colors.successBgSuccess background.
colors.dangerDanger foreground.
colors.dangerBgDanger background.
colors.warningWarning foreground.
colors.warningBgWarning background.
colors.infoInfo foreground.
colors.infoBgInfo background.
colors.ratingEliteElite rating.
colors.ratingMasterMaster rating.
colors.ratingDiamondDiamond rating.
colors.ratingPlatinumPlatinum rating.
colors.ratingGoldGold rating.
colors.ratingSilverSilver rating.
colors.ratingBaseBase rating.
radii.panelPanel radius in pixels.
radii.cardCard radius.
radii.controlControl radius.
radii.pillPill radius.
layout.widthPanel width in pixels.
layout.heightPanel height in pixels.
layout.sidebarWidthSidebar width in pixels.
notifications.positionNotification stack anchor: top-left, top-center, top-right, center-left, center, center-right, bottom-left, bottom-center, or bottom-right.
notifications.offsetNotification offset { x, y } from the selected anchor.
notifications.widthNotification width in pixels.
notifications.maxItemsMaximum visible notifications.
notifications.gapGap between notifications in pixels.
notifications.paddingInner notification padding in pixels.
notifications.iconSizeNotification icon size in pixels.
notifications.closeSizeClose button size in pixels.
notifications.colorsPer-type notification foreground/background colors for success, error, warning, and info.
effects.logoOpacityLogo opacity from 0 to 1.
fonts.bodyBody CSS font stack.
fonts.displayHeading CSS font stack.
The current cfg values FF1638F9 and FF3CFBF1 are not standard CSS hex strings because they lack #. Use values such as #1638F9 or an explicit rgba() value.

Developer info

Client exports

ExportPurpose
RegisterPlugin(plugin)Registers a panel plugin.
OpenPanel()Opens the main panel.
OpenPlugin(pluginId)Opens a registered plugin.
ClosePanel()Closes the panel.
IsOpen()Returns panel visibility.
GetSettings()Returns local panel settings.
GetDeathConfig(overrides)Resolves merged death configuration.
BeginDeathState(overrides)Begins death state and returns setup timing.
RespawnLocalPlayer(coords, overrides)Performs local respawn and returns fade timing.
EndDeathState(overrides)Cleans up death state.
BuildLocalDeathPayload(args)Normalizes a local death payload.

Server exports

ExportParametersReturns / purpose
OpenForPlayersourceOpens the PVP panel for one server player.
CloseForPlayersourceCloses the panel for one server player.
RegisterStatsProviderpluginId, providerRegisters a server callback that supplies panel statistics.
RegisterRankProviderpluginId, providerRegisters a server callback that supplies panel rank information.
SyncPlayersourceSynchronizes panel data for one connected player.
SyncIdentifieridentifierSynchronizes data associated with an identifier.
GetIdentifiersourceReturns the bridge/framework identifier for a player.
GetDisplayNamesourceReturns the player’s resolved display name.
GetSourceFromIdentifieridentifierReturns the connected server ID associated with an identifier, when available.
GetPublicProfileidentifier, fallbackNameReturns the public profile, using the supplied fallback name when necessary.
GetSettingsidentifierReturns stored panel settings for an identifier.
GetStoredNameidentifier, fallbackNameReturns the stored custom name or the fallback.
SetStoredNameidentifier, displayNameSaves a display name for an identifier.
FrameworkRevivesource, payloadRuns the configured server revive function for one player.

Shared exports

ExportParametersReturns / purpose
GetReviveEventnoneReturns the revive event selected when the Panel resource loaded.

Common issues

Panel does not open

Check start order, Access.enabled, command name, and the player’s FiveM key mapping.

Wrong medical event is selected

Start the intended medical resource before the panel. When multiple supported resources run, the first match in the documented priority wins.

NPC is missing

Check enabled state, resource requirements, coordinates, model, and draw distance.

Theme accent is ignored

Use valid CSS strings. Add # to hexadecimal values.

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-panel/
|-- bridge/
|   |-- client.lua
|   \-- server.lua
|-- client/
|   |-- private/
|   |   \-- _main.lua
|   \-- public/
|       |-- death.lua
|       |-- deathstate.lua
|       \-- main.lua
|-- locales/
|   \-- *.json
|-- server/
|   |-- private/
|   |   \-- _main.lua
|   \-- public/
|       \-- main.lua
|-- settings/
|   |-- private/
|   |   |-- client/
|   |   |   \-- _cfg.lua
|   |   \-- server/
|   |       \-- _cfg.lua
|   \-- public/
|       |-- client/
|       |   \-- cfg.lua
|       \-- server/
|           \-- cfg.lua
|-- shared/
|   |-- private/
|   |   \-- _main.lua
|   \-- public/
|       \-- _main.lua
|-- web/
|   \-- dist/
\-- fxmanifest.lua