FR Browse scripts (external link)
Documentation centre
Script MrPoulpi UI

Company announcements

Opening, closing and free announcements for companies in MrPoulpi UI: configuration, permissions, cooldown and customisation.

Updated 25/10/2026 3 min read

Employees of a configured company can send an announcement to every player, as an announcement notification:

Announcement Badge Colour Message
Opening Open green The company openMessage, otherwise the default text.
Closing Closed red The company closeMessage, otherwise the default text.
Announcement Announcement company type Message typed by the employee.

Employees reach it with the /entreprise command (set by Config.Companies.command) or the Company section of the demo menu.

Setting up companies

Config.Companies = {
    enabled = true,
    command = 'entreprise',
    cooldown = 60,
    duration = 10000,
    minLength = 3,
    maxLength = 120,
    staff = 'administration',
    list = {
        administration = { label = 'Administration', type = 'info' },
        realestateagent = {
            label = 'Real Estate Agent',
            type = 'success',
            minGrade = 0,
            logo = 'assets/logos/realestate.png',
            logoText = 'REA',
            openMessage = 'Our offices are open!',
            closeMessage = 'Our offices are closed.'
        },
        mechanic = { label = 'Benny’s', type = 'warning', minGrade = 2 }
    }
}
Field Description
key (realestateagent) Job name in your framework (job.name).
label Name shown in the announcement and as the menu title.
type Colour of free announcements: success, info, warning or error. info by default.
minGrade Minimum grade to announce. 0 by default.
logo Optional picture: assets/… (file placed in html/assets/) or an https:// address.
logoText Text of the logo square when there is no picture. By default, the initials of the name (three at most).
openMessage, closeMessage Custom messages, as text or as a shared/locales.lua key.

Other settings are described in the configuration.

Who can announce

  1. A player whose job is in list with a grade at least equal to minGrade announces on behalf of their company.
  2. Otherwise, if Config.Companies.staff names a company of the list and the player has the menu permission, they announce on behalf of that one. Handy for staff and for testing. Set staff = nil to prevent it.
  3. Otherwise, the player gets “You do not belong to an authorized company”.

In standalone there are no jobs: only the staff rule applies.

Server checks

Everything is checked server side, on every announcement:

  • the player’s job and grade;
  • the cooldown, counted per company: two employees cannot announce back to back;
  • the length of the free message, between minLength and maxLength, after extra spaces are removed;
  • the Hooks.CanAnnounce hook, if it returns false.

Every announcement sent goes through Hooks.Log (company_announce event), so to the Discord webhook when one is set.

Logo pictures

Put your logos in html/assets/ (for example html/assets/logos/realestate.png) and give the path starting at assets/. https:// and nui:// addresses work too.

Going further

For other rules (several jobs, gangs, companies stored in a database, opening hours), edit in server/hooks.lua:

  • Hooks.GetCompany(source): returns name, data of the player’s company, or nil;
  • Hooks.CanAnnounce(source, company, kind, message): return false to refuse. kind is open, close or custom.
function Hooks.CanAnnounce(source, company, kind, message)
    local hour = tonumber(os.date('%H'))
    if kind == 'open' and hour >= 3 and hour < 8 then
        Hooks.Notify(source, 'Opening is not allowed between 3 and 8 am', 'error')
        return false
    end
    return true
end

Search

Type a term: setting, export, error…