README

Visit our Discord / Homepage / Store !


Table of contents


Requirements / Dependencies

The following resources are required for nss_pinboard to work:


Changelog

See CHANGELOG.md for more information.


Setup

  1. Ensure that the nss_pinboard folder is in your resources folder.

  2. Rename config.demo.lua to config.lua and fill in the values.

    1. If you want to use prepared bulletin boards see optional ymap now.

  3. Execute db.sql on your database.

  4. Add ensure nss_pinboard to your server.cfg.

  5. Restart your server.


Optional: ymap

You can use this bulletin_boards.ymap to place bulletin boards to prepared locations in your map. The bulletin_boards_config.lua file contains the coordinates for the bulletin boards for the script.

  1. Copy and replace Config.Posters from bulletin_boards_config.lua into your config.lua

  2. Create a new resource folder.

  3. Create a stream folder inside the new resource folder.

  4. Copy the bulletin_boards.ymap file into the stream folder.

  5. Add fxmanifest.lua with the following content:

    fx_version "adamant"
    game "rdr3"
    rdr3_warning "I acknowledge that this is a prerelease build of RedM, and I am aware my resources *will* become incompatible once RedM ships."
       
    this_is_a_map "yes"
  6. Add ensure <new_resource_name> to your server.cfg.

  7. Restart your server.


EVENTS

Client events

nss_pinboard:open

Opens the bulletin board for the given city.

Ensure to not open the bulletin board multiple times.

city is the name (id) of the bulletin board that you have used in your config.

Client usage

TriggerEvent('nss_pinboard:open', 'city')

Server usage

TriggerClientEvent('nss_pinboard:open', player_id, 'city')

Client command usage

Simple example to use events as commands...

RegisterCommand("popen", function(_, args, _)
    local city_name = args[1] or nil
    TriggerEvent("nss_pinboard:open", city_name)
end)

RegisterCommand("pclose", function()
    TriggerEvent("nss_pinboard:close")
end)

nss_pinboard:close

Closes the bulletin current open bulletin board.

Client usage

TriggerEvent('nss_pinboard:close')

Server usage

TriggerClientEvent('nss_pinboard:close', player_id)

FAQ

Why sometimes images from discord are not available?

Discord has introduced an expiry restriction for images.

See the following links for more information:

As long as there is no simple solution for this, we recommend that your players refrain from using Discord links.

You can use Config.ImageServerBlacklist to block specific domains like discord.com or cdn.discordapp.com to prevent the use of Discord links.


Last updated

Was this helpful?