Create a standalone resource to send notices to all players from a command protected with ACE. The server authorizes and distributes the message; the client shows a game notification. It does not require ESX, QBCore, or a chat resource.
FiveM is now available in The Silencers categories. This example serves as a first resource to learn manifests, commands, permissions, and events with a visible result.
Last reviewed: October 2, 2026. Reference: Current FXServer, manifest cerulean and Lua 5.4 runtime. The syntax and official APIs were reviewed; it was not run in GTA V/FiveM during this review. Use the artifact recommended by Cfx.re for your platform, without assuming that an old build number is still current.
Three files on your server
You need a working FiveM test server, access to its resources folder and the server console, plus a client to check the notice. If you do not yet have a server, follow the official installation and download the artifacts from Cfx.re. Work first in your own test instance.
Create resources/[local]/silencers_avisos/. Inside it, save fxmanifest.lua:
fx_version 'cerulean'
game 'gta5'
author 'The Silencers'
description 'Ejemplo de avisos protegidos con ACE'
version '1.0.0'
server_script 'server.lua'
client_script 'client.lua'That 1.0.0 identifies our example, not the FXServer version. The file must be named fxmanifest.lua, not fxmanifest.lua.txt. server_script runs the authorization on the server and client_script registers the presentation on each client. Do not add lua54 'yes': Cfx.re marks it as deprecated, since its Lua scripts use 5.4 as of June 2025.
Authorize before emitting
Save server.lua:
local lastAnnouncement = -math.huge
local function feedback(target, message)
if target == 0 then
print('[silencers_avisos] ' .. message)
else
TriggerClientEvent('silencers:notice', target, message)
end
end
RegisterCommand('aviso', function(source, args)
local message = table.concat(args, ' ')
:gsub('[~%c]', ''):match('^%s*(.-)%s*$')
if #message == 0 or #message > 80 then
feedback(source, 'Uso: aviso texto de hasta 80 bytes')
return
end
local now = os.time()
if now - lastAnnouncement < 15 then
feedback(source, 'Espera 15 segundos entre avisos')
return
end
lastAnnouncement = now
TriggerClientEvent('silencers:notice', -1, message)
print(('[silencers_avisos] origen=%d aviso=%s'):format(source, message))
end, true)The last true restricts the command through the ACE object command.aviso. Players need to have it allowed; the server console can use the command. -1 sends the event to all connected clients. No server event is registered that would allow the client to bypass the command.
The limit is measured in bytes: accented letters may take up more than one. Control characters and ~ are removed so the text does not introduce game formatting directives. The cooldown is global and resets when the resource restarts; it is not a persistent notice queue.

Show the notification
Save client.lua:
RegisterNetEvent('silencers:notice', function(message)
if source ~= 65535 then return end
if type(message) ~= 'string' or #message == 0 or #message > 80 then return end
local plain = message:gsub('[~%c]', '')
BeginTextCommandThefeedPost('STRING')
AddTextComponentSubstringPlayerName('AVISO: ' .. plain)
EndTextCommandThefeedPostTicker(false, true)
end)The check of source accepts the server's network origin and avoids ordinary local calls to the handler. It does not turn a manipulated client into a trusted source: the relevant authorization remains on the server. The three natives open a notification text, add the content, and publish the result; the second boolean also saves the notice in the menu's notification history.
Grant access to the specific command
Add to the server.cfg used by your instance:
add_ace group.silencersAvisos command.aviso allow
add_principal identifier.license:REEMPLAZA_CON_TU_LICENSE group.silencersAvisos
ensure silencers_avisosReplace the example identifier with the license: of your player, obtained on the server. The official reference for GetPlayerIdentifiers shows the available formats; do not confuse the player's temporary ID with their license. If you already have managed ACE groups, you can grant command.aviso to an appropriate one and use its existing membership.
This rule grants this command, not all administration commands. The permissions of a txAdmin panel and the ACEs of your scripts are systems you must configure according to their scope; belonging to a panel does not prove that this object is allowed.
After modifying server.cfg, restart the test instance. To load only new files from a resource you just created, run refresh and ensure silencers_avisos in the console. To apply later code changes, use restart silencers_avisos.
Check authorization and result
With a client connected, type in the server console aviso Mantenimiento en cinco minutos. A “NOTICE: ...” notification should appear. Wait at least 15 seconds and use /aviso Hola comunidad on a client with access to the command, or aviso Hola comunidad from F8.
Also test a player without the ACE: they must not emit notices. In the console you can check the rule with test_ace identifier.license:TU_LICENSE command.aviso; replace the identifier. If that player already inherits a broad permission command, they could have access through another rule: inspect the inheritances instead of assuming a test only with administrators is correct.
If the resource is not found, check its folder and the name used by ensure. If a native exception appears on the server, confirm that the notification code is only in client.lua. If the notice does not arrive, check that client and server use exactly silencers:notice and that the resource is started. You do not need to install a framework to fix this example.
Sources and documentation
Project and developer: FiveM/Cfx.re, part of Rockstar Games. Official page: fivem.net. Server download: Cfx.re Server Download. Licenses and conditions: Project LICENSE and the platform agreement to which it refers. It is not considered that all its components share a single license, nor is third-party software included. Resource code and original diagrams by The Silencers.






Comments 0
Join the conversation with your account.
Sign inLoading comments…