Docs /Ammunation/Configuration
v1.0.0

Configuration

All configuration is done in the config.lua file.

General settings

Config.Locale = 'en'           -- Language (fr, en, es)
Config.PedModel = 's_m_y_ammucity_01' -- Shopkeeper ped model

Map blip

Config.AmmunationBlip = {
    sprite = 110,    -- Blip icon
    color = 1,       -- Color (1 = red)
    scale = 0.8      -- Blip size
}

License system

Config.LicensePrice = 5000  -- Weapon license price ($)

Weapons requiring a license are flagged with RequireLicense = true in the aisle configuration.

Aisles and products

Config.AisleProductList = {
    {
        label = "Handguns",
        RequireLicense = true,
        items = {
            { name = "WEAPON_PISTOL", label = "Pistol", price = 2500, type = "weapon" },
            { name = "WEAPON_COMBATPISTOL", label = "Combat Pistol", price = 3500, type = "weapon" },
        }
    },
    {
        label = "Ammunition",
        RequireLicense = false,
        items = {
            { name = "ammo_pistol", label = "Pistol Ammo", price = 100, type = "item" },
        }
    },
}

Product parameters

ParameterTypeDescription
namestringTechnical weapon/item name
labelstringDisplay name in menu
pricenumberSale price
typestring"weapon" or "item"

Store locations

Config.AmmunationsList = {
    vector4(-662.18, -935.3, 21.83, 174.89),
    vector4(810.25, -2157.6, 29.62, 0.72),
    -- Add more positions...
}

Robbery settings

Config.RobberyMinPolice = 2       -- Minimum police officers online
Config.RobberyCooldown = 1800     -- Cooldown between robberies (seconds)
Config.RobberyMinAmount = 5000    -- Minimum robbery payout
Config.RobberyMaxAmount = 15000   -- Maximum robbery payout
Config.RobberyDistance = 3.0      -- Max distance before cancellation

The robbery is cancelled if the player moves too far from the NPC or if the NPC dies.

Notifications

Config.Notification = function(msg)
    -- Customize your notification system
    ESX.ShowNotification(msg)
end

Config.DisplayHelpText = function(msg)
    -- Contextual help text
    SetTextComponentFormat("STRING")
    AddTextComponentString(msg)
    DisplayHelpTextFromStringLabel(0, 0, 1, -1)
end

Police alerts

During a robbery, police officers receive:

  • Suspect photo (mugshot)
  • Store geolocation
  • Audio notification