Documentation
R_FFA

r_ffa Creating Arenas

Add r_ffa arenas in config.lua: zones and spawn points, public lobbies, weapon sets and attachments, with a checklist for every new arena.

How it fits together

  • An arena is a place: the zone players must stay in, spawn points, duel spawns and an image.
  • A public lobby is a pre-configured match on an arena: weapon set, player limit and armor. Public lobbies are always listed in the hub.
  • Custom lobbies are created by players from the hub, they pick any arena that is not duelOnly, plus weapons from R.Weapons.
  • Duels use an arena's duelSpawns.

Arenas

R.Arenas = {
    paleto = {
        label = 'Paleto Bay',
        image = 'https://your-cdn/paleto.png',
        zone = { type = 'sphere', coords = vec3(-111.86, 6421.03, 31.43), radius = 90.0 },
        spawns = {
            vec3(-58.20, 6487.37, 31.50),
            vec3(-40.94, 6456.73, 35.25),
            vec3(-42.51, 6415.77, 31.49)
        },
        duelSpawns = { vec3(-58.20, 6487.37, 31.50), vec3(-119.29, 6357.80, 31.46) },
        allowDuel = true
    }
}
FieldDescription
key (paleto)Used by lobbies (arena = 'paleto'). Letters, numbers and underscores.
labelName shown in the hub.
imageCard image in the hub, the challenge popup and the duel result. Any URL or nui:// path.
zoneWhere players must stay. sphere (coords, radius) or poly (points, thickness).
spawnsRespawn points for FFA. A free one (no player within 15 m) is preferred.
duelSpawnsExactly two points: challenger and opponent. Required for allowDuel.
allowDuelWhether the arena can be picked for a duel.
duelOnlyHide the arena from public and custom lobbies (a dedicated 1v1 map).

Polygon zones follow the ox_lib format:

zone = {
    type = 'poly',
    thickness = 40.0,
    points = { vec3(x, y, z), vec3(x, y, z), vec3(x, y, z), vec3(x, y, z) }
}

Set R.Debug = true to draw the zones in-game while you place them.

Spawn points must be inside the zone, and the zone should be large enough that players are not pushed out by the geometry. The out-of-bounds countdown (R.Lobby.outOfBounds) gives them a few seconds to return before they die.

Public lobbies

R.Lobbies = {
    {
        id = 'paleto_pistols',
        arena = 'paleto',
        label = 'Paleto Bay',
        description = 'Pistols only',
        weapons = { 'weapon_pistol_mk2', 'weapon_vintagepistol', 'weapon_heavypistol' },
        maxPlayers = 20,
        armor = true
    }
}
FieldDescription
idUnique key. Used by the GetLobbyPlayerCount export.
arenaKey of the arena.
label / descriptionCard title and subtitle. image is optional and defaults to the arena image.
weaponsSpawn names. Every name must also exist in R.Weapons, unknown names are skipped with a console warning.
maxPlayersThe card shows Full when reached.
armorGives 100 armor on every spawn.

Weapon sets

R.Weapons is the master list: it decides which weapons players can pick for custom lobbies and duels, and provides the labels shown everywhere.

R.Weapons = {
    { name = 'weapon_pistol', label = 'Pistol' },
    { name = 'weapon_carbinerifle', label = 'Carbine Rifle' },
    { name = 'weapon_addon_ak74', label = 'AK-74' } -- add-on weapons work too
}

Images are resolved with R.WeaponImage (nui://ox_inventory/web/images/WEAPON_PISTOL.png by default). For add-on weapons drop a matching image into your inventory's image folder, or leave it the UI shows an icon instead.

Attachments

Attachments are global (see Configuration). The menu only enables the ones the current weapon accepts, so a pistol lobby simply shows fewer toggles.

Checklist for a new arena

Pick the area

Find a spot with cover and clear borders. Note the centre and a radius, or the corner points for a polygon.

Collect spawn points

Six to ten points spread over the area for FFA, and two facing points for duels.

Add the arena

Add the entry to R.Arenas with a key, label, image and the zone.

Add a public lobby (optional)

Add an entry to R.Lobbies that references the arena key and lists the weapons.

Test

restart r_ffa, join the lobby, walk to the edge of the zone and check the out-of-bounds countdown, then check every spawn point with a friend.