Switches the radio to the codeplug for the supplied agency. The radio asks the server for that agency's codeplug; on success the codeplug is loaded and the radio fires CodeplugChange.
If a permissions handler has been registered with SetPermissionsHandler, it is consulted before the request — only an approving handler will allow the codeplug to load. The reserved agency default bypasses the permissions handler.
| Name | Type | Description |
|---|---|---|
agencyID |
string | The agency to load. Conventionally the lower-case in-game department name (e.g. lspd, bcso). The reserved value default always loads. |
Lua
TriggerEvent("radioExternal:setCodeplug", "lspd")
C#
BaseScript.TriggerEvent("radioExternal:setCodeplug", "lspd");
agencyID is not default, the handler is invoked first. The codeplug is only requested if the handler invokes its callback to approve.agencyID is default or no permissions handler is set, the codeplug is requested immediately.default, which is silent on a miss.