Skip to main content

๐Ÿ“ฃ Intro

P33t-Announcement is a alternative to TxAdmin announcements. You can link it to anything using our NetEvent. You can change the html so it fits your style, if you want you can redo the entire design.


Some examples what you can do:

Commandโ€‹

RegisterCommand("announce", function(source, args)
local msg = table.concat(args, " ")
if msg == "" then return end
-- design can be default, restart or your own, just create it in index.js
local design = "default"
TriggerServerEvent("p33t-announce:server:announce", msg, design)
end)

QB CORE check for job first and then executeโ€‹

RegisterCommand("ANY_COMMAND_NAME", function(source, args)
if QBCore.Functions.GetPlayerData().job.name == "police" then
local msg = table.concat(args, " ")
if msg == "" then return end
local design = "police"
TriggerServerEvent("p33t-announce:server:announce", msg, design)
end
end)

If you want to use the local design = "police" you need to make some police design config

} else if (item.design == "police") {
$("#ann-header").html('<i class="fa-solid fa-handcuffs"></i>'+ " Police announcement")
$("#announcebox").css("background-color", "#0362fc")
$("#announcement").css("color", "white")
$("#ann-header").css("color", "white")
$("#announcement").text(item.announcement)
}

If you need help, just join my discord and ill help you