Pager for FiveM, with Discord and QBCore integration.
Github
Command
/page [channel] [message]
Message is limited to 63 characters
Config
For each channel, add a new key to the table:
["police"] = { -- Name of the channel, used on the command
title = "Police", -- Title that displays on discord
broadcastToJobs = { -- Ingame qb jobs that should receive pages from this channel (no job-check)
["police"]=true,
},
broadcastToRoles = nil, -- Uses pv-discord-uac; set to nil to ignore
discordPermissions = nil, -- Uses pv-discord-uac; set to nil to ignore
jobPermissions = { -- Jobs that can use /page for this channel
"police"
},
webhooks = {
["https://discord.com/api/webhooks/901956847567590/LEtT9y8A7uQ3Ff34DqTPCNODWk2Xcz8rb042_ug055mjZNkgL7qvrUzDsxHmWRls"]="<@9189297405006602> new pager received!"
}, -- Discord webhooks. Accepts multiple following structure "url"="message"
}
The problem with making this fully standalone is limiting it for certain persons to use.
When this was used on the server i was a dev we had double validation - jobs and discord roles (with multi discord servers support), but that’s because we developed a script with a discord bot that would track roles. In the current release that discord roles control (pv-discord-uac) is not being made publicy available, so there’s only jobs as restrictions.
There are other pagers out there that are fully standalone, like the one made by inferno iirc.
I believe it is, you would just need to adjust the export (or in the extreme, make a new funciton).
I never used badger, but for example zdiscord as a similar export (isRolePresent): Exports | zdiscord
[ citizen-server-impl] Started resource pv-pager
[ script:pv-pager] SCRIPT ERROR: @pv-pager/server.lua:28: attempt to index a nil value (local ‘pagerTune’)
[ script:pv-pager] > ref (@qb-core/server/commands.lua:31)
[ script:qb-core] SCRIPT ERROR: citizen:/scripting/lua/scheduler.lua:479: attempt to concatenate a nil value (local ‘err’)