Page cover

Installation & Config

There is the installation guide and config about our Business Annoucement System

๐Ÿ“ฆ Installation Guide โ€“ b_announces

This script allows businesses in your FiveM server to post dynamic and styled announcements via a UI. Each announcement supports emojis, markdown formatting, and logos, and fades out individually after a configurable time.


๐Ÿ”ง Requirements

  • ESX, QBCore or QBox (selectable in the config) You can change the core related export in cl_utils.lua


๐Ÿ“ Installation Steps

  1. Place the Resource

    • Drop the b_annonces folder into your resources directory.

  2. Ensure the Resource Add the following to your server.cfg:

    ensure b_annonces
  3. Configure It Open config.lua and edit:

    Config = Config or {}
    
    Config.Core = 'esx' -- 'esx' 'qbcore' or 'qbox' Set your core here, it will be used to get the player job
    
    Config.UseCommand = true -- Set to true to use a command to open the announcement system, set to false to disable it
    Config.CommandName = 'announces' -- Command to open the announcement system, you can change it to whatever you want
    Config.UseKeyMapping = true -- Set to true to use a key mapping to open the announcement system, set to false to disable it
    Config.KeyMapping = 'F3' -- Key to open the announcement system, you can change it to whatever you want, leave it as is if you don't want to use key mapping
    Config.KeyMappingTitle = "Open Announcement System" -- Title of the key mapping, you can change it to whatever you want, leave it as is if you don't want to use key mapping
    Config.TestAnnounce = false -- (/testannounce) Set to true to test the announcement system, it will show a test announcement when you open the system, set to false to disable it
    
    Config.Time = 15000 -- Time in ms before the announcement disappears, you can change it to whatever you want
    Config.ProgressBar = true -- Set to true to show a progress bar when the announcement is displayed, set to false to disable it
    Config.PlaySound = true -- Set to true to play a sound when the announcement is displayed, set to false to disable it 
    
    
    -- The webhooks is sended only when a player sends an announcement, it will not be sent for scheduled announcements.
    Config.SendWebhook = false -- Set to true to send a webhook when an announcement is sent, set to false to disable it
    Config.WebhookURL = "https://discord.com/api/webhooks/your_webhook_url_here" -- Webhook URL to send the announcement, you can change it to whatever you want, leave it as is if you don't want to use webhooks
    
    
    -- You can translate some text in index.html
    
    
    -- The job was taken automatically from the player data, this config is used to set the company name ONLY ('Benny's Custom Garage' instead of mechanic for example) for each job.
    Config.JobToCompanyName = {
        police = 'Los Santos Police Department',
        ambulance = 'San Andreas Medical Services',
        mecano = 'Benny\'s Custom Garage',
        mechanic = 'Benny\'s Custom Garage',
        burger = 'Burger Shot',
        pizza = 'Pizza This'
    
        -- Add more jobs and their corresponding company names here : 
        -- jobname = 'Company Name',
        -- For logo, add the .png file in html/logo/ with the same name as the job for example : police.png for police job, ambulance.png for ems etc.
    }
    
    Config.ScheduledAnnouncements = { -- Scheduled announcements will be displayed at the specified time, you can add as many as you want
        --{
        --    time = "13:40", -- Time in HH:MM format, it will be displayed at this time
        --    job = "police", -- Job that will send the announcement
        --    message = ":police_car: **Rappel**\nLes recrutements sont ouverts !", -- Message to display, you can use emojis from Config.Emojis
        --    image = "https://imgs.search.brave.com/xB93cgrB3oZ7Os6iVJ74r18s_LZcYgUSH5N7a4jzLCE/rs:fit:860:0:0:0/g:ce/aHR0cHM6Ly9zaGFy/ZWQuZmFzdGx5LnN0/ZWFtc3RhdGljLmNv/bS9zdG9yZV9pdGVt/X2Fzc2V0cy9zdGVh/bS9idW5kbGVzLzQ4/Mzc4L3cwdG16cW96/eGwzZXdsbmQvNDQz/NDY4NGRhYjEzZjJj/ZWYwNjhkZmMzNGQw/MTJjYWZiNWUxMmM3/ZS9oZWFkZXJfNTg2/eDE5Mi5qcGc_dD0x/NzMzODYxMDQ5", -- Optional image URL to display in the announcement, you can remove this line if you don't want to use images
        --    progressBar = true, -- Set to true to show a progress bar when the announcement is displayed
        --    sound = true, -- Set to true to play a sound when the announcement is displayed
        --    duration = 10000 -- Time in ms before the announcement disappears, you can change it to whatever you want
        --},
        --{
        --    time = "20:00",
        --    job = "mecano",
        --    message = "**:tools: Promo spรฉciale ce soir !**",
        --    progressBar = false,
        --    sound = true,
        --    duration = 8000
        --}
    }
    
    
    Config.Emojis = {-- Use :name: to use the emojis in annoucements (ex: :fire: โ†’ ๐Ÿ”ฅ) you can add many more emojis 
        smile = "๐Ÿ˜„", sad = "๐Ÿ˜ข", fire = "๐Ÿ”ฅ", heart = "โค๏ธ", star = "โญ", warning = "โš ๏ธ",
        check = "โœ…", cross = "โŒ", clock = "โฐ", money = "๐Ÿ’ฐ", car = "๐Ÿš—", truck = "๐Ÿšš",
        wrench = "๐Ÿ”ง", hammer = "๐Ÿ”จ", tools = "๐Ÿ› ๏ธ", phone = "๐Ÿ“ž", alert = "๐Ÿšจ", police = "๐Ÿ‘ฎ",
        ambulance = "๐Ÿš‘", hospital = "๐Ÿฅ", burger = "๐Ÿ”", pizza = "๐Ÿ•", drink = "๐Ÿฅค", party = "๐Ÿฅณ",
        gift = "๐ŸŽ", info = "โ„น๏ธ", boom = "๐Ÿ’ฅ", skull = "๐Ÿ’€", ghost = "๐Ÿ‘ป", blood = "๐Ÿฉธ",
        explosion = "๐Ÿ’ฃ", love = "๐Ÿ˜", cool = "๐Ÿ˜Ž", gun = "๐Ÿ”ซ", knife = "๐Ÿ”ช", lock = "๐Ÿ”’",
        unlock = "๐Ÿ”“", id = "๐Ÿ†”", doc = "๐Ÿ“„", box = "๐Ÿ“ฆ", note = "๐Ÿ“", eyes = "๐Ÿ‘€",
        door = "๐Ÿšช", radio = "๐Ÿ“ป", gas = "โ›ฝ", store = "๐Ÿช", bank = "๐Ÿฆ", crown = "๐Ÿ‘‘",
        calendar = "๐Ÿ“…", globe = "๐ŸŒ", location = "๐Ÿ“", light = "๐Ÿ’ก", megaphone = "๐Ÿ“ข",
        rocket = "๐Ÿš€", medal = "๐ŸŽ–๏ธ", trophy = "๐Ÿ†", shopping = "๐Ÿ›’", sale = "๐Ÿท๏ธ",
        mechanic = "๐Ÿ› ๏ธ", music = "๐ŸŽถ", mic = "๐ŸŽค", camera = "๐Ÿ“ธ", film = "๐ŸŽฌ", bar = "๐Ÿป",
        cocktail = "๐Ÿธ", wine = "๐Ÿท", beer = "๐Ÿบ", confetti = "๐ŸŽ‰", siren = "๐Ÿ”Š",
        spark = "โœจ", moon = "๐ŸŒ™", sun = "โ˜€๏ธ", thunder = "โšก", snow = "โ„๏ธ", star2 = "๐ŸŒŸ",
        bag = "๐Ÿ‘œ", airplane = "โœˆ๏ธ", map = "๐Ÿ—บ๏ธ", laptop = "๐Ÿ’ป", cpu = "๐Ÿง ", building = "๐Ÿข",
        house = "๐Ÿ ", hotel = "๐Ÿจ", ticket = "๐ŸŽŸ๏ธ", art = "๐ŸŽจ", recycle = "โ™ป๏ธ", test = "๐Ÿงช",
        pill = "๐Ÿ’Š", shield = "๐Ÿ›ก๏ธ", judge = "โš–๏ธ", alarm = "โณ", time = "๐Ÿ•’", handshake = "๐Ÿค",
        moneybag = "๐Ÿ’ฐ", robot = "๐Ÿค–", hacker = "๐Ÿ’ป", bandit = "๐Ÿฅท", chef = "๐Ÿ‘จโ€๐Ÿณ", paintbrush = "๐Ÿ–Œ๏ธ",
        pin = "๐Ÿ“Œ", pushpin = "๐Ÿ“", zap = "๐Ÿด", camera_flash = "๐Ÿ“ท", fuel = "โ›ฝ", bell = "๐Ÿ””",
        books = "๐Ÿ“š", box_open = "๐Ÿ“ฆ", hourglass = "โŒ›", medal_1st = "๐Ÿฅ‡", medal_2nd = "๐Ÿฅˆ", medal_3rd = "๐Ÿฅ‰",
        truck_delivery = "๐Ÿš›", taxi = "๐Ÿš•", motorcycle = "๐Ÿ๏ธ", police_car = "๐Ÿš“", helicopter = "๐Ÿš", train = "๐Ÿš†",
        boat = "๐Ÿšค", warehouse = "๐Ÿญ", clipboard = "๐Ÿ“‹", cart = "๐Ÿ›๏ธ", bag_shopping = "๐Ÿ›๏ธ",
        warning_red = "๐ŸŸฅ", green_circle = "๐ŸŸข", red_circle = "๐Ÿ”ด", yellow_circle = "๐ŸŸก",
        white_circle = "โšช", black_circle = "โšซ", boom_cloud = "๐ŸŒฉ๏ธ", chat = "๐Ÿ’ฌ",
        loudspeaker = "๐Ÿ“ฃ", scroll = "๐Ÿ“œ", envelope = "โœ‰๏ธ", package = "๐Ÿ“ฆ", fuel_pump = "โ›ฝ", rotating_light = "๐Ÿšจ"
    }

๐Ÿ’ก Features

  • โœ… Display styled announcements from any job

  • ๐Ÿ–ผ๏ธ Show job-specific logos

  • ๐Ÿ“ Supports markdown formatting: **bold**, *italic*, __underline__

  • ๐Ÿ˜Š Emoji support via :emoji: syntax

  • ๐Ÿ•ฆ Scheduled Announcement via Config.lua


๐Ÿ•ฆ Scheduled Announcements

To use the scheduled announcement feature, you need to go in config.lua

The scheduled announcements will be sended one time per day. You can use HTML balise in the text and discord markdowns too.

If you don't want to use it, just delete the announcement and let the config like this.


๐Ÿงช Usage

๐Ÿ“œ Command

Players can type /announce in chat to open the input UI.

This will only work if their job is configured in JobToCompanyName.


โš™๏ธ Export Usage

You can trigger a company announcement programmatically using the export:

The script will detect the playerโ€™s current job and auto-assign the appropriate name and logo.


โœ๏ธ Markdown & Emoji Format Examples

In your message, you can use:

  • **bold**

  • *italic*

  • __underline__

  • for new lines

  • Emojis like :gift:, :fire:, :tools: (mapped in config)

Example:


๐Ÿ› ๏ธ UI Customization

Logos should be placed in:

Example: For a job mechanic, put mechanic.png in that folder.

Make sure the image name matches the job name in lowercase.


๐Ÿ“ž Support

If you run into any issues, join our discord here.

Last updated