TGIANN
YoutubeDiscordTebexFivem
  • Main
    • Welcome
    • How to Find My Transaction ID
    • How can i download my script
    • How can i transfer my script
    • Whats escrow system?
    • Switching from MySQL Async to oxmysql
    • Basic Aces & Principals overview/guide
    • Using QB scripts in QBOX
    • How can i use Fivemanage
  • Common errors
    • SCRIPT ERROR: ?:-1: attempt to call a nil value
    • TGIANN-Core script is not in my keymaster account
    • You lack the required entitlement to use tgiann-*
    • Error parsing script / Failed to load script
    • Error: syntax error near '<\1>'
    • When I buy something, the money goes negative
    • Failed to verify protected resource
  • Sounds in the script are not working
  • Crashes related to clothing
  • Map
    • lumi-delperropier
      • Setup
      • Conflicts
      • Disable NPC
      • Rcore Funfair Cords
      • CS-Hall Config
  • Scripts
    • tgiann-animpos-photo-cam
      • Editable Files
      • Config File
      • Exports
    • tgiann-self-storage-v2
      • Editable Files
        • Language File
        • Client Editable
        • Server Editable
      • Config File
    • tgiann-radio-v2
      • Guides
        • Recommended settings for PMA Voice
        • How to change the animation
      • Installation
      • Config file
      • Editable Files
        • Language File
        • Client Editable
        • Server Editable
      • Exports
    • tgiann-core
      • Config file
      • Exports
      • Integration
        • QB
          • DrawText
    • tgiann-lumihud
      • Events / Exports
      • Editable Files
        • Language File
        • Client
          • playerStatus.lua
          • qbclient.lua
          • editable.lua
          • moneyEditable.lua
          • harnessBeltEditable.lua
        • Server
          • qbserver.lua
          • editable.lua
      • Config Files
        • config.lua
        • configHudSettings
        • configWeaponList.lua
        • qbStressConfig
      • Integration
        • Notify
        • Progressbar
    • tgiann-realparking
      • Events / Exports
      • Editable Files
        • Language File
        • Client
          • editable.lua
        • Server
          • editable.lua
      • Config Files
        • blipsConfig.lua
        • config.lua
        • impoundConfig.lua
        • insuranceConfig.lua
    • tgiann-vehicleshop
      • Exports
      • Editable Files
        • Language File
        • Client
          • editable.lua
        • Server
          • editable.lua
          • commands.lua
      • Config Files
    • tgiann-gps
      • Client Exports
      • Editable Files
        • config.lua
        • client/editable.lua
        • Language File
    • tgiann-clothing
      • Guides
        • Installation
          • ESX
          • QB
          • QBX
          • tgiann-inventory clothe items
        • Migration
        • How to take clothes images
      • Comman Proplems
      • Events / Exports
      • Admin Commands
      • Editable Files
        • client/editable.lua
        • server/editable.lua
      • Configs
        • blacklist
          • famale.lua
          • male.lua
        • clotheList
          • global
            • female.lua
            • male.lua
        • clothingPrice
          • female.lua
          • male.lua
        • tattoo
          • customTattoo.lua
          • tattoo.lua
        • clothingRoomsOutfits.lua
        • config.lua
        • hairOverlays.lua
        • pedList.lua
    • tgiann-inventory
      • Guides
        • Installation
          • ESX
          • QB
          • QBOX
        • How to adapt your script
        • How do money as item
          • QB
          • QBOX
          • ESX
            • ESX V11
            • ESX V12
        • Creating Items
        • Item İmages
        • Item Metadata
        • Migration
      • Common Problems
      • Exports
        • Server
        • Client
      • Hooks
      • Events
        • Server
        • Client
      • Admin Commands
      • Editable Files
        • client/editable.lua
        • client/topheader.lua
        • server/editable.lua
        • server/commands.lua
        • server/convert.lua
      • Configs
        • config.lua
        • configAmmo.lua
        • configAntiSwimingItems
        • configAttachment.lua
        • configAttachmentName.lua
        • configBlockItems.lua
        • configCarryItems.lua
        • configClotheBackpack.lua
        • configCommands.lua
        • configCraft.lua
        • configDecayableItems.lua
        • configDrop.lua
        • configEditableItems.lua
        • configFilter.lua
        • configItemStash.lua
        • configMaxStack.lua
        • configMaxUseAmount.lua
        • configMetadata.lua
        • configMetadataAdvance.js
        • configRealisticArmor.lua
        • configShop.lua
        • configStashes.lua
        • configThrowableItems.lua
        • configVendingMachine.lua
        • configWeapon.lua
    • lumi-delperropier-texonstone
      • Setup
    • tgiann-antirpf
      • Editable files
    • tgiann-secondhand
      • Editable files
      • config.lua
    • tgiann-multicharacter + spawn selector
      • Guides
        • Installation
        • Discord Permmission integration
        • Tebex integration
      • Common Problems
      • Configs
        • config.lua
        • multicharConfig.lua
        • photocamConfig.lua
        • spawnSelectorConfig.lua
      • Editable Files
        • Language File
        • client/editable.lua
        • server/editable.lua
        • server/commands.lua
    • tgiann-attachment
      • Config file
      • Event List
    • tgiann-bank
      • Migration
      • Exports
      • Config files
        • config.lua
        • configGangAccounts.lua
        • configHacking.lua
        • configJob.lua
        • configJobAccounts.lua
      • Editable Files
    • tgiann-bettercombat
      • Config file
      • Event List
    • tgiann-bobcat
      • Config file
    • tgiann-boombox
      • Config file
    • tgiann-vehiclecontrol
      • Exports
      • Config file
      • Editable Files
    • tgiann-card
      • Config file
      • QB Core Item
      • Ox Inventory Item
      • Sql File
    • tgiann-carhud
      • Config file
    • tgiann-carmod
      • Config file
      • Sql File
    • tgiann-chair
      • Config file
      • QB Core Item
    • tgiann-chopshop
      • Config file
      • QB Core Item
    • tgiann-damage-indicator
      • Config file
      • Editable files
    • tgiann-dna
      • Sql File
    • tgiann-document
      • Config file
      • QB Core Item
      • Ox Inventory Item
      • Sql File
    • tgiann-doorlock-v2
      • How can i find door model and other details
      • Config file
    • tgiann-dropweaponwhendie
      • Config file
    • tgiann-drugsell
      • Config file
    • tgiann-erpv2
      • Config file
    • tgiann-fallouthacker
      • Usage
    • tgiann-garage
      • Config file
      • Event List
      • Exports List
      • QB Sql File
      • ESX Sql File
    • tgiann-hotwire
      • Item List
      • Editable Files
        • Language File
        • Client/editable.lua
        • Client/migrate.lua
        • Server/commands.lua
      • Config file
      • Exports
    • tgiann-house
      • Stash Function
      • Common errors
      • Config file
      • Event List
      • Sql File
      • Editable Files
    • tgiann-hud
      • Config file
    • tgiann-hudv2
      • Config file
      • Event List
    • tgiann-job
      • Config file
      • Sql File
    • tgiann-market
      • Editable Files
      • Config file
      • Sql File
    • tgiann-mdt
      • Config file
      • ESX Sql File
      • QB Sql File
    • tgiann-megaphone
      • Setup
        • QB Core Item
        • Ox Inventory Item
      • Language File
      • Config file
      • Event List
      • Exports List
      • Recommended PMA Voice Settings
      • Common Problems
    • tgiann-moder-hud
      • Config file
      • Editable files
      • Event list
    • tgiann-naked
      • Config file
      • Editable Files
      • Sql File
      • Wrong Clothes
    • tgiann-platechanger
      • Config file
    • tgiann-policealert
      • Config file
      • Exports
      • Editable Files
        • Client Editable
        • Server Editable
    • tgiann-postcard
      • Editable Files
      • Config file
      • QB Core Item
      • Ox Inventory Item
    • tgiann-radio (Old)
      • Common errors
      • Config file
      • Event List
      • Exports List
      • Recommended settings for PMA Voice
    • tgiann-rentscooter
      • Config file
    • tgiann-sblauncher
      • Config file
      • QB Core Item
    • tgiann-self-storage
      • Config file
      • Editable files
      • Sql File
    • tgiann-exit-log
      • Config file
      • Editable files
    • tgiann-weapons-on-back
      • Config file
      • Editable files
    • tgiann-sellnpc
      • Config file
    • tgiann-smokegrenade
      • Config file
    • tgiann-sounds
      • Example Usage
    • tgiann-stashhouse
      • Config file
      • Sql File
    • tgiann-statushud
    • tgiann-vehicleoutfit
      • Config file
      • Sql File
    • tgiann-vehicleradio
      • Config file
      • Event list
    • tgiann-vehicleshop
      • Config file
      • Sql File
    • tgiann-trade
      • Config file
      • Server editable.lua
      • Client editable.lua
    • tgiann-zombie
      • Config file
      • Client editable.lua
      • Server editable.lua
      • Common errors
    • tgiann-planting
      • Config file
      • Editable Files
    • tgiann-realistic-car-crash
      • Config file
      • Editable Files
    • tgiann-graphic-menu
      • Config file
      • Editable Files
    • tgiann-firefighterjob
      • Installation
      • Config file
      • Editable Files
    • tgiann-coinshop
      • Config file
      • Editable Files
    • tgiann-vehiclepaint
      • Config file
      • Setup
    • tgiann-drone
      • Config file
      • Editable Files
    • tgiann-musical-chairs
      • Config file
      • Editable Files
    • tgiann-pursuitmode
      • Config file
      • Editable Files
    • tgiann-food-jobs
      • Config file
      • Editable Files
      • Example Location Config
