Skip to main content
Complete public, numbered, and private lobby configuration and API reference.
fnx-pvp-lobbies provides public, numbered, and private PVP lobbies with maps, loadouts, vehicles, respawning, permissions, stats, and leaderboards.

First installation

ensure oxmysql
ensure community_bridge

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

First setup

Edit both public cfg files. Verify every ID reference: lobby weapon IDs must exist in ServerCfg.Weapons, map IDs in ServerCfg.Maps, and vehicle names must be valid GTA models.

Client configuration

Plugin

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

Commands

Each command has its own enabled and name. Commands with key mappings also have key and keyDescription.
PathDefault purpose/key
Commands.open.enabledEnables the open command.
Commands.open.nameOpen command name, default lobbies.
Commands.runtime.enabledEnables the runtime-menu command/key.
Commands.runtime.nameRuntime command name, default lobbymenu.
Commands.runtime.keyDefault runtime-menu key, F5.
Commands.runtime.keyDescriptionRuntime keybind label.
Commands.leave.enabledEnables the leave command/key.
Commands.leave.nameLeave command name, default leavelobby.
Commands.leave.keyDefault leave key, F6.
Commands.leave.keyDescriptionLeave keybind label.
Commands.deleteVehicle.enabledEnables the vehicle-delete command/key.
Commands.deleteVehicle.nameDelete command name, default deletelobbyvehicle.
Commands.deleteVehicle.keyDefault delete key, K.
Commands.deleteVehicle.keyDescriptionDelete keybind label.
Commands.heal.enabledEnables the heal command/key.
Commands.heal.nameHeal command name, default lobbyheal.
Commands.heal.keyDefault heal key, F1.
Commands.heal.keyDescriptionHeal keybind label.
Commands.armor.enabledEnables the armor command/key.
Commands.armor.nameArmor command name, default lobbyarmor.
Commands.armor.keyDefault armor key, F2.
Commands.armor.keyDescriptionArmor keybind label.

Sections and actions

KeyExplanation
Sections.mapsShows the map section.
Sections.weaponsShows loadout selection.
Sections.vehiclesShows vehicle selection.
Sections.membersShows lobby members.
Sections.settingsShows lobby settings.
Actions.deleteVehicle.enabledEnables the delete-vehicle action.
Actions.heal.enabledEnables healing.
Actions.heal.durationHeal progress time in milliseconds.
Actions.heal.cooldownDelay between heals in milliseconds.
Actions.heal.healthTarget health; false restores maximum ped health.
Actions.heal.canCancelAllows cancelling progress.
Actions.heal.animation.dictHeal animation dictionary.
Actions.heal.animation.clipHeal animation clip.
Actions.heal.animation.flagGTA animation flag.
Actions.armor.enabledEnables armor action.
Actions.armor.durationArmor progress time in milliseconds.
Actions.armor.cooldownDelay between armor uses in milliseconds.
Actions.armor.amountArmor value applied.
Actions.armor.canCancelAllows cancelling progress.
Actions.armor.animation.dictArmor animation dictionary.
Actions.armor.animation.clipArmor animation clip.
Actions.armor.animation.flagGTA animation flag.

Runtime, death, respawn, and vehicles

KeyExplanation
Runtime.closePanelOnJoinCloses panel after joining.
Runtime.hud.enabledEnables lobby HUD.
Runtime.deathEventsEnables built-in death handling.
ClientCfg.DeathPlugin overrides for panel death defaults; empty inherits all defaults.
Respawn.manualRequires manual respawn input when true.
Respawn.controlGTA control ID; default 38 is E.
Respawn.promptLocale key for respawn prompt.
Vehicles.vehiclesOptional client vehicle allowlist/map. Empty does not add client restrictions.
Vehicles.excludedVehiclesVehicle models always blocked.
Vehicles.excludedClassesGTA vehicle class IDs blocked when their value is true.
Vehicles.spawn.replacePreviousDeletes/replaces the player’s previous lobby vehicle.
Vehicles.spawn.warpIntoVehicleSeats player after spawning.
Vehicles.spawn.distanceSpawn distance in game units.

Client hooks

KeyArguments
Events.OnLobbyJoinpayload
Events.OnLobbyLeavepayload
Events.OnLobbyTeleportmap
Events.OnLobbyLoadoutChangedloadout
Events.OnLobbyVehicleSpawnedvehicle, model
Events.OnPlayerDeadInLobbypayload, lobby
Events.OnPlayerRespawnInLobbylobby
Events.OnGameEventTriggeredOptional callback or nil.

Server configuration

Inventory and joining

