Skip to the content
Docs

NPC and interaction

On this page3

The armory is opened at one or more NPC peds that officers interact with.

Config.NPCs

lua
Config.NPCs = {
    {
        model    = 's_m_y_cop_01',
        coords   = vector4(-450.3, 7102.0, 22.38, 25.41),
        scenario = 'WORLD_HUMAN_CLIPBOARD',
        label    = 'Police Armory',
        blip     = { sprite = 110, color = 29, scale = 0.8, name = 'Police Armory' },
    },

    -- Example second station (e.g. Blaine County / Sandy Shores) — uncomment & set coords:
    -- {
    --     model    = 's_m_y_sheriff_01',
    --     coords   = vector4(1853.19, 3689.55, 34.27, 210.0),
    --     scenario = 'WORLD_HUMAN_CLIPBOARD',
    --     label    = 'Sheriff Armory',
    --     blip     = { sprite = 110, color = 5, scale = 0.8, name = 'Sheriff Armory' },
    -- },
}

Add one entry per station, as many as you like. Every NPC opens the same armory and serves Config.Job; which loadout a player sees is decided by their unit. An older config with a single Config.NPC still works.

FieldDescription
modelPed model name
coordsvector4(x, y, z, heading) spawn location
scenarioIdle animation scenario the ped plays (optional: nil for a plain standing ped)
labelThe text of the target option or the [E] prompt
blipOptional map blip: { sprite = 110, color = 29, scale = 0.8, name = '...' }

Finding coordinates

In-game, stand where you want the NPC and use any coordinate command your server provides (e.g. /coords). Copy the x, y, z, and heading into a vector4 value.

Interaction modes

  • qb-target / ox_target — uses that target script; officers within Config.InteractionDistance see an option on the ped.
  • interact — needs no extra resource: walk within Config.InteractionDistance of the ped and press E.

Access is gated by job. Only players whose job matches Config.Job see the interaction.