Powered by GitBook
On this page
  1. Scripts
  2. tgiann-policealert

Config file

tgiCoreExports                       = exports["tgiann-core"]
config                               = tgiCoreExports:getConfig()

config.lang                          = "en"
config.needOnDutyJob                 = false                             -- If true, the player must be on duty to use the alert system. If false, the player can use the alert system even if they are not on duty.
config.jobNames                      = { "police", "ambulance", "news" } -- List of job names that can use the alert system ui

config.gridSize                      = {
    personalGrid = "13vh 11vh 9vh 1fr 8vh 12vh 11vh 12vh 8vh",
    personalGridWithoutBadge = "1fr 15vh 15vh 15vh 15vh 15vh 15vh 15vh",
}

config.disabledCollum                = {
    number = false,
    iban = false,
}

config.alertBg                       = {
    default = {
        normal = "#233c67d2",
        hover = "#1A2B46d2"
    },
    animate = {
        color1 = "#233c67d2",
        color2 = "#672323d5",
        animation = "2.5s ease-in-out infinite"
    }
}

-- Shortcut keys
config.keys                          = {
    markGps = "E",
    headingPolice = "Y",
    openUi = "OEM_3"
}

-- Used to update working hours in your personal list.
-- If the player is on duty during prime hours, the prime hour working time increases in the UI.
config.primeTime                     = {
    start = 18, -- 6 PM
    finish = 3, -- 3 AM
}

