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