> For the complete documentation index, see [llms.txt](https://botiv.gitbook.io/rdr2/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://botiv.gitbook.io/rdr2/noticeboard.md).

# Noticeboard

***

### ⚡ First Start

#### Place noticeboards

Edit `config.lua` and define your board locations inside `Config.Boards`. Each board entry contains coordinates and optional blip settings:

* `x, y, z` → world position of the board.
* `createBlips` → show or hide a map blip for this board.
* `blipsName` → the blip name.
* `blipsSprite` → the blip icon (joaat hash).
* `jobLock` → optional comma-separated list of jobs allowed to post on this board
* `staffLock` → optional boolean to restrict posting to admin groups only

<mark style="color:orange;">Boards with the same</mark> <mark style="color:orange;"></mark><mark style="color:orange;">**ID**</mark> <mark style="color:orange;"></mark><mark style="color:orange;">(e.g : "boards-public") share the same set of announcements.</mark>

#### Prepare translations

In `config.lua`, two areas can be customized:

* **UI texts** in `Config.Txt`.
* **UI language** in `Config.NUILang` (supported: fr, en, de, it, es, pt).

***

### 🧩 Configuration

In `config.lua`, you will find the main settings:

```lua
Config.DEBUG = true                 -- Enable or disable debug logs
Config.SpamSeconds = 2              -- Cooldown between actions
Config.ExpireDays = 14              -- Auto-expiration time for ads
Config.OpenKey = keys["U"]          -- Key to open the board
Config.DiscordWebHook = "..."       -- Discord webhook for logs
Config.DiscordName = "BT_NOTICEBOARD"
Config.AdminsGroup = { "mod", "admin", "superadmin" }

Config.Objects = {                  -- Allowed board object models
  "mp005_p_mp_bountyboard01x",
  "mp005_p_mp_bountyboard02x",
}

Config.Boards = {
  ["boards-public"] = {
    {
      x = -1801.97, y = -358.48, z = 163.82,
      createBlips = true,
      blipsName = "Notice Board",
      blipsSprite = joaat("blip_job_board")
    },
  },
  ["boards-government"] = {
    {
      x = -767.01, y = -1260.93, z = 43.58,
      createBlips = true,
      blipsName = "Government Board",
      blipsSprite = joaat("blip_job_board"),
      jobLock = "sheriff, gouv",
      staffLock = false
    },
  },
  ["boards-staff"] = {
    {
      x = -550.12, y = -2941.44, z = 1.55,
      createBlips = true,
      blipsName = "Staff Board",
      blipsSprite = joaat("blip_job_board"),
      jobLock = "",
      staffLock = true
    },
  }
}

Config.NUILang = "en" -- Supported: fr, en, pt, it, es, de
```

***

### 🌍 UI Localization

```lua
Config.NUILang = "en"

Config.Txt = {
  OpenPrompt = "View the board",
  Board      = "Notice Board",
  Spam       = "Please do not spam.",
  Error      = "An error has occurred.",
  Already    = "Only one ad is allowed.",
  Published  = "Your ad has been published and will automatically be removed after " .. Config.ExpireDays .. " days.",
  Removed    = "Your ad has been deleted.",
  Right      = "You do not have the rights to do this.",
  AdminRight = "Your admin rights allow you to delete ads and create as many as you want."
}
```

* `Config.NUILang` selects the language used by the NUI.
* `Config.Txt` holds the text displayed to players.

***

### 🔒 Moderation & Admin Rights

* **Player rules**
  * By default, each player can only have **one active announcement** at a time.
  * Announcements are automatically removed after `Config.ExpireDays`.
* #### Board posting restrictions

  You can optionally restrict who is allowed to post on specific boards:

  * `jobLock = "sheriff, gouv"` → only these jobs can post
  * `staffLock = true` → only admin groups from Config.AdminsGroup can post
  * Admin groups always override jobLock

  These restrictions only affect posting.\
  Everyone can still open and read the board.
* **Admin privileges**
  * Admins are defined in `Config.AdminsGroup`.
  * These groups can:
    * Create unlimited announcements.
    * Delete any player’s announcement instantly.
* **Discord logging**
  * Every publish or removal can be logged via `Config.DiscordWebHook`.
  * Webhook messages are sent as embeds, with the name defined in `Config.DiscordName`.

***

### ✅ Quick Checklist

* Boards configured in `Config.Boards`.
* Translations updated in `Config.Txt`.
* `Config.NUILang` set to the desired language.
* Discord webhook configured if you want logs.
* Admin groups set correctly in `Config.AdminsGroup`.

You’re ready to launch the script and start posting announcements on your noticeboards.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://botiv.gitbook.io/rdr2/noticeboard.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