config.useOpenUiWithLumiHudBigMapKey = GetResourceState("tgiann-lumihud") ~= "missing" -- If you have the tgiann-lumihud resource, you can use the same key to open the alert system UI as the big map.

config.shotFireAlert                 = {
    disabledWeapons = { -- Weapons that will not trigger the alert
        `WEAPON_UNARMED`,
        `WEAPON_PETROLCAN`,
        `WEAPON_FIREEXTINGUISHER`,
        `WEAPON_SNIPERRIFLE`,
        `WEAPON_WATERGUN`,
        `WEPAON_STUNGUN`
    },
    disabledJobs = { "ambulance", "police" },
    change = 50,        -- chance of sending alert when fired
    cooldown = {
        succes = 20000, -- Cooldown time in milliseconds after a successful alert
        fail = 10000,   -- Cooldown time in milliseconds after a failed alert
    },
    alertData = {
        jobs = { "police" },             -- jobs to which the alert will be sent
        label = "SHOT_FIRE_ALERT_LABEL", -- Label for the alert (translated in the lang file)
        icon = "car-on",                 -- fontawesome icon name
        bgAnimate = true,                -- If true, the background will animate
        code = "245",                    -- Code for the alert
        blip = 119                       -- Blip ID for the alert on the map
    }                                    -- People with jobs don't send notifications.
}

