Skip to main content

Map Structure

R_FFA uses two separate configurations:
  1. Maps - Define available maps with weapons and settings
  2. Arenas - Define physical arena locations and zones

Creating a Map

Add to R.Maps in config.lua:
R.Maps = {
    {
        Name = "Pistol Arena",
        Image = "https://your-image-url.png",
        Description = "Only pistols allowed",
        Weapons = {
            "weapon_pistol",
            "weapon_pistol_mk2",
            "weapon_combatpistol",
        },
        MaxPlayers = 20,
        UseArmor = true,
        MapId = 1, -- Must match Arena
    },
}

Map Parameters

ParameterTypeDescription
NamestringDisplay name of the map
ImagestringURL to map image
DescriptionstringShort description
WeaponstableList of weapon spawn names
MaxPlayersnumberMaximum players allowed
UseArmorbooleanGive players armor
MapIdnumberLinks to Arena

Creating an Arena

Add to R.Arenas in config.lua:
R.Arenas = {
    {
        Name = "Pistol Arena",
        Image = "https://your-image-url.png",
        Route = 3131456579, -- Interior route (if needed)
        Is1v1Map = false,

        -- 1v1 spawn points (required for 1v1 maps)
        P1Spawn = vector3(-268.64, -1584.75, 31.84),
        P2Spawn = vector3(-262.80, -1556.67, 31.84),

        -- FFA spawn points
        SpawnPoints = {
            vec3(-58.20, 6487.37, 31.50),
            vec3(-40.94, 6456.73, 35.25),
            vec3(-42.51, 6415.77, 31.49),
        },

        -- Arena zone
        ZoneType = "Sphere",
        RadiusOrThickness = 90.0,
        Coords = vec3(-111.86, 6421.03, 31.43),
    },
}

Arena Parameters

ParameterTypeDescription
NamestringMust match Map name
ImagestringURL to arena image
RoutenumberInterior route (use 0 for outdoor)
Is1v1MapbooleanEnable 1v1 mode
P1Spawnvector3Player 1 spawn (1v1)
P2Spawnvector3Player 2 spawn (1v1)
SpawnPointstableList of FFA spawn points
ZoneTypestring”Sphere” or “Poly”
RadiusOrThicknessnumberZone size/thickness
Coordsvector3Zone center

Getting Coordinates

1

Go to Location

Travel to your desired arena location
2

Get Coordinates

Use a coordinate script or command like /coords
3

Copy Values

Copy the vector3 or vector4 coordinates
4

Add to Config

Paste into your arena configuration

Example: Creating a 1v1 Map

-- Add to R.Maps
{
    Name = "1v1 Pistols",
    Image = "https://example.com/1v1.png",
    Description = "1v1 pistol duel",
    Weapons = {
        "weapon_pistol",
        "weapon_combatpistol",
    },
    MaxPlayers = 2,
    UseArmor = false,
    MapId = 10,
},

-- Add to R.Arenas
{
    Name = "1v1 Pistols",
    Image = "https://example.com/1v1.png",
    Route = 0,
    Is1v1Map = true,

    P1Spawn = vector3(100.0, 200.0, 30.0),
    P2Spawn = vector3(110.0, 200.0, 30.0),

    SpawnPoints = {
        vector3(100.0, 200.0, 30.0),
        vector3(110.0, 200.0, 30.0),
    },

    ZoneType = "Sphere",
    RadiusOrThickness = 25.0,
    Coords = vec3(105.0, 200.0, 30.0),
}

Weapon Configuration

Available weapons are defined in R.Weapons:
R.Weapons = {
    "weapon_pistol",
    "weapon_pistol_mk2",
    "weapon_vintagepistol",
    "weapon_combatpistol",
    -- Add more weapons here
}

Weapon Labels

Customize weapon names:
R.WeaponLabels = {
    weapon_pistol = "Pistol",
    weapon_pistol_mk2 = "Pistol MK2",
    -- Add more labels
}

Component Images

Customize weapon component icons:
R.ComponentImages = {
    suppressors = 'nui://ox_inventory/web/images/at_suppressor_light.png',
    extended_clips = 'nui://ox_inventory/web/images/at_clip_extended_pistol.png',
    grips = 'nui://ox_inventory/web/images/at_grip.png',
    scopes = 'nui://ox_inventory/web/images/at_scope_small.png',
    flashlights = 'nui://ox_inventory/web/images/at_flashlight.png',
    magazines = 'nui://ox_inventory/web/images/at_clip_drum_rifle.png'
}

Zone Types

Sphere Zone

Simple circular zone:
ZoneType = "Sphere",
RadiusOrThickness = 50.0, -- Radius in meters
Coords = vec3(0.0, 0.0, 0.0), -- Center point

Polygon Zone

Complex shaped zone (future feature):
ZoneType = "Poly",
RadiusOrThickness = 5.0, -- Wall thickness
-- Define polygon points

Testing Your Map

1

Enable Debug

R.ZoneDebug = true
2

Restart Resource

restart r_ffa
3

Join Arena

Join your new map and test spawn points
4

Check Zones

Verify the zone boundaries are correct
5

Disable Debug

R.ZoneDebug = false
Coords = vec3(-111.86, 6421.03, 31.43)
Route = 829504820
Coords = vec3(885.92, -3195.80, -98.19)
Coords = vec3(-1000.0, -3000.0, 13.9)

Tips

  • Start with small arenas (20-30m radius)
  • Test spawn points don’t overlap
  • Use realistic weapon combinations
  • Balance armor with weapon power
  • Add multiple spawn points to prevent camping

Configuration Guide

Back to configuration