KeyExplanation
Inventory.enabledEnables inventory management.
Inventory.keepInventoryDisables lobby inventory/loadout management and lets players keep items.
Inventory.modeauto, bridge, or native.
Inventory.weaponMetadata.enabledGives weapon ammo/components inside weapon metadata instead of as separate inventory items.
Inventory.weaponMetadata.durabilityDurability value written to weapon metadata when metadata mode is enabled.
Inventory.weaponMetadata.ammoStores configured ammo in weapon metadata and skips the separate ammo item grant.
Inventory.weaponMetadata.componentsStores selected components in weapon metadata and skips separate component item grants.
Inventory.ammoRefill.enabledEnables automatic ammo refill checks.
Inventory.ammoRefill.thresholdRefill only when current ammo is below this fraction of configured ammo.
Inventory.ammoRefill.respawnChecks/refills ammo after lobby respawn.
Join.warning.enabledEnables inventory-change warning.
Join.warning.holdSecondsRequired hold time in seconds.
Join.warning.timeoutSecondsExpiry time in seconds.

Rewards

ServerCfg.Rewards controls item/account rewards. Rewards are given independently from lobby 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 private panel, streak reward, or multiplier changes.
Logs.killsA lobby kill is recorded. On large servers this can be noisy/rate-limited.
Logs.joinA player joins a lobby.
Logs.exitA player exits, drops, or leaves a lobby, including kills/deaths.
Logs.createdA private lobby is created.
Logs.deletedA private lobby is deleted.
Logs.banA lobby owner bans a member.
Logs.kickA lobby owner kicks a member.
Logs.inventoryStoredA player’s inventory snapshot is stored before lobby loadout is applied.
Logs.inventoryRestoreA player’s original inventory and pending rewards are restored.

Lobby runtime

KeyExplanation
Lobbies.bucketBaseFirst public/private runtime bucket range base.
Lobbies.numberedBucketBaseFirst numbered-lobby bucket.
Lobbies.numberedLobbyMinLowest accepted lobby number.
Lobbies.numberedLobbyMaxHighest accepted lobby number.
Lobbies.numberedLobbyMaxPlayersCapacity of each numbered lobby.
Lobbies.returnBucketBucket restored on leave.
Lobbies.returnCoordsOptional return vec4.
Lobbies.privateIdStartStarting internal ID for private lobbies.
Lobbies.defaultPrivateMaxPlayersDefault private capacity.
Lobbies.maxPrivatePlayersMaximum configurable private capacity.
Lobbies.respawnSecondsDefault death-to-respawn delay.
Lobbies.defaultEloStarting lobby Elo.
Lobbies.defaultWeaponsWeapon IDs used as default selection.
Lobbies.publicPublic lobby definitions.

Public lobby schema

KeyExplanation
idUnique lobby ID.
nameDisplay name.
descriptionMenu description.
imageMenu image.
weaponsAllowed ServerCfg.Weapons[].id values; empty means unrestricted/all according to runtime handling.
mapsAllowed ServerCfg.Maps[].id values; empty means unrestricted/all.
vehiclesAllowed GTA vehicle model names; empty means no server list restriction.
maxPlayersLobby capacity.

Map schema

KeyExplanation
ServerCfg.Maps[].idUnique ID referenced by lobbies.
ServerCfg.Maps[].labelDisplay name.
ServerCfg.Maps[].imageMenu image source.
ServerCfg.Maps[].coordsTeleport vec4 and heading.

Weapon and component schema

KeyExplanation
Weapons[].idUnique ID referenced by lobby lists.
Weapons[].labelDisplay name.
Weapons[].hashGTA weapon hash.
Weapons[].ammoAmmo issued.
Weapons[].itemsData.weaponInventory weapon item.
Weapons[].itemsData.ammoInventory ammo item, when required.
Weapons[].componentsSelectable/issued component definitions.
components[].idUnique component selection ID.
components[].labelDisplay name.
components[].hashGTA component hash.
components[].itemInventory component item.

Server commands

KeyExplanation
Commands.joinNumberedLobby.activeEnables numbered lobby command.
.actionInternal action name joinNumberedLobby.
.nameCommand name lobby.
.helpHelp description.
.argumentsArgument definitions; default requires numeric number.
.argsrequiredRequires arguments.
.permissionBridge permission, default user.
Commands.givePrivatePanel.activeEnables permission grant command.
.nameGrant command name giveprivatelobbypanel.
.helpGrant help text.
.argumentsTarget server-ID definition.
.argsrequiredRequires target.
.permissionAdmin permission.
.allowedPermission value written; true grants.
Commands.removePrivatePanel.activeEnables permission removal command.
.nameRemove command name removeprivatelobbypanel.
.helpRemove help text.
.argumentsTarget server-ID definition.
.argsrequiredRequires target.
.permissionAdmin permission.
.allowedPermission value written; false removes.
Commands.giveStreakRewards.activeEnables streak reward access command.
.actionInternal action name giveStreakRewards.
.nameCommand name givelobbystreakrewards.
.permissionAdmin permission by default.
Commands.setRewardMultiplier.activeEnables reward multiplier command.
.actionInternal action name setRewardMultiplier.
.nameCommand name setlobbyrewardmultiplier.
.argumentsRequires player ID and multiplier.
.permissionAdmin permission by default.