config.codeCommand                   = {
    command = "code",
    jobs = { "police" }, -- Job that can use this command
    alertData = {
        icon = "user-injured",
        bgAnimate = { "99", "0" },
        code = "Code %s",
        blip = 164, -- Blip ID for the alert on the map
    },
    sounds = {
        ["99"] = function()
            playSyncSound()
            PlaySoundFrontend(-1, "TIMER_STOP", "HUD_MINI_GAME_SOUNDSET", 1)
            SetTimeout(900, function() PlaySoundFrontend(-1, "TIMER_STOP", "HUD_MINI_GAME_SOUNDSET", 1) end)
            SetTimeout(900, function() PlaySoundFrontend(-1, "TIMER_STOP", "HUD_MINI_GAME_SOUNDSET", 1) end)
        end,
        ["0"] = function()
            playSyncSound()
            PlaySoundFrontend(-1, "TIMER_STOP", "HUD_MINI_GAME_SOUNDSET", 1)
        end,
    },
}

config.statusCommand                 = "status"

config.phoneItems                    = { "white_phone", "blue_phone", "green_phone", "red_phone", "pink_phone", "yellow_phone", "black_phone" }

config.emergencyNumber               = {
    {
        code = "911",
        description = "EMERGENCY_NUMBER_911_DESCRIPTION", -- Description for the emergency number (translated in the lang file)
        receivingJobs = { "police" },
        phoneCheck = false,                               -- If true, the player must have a phone to use this emergency number
    },
    {
        code = "311",
        description = "EMERGENCY_NUMBER_311_DESCRIPTION", -- Description for the emergency number (translated in the lang file)
        receivingJobs = { "ambulance" },
        phoneCheck = false,                               -- If true, the player must have a phone to use this emergency number

    },
    {
        code = "211",
        description = "EMERGENCY_NUMBER_211_DESCRIPTION", -- Description for the emergency number (translated in the lang file)
        receivingJobs = { "news" },
        phoneCheck = false,                               -- If true, the player must have a phone to use this emergency number
    },
}

-- If the player gets into the driver's seat of the specified vehicle, a continuous alert is sent for the set period of time.
config.vehicleClassAlert             = {
    {
        classList = { 18 },                       -- If the player gets into this vehicle class, an automatic alert is sent.
        disabledJobs = { "ambulance", "police" }, -- Jobs that cannot use this vehicle class alert
        second = 60,                              -- Time in seconds to wait before sending the alert
        alertData = {
            jobs = { "police" },                  -- jobs to which the alert will be sent
            label = "VEHICLE_CLASS_ALERT_LABEL",  -- Label for the alert (translated in the lang file)
            icon = "car-on",                      -- fontawesome icon name
            bgAnimate = true,                     -- If true, the background will animate
            code = "10-29",                       -- Code for the alert
        }
    },
}

config.duration                      = 5  -- Default duration for the alert to be visible on the ui

