Custom Locations

Config.Locations.Types defines every location type that a gang leader can place on the map through the management panel (stashes, garages, clothing rooms, bank deposit points, management desks…). You

Each type controls:

  • Its blip and 3D marker appearance.

  • The permission a member needs to interact with it.

  • Whether it's a default type (seeded automatically for new gangs).


Where to add custom types

Add new entries inside Config.Locations.Types in config/locations.lua:

Config.Locations = {
    DrawDistance       = 50.0,
    InteractDistance   = 1.5,
    MarkerDrawDistance = 15.0,

    Types = {
        stash = { --[[ ... ]] },
        garage = { --[[ ... ]] },

        -- 👇 your custom type
        armory = {
            label              = 'Open gang armory',
            default            = true,
            requiredPermission = 'access_armory',

            blip = {
                enabled = false,
                sprite  = 110,
                color   = 1,
                scale   = 0.7,
            },

            marker = {
                type          = 22,
                offset        = { x = 0.0, y = 0.0, z = 1.0 },
                scale         = { x = 0.25, y = 0.25, z = 0.25 },
                color         = { r = 255, g = 0, b = 0, a = 255 },
                bobUpAndDown  = true,
                faceCamera    = true,
                rotationOrder = 2,
                rotate        = false,
            },
        },
    },
}

The key (`armory` in the example) is the **locationType** used internally. It's the value stored in DB for each placed point.


Type fields

Field
Type
Required
Description

label

string

yes

Text shown in the interaction prompt. Can be a plain string or a locale key (e.g. locations.types.armory.label).

default

boolean

yes

If true, the type is available to all gangs out of the box. Set false to hide it until unlocked/seeded manually.

requiredPermission

string | nil

yes

Rank permission required to interact with a placed point. Use nil to allow any member.

blip

table

yes

Minimap blip config (see below).

marker

table

yes

3D world marker config (see below).

placement_preview

table

no

Only used by special types that need a world preview while placing (e.g. garage shows a vehicle to pick heading).

blip

Field
Type
Description

enabled

boolean

Show the blip on the minimap.

sprite

number

GTA blip sprite id.

color

number

GTA blip color id.

scale

number

Blip size.

marker

Field
Type
Description

type

number

Marker type id — see FiveM marker referencearrow-up-right.

offset

{ x, y, z }

Offset from the base coordinate. Legacy alias offsetZ (float) is still accepted.

scale

{ x, y, z }

Marker size per axis.

color

{ r, g, b, a }

RGBA 0–255.

bobUpAndDown

boolean

Bob animation.

faceCamera

boolean

Always face the camera.

rotationOrder

number

Axis order for rotation (default 2).

rotate

boolean

Spin on axis.


Permission system

requiredPermission maps directly to the rank permission flags defined in Config.Gang.DefaultRanks (config/gangs.lua). When a member tries to interact with a placed point, the server calls:

If it returns false, the interaction is silently blocked.

Adding your own permission flag

  1. Define the flag in each default rank that should receive it:

  2. Reference it from your location type:

  3. Placement gate (optional) — if you also want to restrict who can place the point (not just who can use it), the admin panel reuses the standard manage_locations permission for all types. No extra config needed.

Every rank that should be able to **see or use** the new permission must have the flag explicitly defined. Missing flags default to `false`. Members can also edit rank permissions at runtime through the gang panel (if they have `manage_ranks`). Any permission key you declare in `Config.Gang.DefaultRanks` is automatically listed there.


Handling the interaction server-side

Define your own logic for the custom type by listening to the location interaction event or exposing it through a hook. The locationType key you chose is passed along, so you can branch on it:

Prefer placing custom handlers inside `custom/server/` or a separate companion resource so that core updates don't overwrite your logic.


Complete example — armory type

Restart the resource. The new Armory type appears in the location placement picker for any rank with manage_locations, and only members with access_armory can interact with the placed points.

Last updated