[FREE][STANDALONE] Simple Advert System

[FREE][STANDALONE] Simple Advert System

I was looking for a simple standalone advert system for my FiveM server and could not find one that worked, so I made one and am giving it to you for free.

Features:

  • Ace Permissions
  • Multiple Agencies
  • Speedy
Code is accessible Yes
Subscription-based No
Lines (approximately) 62
Requirements NONE
Support No

Get on Github
adverts.zip (2.6 KB)

TODO

  • [ ] Make it so you do not have to surround your advert with quotes when using multiple words
  • [x] Add a config file and have different agencies capable of sending adverts
  • [x] Ace permissions

Timeline

July 11, 2023:

  • Initial Commit
  • Config File
  • Ace Permissions

July 12, 2023:

  • Taggable notifications and chat (send the ad as a notification, chat message, or both)
4 Likes
RegisterCommand("ad", function (src, args)
    local message = nil
    if #args > 1 then
        for i = 1, #args do
            message = message .. ' ' ..args[i]
        end
    else
        if args[1] then
            message = args[1]
        else
            TriggerClientEvent("chat:addMessage", src, {
                args = {
                    "SYNTAX ERROR",
                    "/ad <text>",
                },
                color = {255, 0, 0}
            })
        end
    end
    if message then
        TriggerClientEvent("chat:addMessage", -1, {
            args = {
                "[AD]",
                message,
            },
            color = {0, 255, 0}
        })
    end
end)

not being rude but posts cant be under 30 lines

I should prob update the amount of lines since I added some stuff