config.personalMaxWarings            = 3  -- Maximum number of warnings that can be given to a player in their personal list
config.personalBadgeList             = {  -- Custom badges for the personal list
    police = {                            -- Job Name
        {
            label = "HC",                 -- Label for the badge
            max = 1,                      -- Maximum number of badges that can be added
            name = "hc",                  -- uniq name
            color = "#FBC12C",            -- Bacground color of the badge
            image = "hc.png",             -- image file name in the ui/public folder
            permission = 2,               -- Permission level required to edit this badge
            description = "High Command", -- Tooltip text
            textCenter = true,            -- If set to false, the image and number will be side by side. If true, the image and text will overlap.
        },
        {
            label = "AIR",
            max = 2,
            name = "air",
            color = "#0288D2",
            image = "air.png",
            permission = 2,
            description = "Air Support Unit",
            textCenter = true,
        },
        {
            label = "SWAT",
            max = 2,
            name = "swat",
            color = "#424242",
            image = "swat.png",
            permission = 2,
            description = "Special Weapons and Tactics",
            textCenter = true,
        },
        {
            label = "HSU",
            max = 3,
            name = "hsu",
            color = "#2F7C32",
            image = "hsu.png",
            permission = 2,
            description = "Highway Patrol Unit",
            textCenter = true,
        },
        {
            label = "DRN",
            max = 3,
            name = "drn",
            color = "#00828F",
            image = "drn.png",
            permission = 2,
            description = "Drone Unit",
            textCenter = true,
        },
        {
            label = "FAO",
            max = 1,
            name = "fao",
            color = "#D54315",
            image = "fao.png",
            permission = 2,
            description = "First Aid Officer",
            textCenter = true,
        },
        {
            label = "PL",
            max = 5,
            name = "pl",
            color = "#895BA5",
            image = "pl.png",
            permission = 2,
            description = "Parachute license",
            textCenter = true,
        },
        {
            label = "EDU",
            max = 2,
            name = "edu",
            color = "#F16B00",
            image = "edu.png",
            permission = 2,
            description = "Education Officer",
            textCenter = true,
        },
    },
}

config.clusterColor                  = { -- Notification color settings on the heatmap screen
    { max = 2,   bg = "rgba(0, 200, 0, 0.6)",   color = "black" },
    { max = 4,   bg = "rgba(100, 200, 0, 0.6)", color = "black" },
    { max = 6,   bg = "rgba(200, 200, 0, 0.6)", color = "black" },
    { max = 9,   bg = "rgba(255, 165, 0, 0.6)", color = "black" },
    { max = 13,  bg = "rgba(255, 140, 0, 0.6)", color = "black" },
    { max = 18,  bg = "rgba(255, 100, 0, 0.6)", color = "black" },
    { max = 26,  bg = "rgba(255, 60, 0, 0.6)",  color = "white" },
    { max = 40,  bg = "rgba(200, 0, 0, 0.6)",   color = "white" },
    { max = 65,  bg = "rgba(150, 0, 0, 0.6)",   color = "white" },
    { max = 100, bg = "rgba(100, 0, 0, 0.6)",   color = "white" },
}

config.permissions                   = {
    police = {    -- job name
        rank = 4, -- min grade level to edit
        code = 2,
        status = 4,
        warnings = 3,
        number = 2,
        iban = 2,
        workingHours = 4,
    },
    ambulance = {
        rank = 2,
        code = 2,
        status = 2,
        warnings = 2,
        number = 2,
        iban = 2,
        workingHours = 2,
    }
}

config.langs                         = {}

--- Example exports
--[[
exports["tgiann-policealert"]:Alert({
    jobs = { "police" },
    label = "Alert Test",
    coords = nil,      -- Vector3 or nil, if nil, will use the player's current position
    code = nil,        -- Alert code, e.g. "10-29"
    icon = nil,        -- FontAwesome icon name, e.g. "car-on"
    iconColor = nil,   -- Hex color for the icon, e.g. "#FF0000"
    bgAnimate = false, -- If true, the background will animate
    vehicle = {        -- Vehicle information (if null all vehicle data will be send)
        label = true,  -- If true, the vehicle label will be included
        plate = true,  -- If true, the vehicle plate will be included
        color = true   -- If true, the vehicle color will be included
    },
    gender = true,     -- If true, the player's gender is displayed.
    sound = true,      -- If true, the alert will play a sound
    soundName = nil,   -- Sound name to play, e.g. "HUD_FRONTEND_DEFAULT_SOUNDSET"
    blip = nil,        -- Blip ID for the alert on the map, e.g. 280
})
]]
Previoustgiann-policealertNextExports

Last updated 4 days ago