Server hooks

KeyArguments
Events.OnLobbyCreatedlobby
Events.OnLobbyDestroyedlobby, reason
Events.OnLobbyJoinplayer, lobby
Events.OnLobbyLeaveplayer, lobby, dropped
Events.OnPlayerDeadInLobbyvictim, killer, payload, lobby
Events.OnPlayerKillInLobbykiller, victim, payload, lobby

Shared files

Private shared files contain internal bridge/constants. There is no public shared cfg.

Theme system

Every theme key controls a separate CSS variable:
KeyControls
colors.panelBgMain background.
colors.panelBgStrongDark background.
colors.accentPrimary accent.
colors.accentStrongStrong accent.
colors.accentSoftTransparent accent surface.
colors.accentBorderAccent border.
colors.progressFillProgress fill.
colors.textPrimary text.
colors.mutedTextMuted text.
colors.subtleTextMore subtle text.
colors.surfaceNormal surface.
colors.surfaceStrongStrong surface.
colors.surfaceSoftSoft surface.
colors.surfaceHoverHovered surface.
colors.controlBgInput/control background.
colors.segmentedBgSegmented-control background.
colors.selectionBgSelected-item background.
colors.avatarBgAvatar background.
colors.avatarBorderAvatar border.
colors.ratingBgRating block background.
colors.ratingTrackRating progress track.
colors.mutedTextStrongStrong muted text.
colors.softTextSoft text.
colors.disabledTextDisabled text.
colors.statTextStatistic text.
colors.scrollbarThumbScrollbar thumb.
colors.borderNormal border.
colors.borderStrongStrong border.
colors.borderSelectedSelected border.
colors.overlayModal overlay.
colors.imageOverlayCSS image overlay/gradient.
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 tier.
colors.ratingMasterMaster tier.
colors.ratingDiamondDiamond tier.
colors.ratingPlatinumPlatinum tier.
colors.ratingGoldGold tier.
colors.ratingSilverSilver tier.
colors.ratingBaseBase tier.
radii.panelPanel radius.
radii.cardCard radius.
radii.controlControl radius.
radii.mapCardMap-card radius.
radii.mapImageMap-image radius.
radii.pillPill radius.
fonts.bodyBody font stack.
fonts.displayDisplay font stack.

Developer info

Client exports

ExportParametersReturns / purpose
OpenMenunoneOpens the lobby browser.
CloseMenunoneCloses the lobby browser.
OpenRuntimeMenunoneOpens the menu used while already inside a lobby.
IsInLobbynoneReturns whether the local player is in a PVP lobby.
ReportDeathpayloadReports a local lobby death.
CanReportDeathnoneReturns whether a new death report is accepted.
HandleDamageEventeventName, argsPasses a game damage event into lobby death handling.

Server exports

ExportParametersReturns / purpose
GetLeaderboardPagerequestReturns the requested lobby leaderboard page.
IsInLobbysourceReturns whether the server player is inside a lobby.
GetLobbysourceReturns the lobby associated with the player.
GetLeaderboardEntrieslimit, sortMetricReturns lobby leaderboard entries with optional limit and sorting.

Common issues

Lobby content is missing

IDs must match exactly across public lobby, map, and weapon tables.

Vehicle is blocked

Check allowed vehicles, excludedVehicles, and every true entry in excludedClasses.

Inventory restore fails

Check inventory mode and all weapon/ammo/component item names.

Some selected weapons are not given

The resource applies each selected weapon as one package containing the weapon, its ammunition, and selected components. If the complete package does not fit, only that weapon is skipped. The player remains in the lobby, receives every other package that fits, and sees one notification with the number of skipped weapons.

Players enter the wrong instance

Ensure all bucket bases/ranges are unique across server resources.

Text shows broken characters

Save the cfg as UTF-8; some current descriptions show a mis-decoded em dash (—).

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-lobbies/
|-- client/
|   |-- private/
|   |   \-- _main.lua
|   \-- public/
|       \-- main.lua
|-- locales/
|   \-- *.json
|-- server/
|   |-- private/
|   |   |-- _database.lua
|   |   |-- _events.lua
|   |   |-- _inventory.lua
|   |   |-- _lobbies.lua
|   |   |-- _main.lua
|   |   |-- _maps.lua
|   |   |-- _runtime.lua
|   |   |-- _state.lua
|   |   \-- _stats.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