Security
Patrolink security on FiveM: serial numbers, remote lock of stolen radios, radio muted while cuffed or unconscious, a transmission log and the server watchdog.
Everything on this page is set in config/security.lua. Turn it all off with Config.Security.enabled = false.
Serial numbers
Every radio gets a serial number the first time it's used: PL3-48213 for a PL-3, PL7-07155 for a PL-3T (prefixes in serialPrefixes). It's stored on the item and in the database.
Players see the serials of the radios they carry with /radioserial. A radio that has never been used shows as "not registered".
Locking stolen radios
If an officer's radio gets stolen, it can be locked remotely by its serial:
/radiolock PL7-07155 Stolen during the bank robbery
/radiounlock PL7-07155
- The radio stops working 90 seconds after the order (
lockDelay), leaving room for roleplay. - A locked radio shows RADIO LOCKED: it can't transmit or receive.
- The lock is saved in the database and survives restarts.
| Who can lock | |
|---|---|
Jobs in lockJobs, on duty | police and ambulance by default |
| Admins | Always |
| Dispatch operators | If Config.Hooks.IsDispatcher returns true (nobody by default) |
| Server console | Always |
Brute-force protection: at most 6 orders per minute per player (lockRateLimit), and non-admins can't tell whether a serial exists (the reply is the same either way).
States that mute the radio
While a player is in one of these states, the radio can't transmit or receive and the screen says why:
| State | Screen | Key |
|---|---|---|
| Cuffed | CUFFED | blockedStates.cuffed |
| Unconscious or dead | UNCONSCIOUS | blockedStates.unconscious |
| Hands up | HANDS UP | blockedStates.handsUp |
By default the radio checks the most common state bags (isCuffed, cuffed, handcuffed, isDead, isDowned, handsup…) and Qbox/QBCore metadata. If your police or medical scripts use different ones, define the Config.Hooks.IsCuffed, Config.Hooks.IsUnconscious and Config.Hooks.HandsUp hooks (client) and Config.Hooks.IsBlocked (server) in config/hooks.lua. See Integration.
Transmission log
/radiolog -- your channel
/radiolog 5 -- channel 5
Shows the latest transmissions (30 by default): who talked, on which channel and for how long. Admins and the boss (the framework's boss grade) of the jobs in logJobs (police by default) can read it.
The log lives in memory (500 transmissions by default) and is cleared when the resource restarts. Transmissions shorter than 1 second don't count.
Server watchdog
pma-voice lets any client join a channel without a check. The watchdog (Config.Watchdog) sweeps every 1.5 s over players on a dial channel (1–500) and removes them if:
- they don't carry the radio or it's turned off,
- their radio is locked,
- they're cuffed or unconscious (
Config.Hooks.IsBlocked).
Channels with their own check (restricted, private band and calls) are already protected by pma-voice on join.
Warning
If another script of yours puts players on a channel between 1 and 500 directly through pma-voice, the watchdog will remove them. Use channels above 500 or return true for those players in Config.Hooks.WatchdogExempt (config/hooks.lua).