Minimum version: R06.18.00
This event was introduced in SCNP25 R06.18.00. Earlier versions will not fire it.
Fired by the radio every time it successfully loads a new codeplug. The single argument is the agency string the codeplug was loaded for. Use this to react to agency switches — refresh UI, log the change, re-apply your own per-agency state, etc.
| Position | Type | Description |
|---|---|---|
| 1 | string | The agency ID that was just loaded (e.g. lspd, default). |
Lua
RegisterNetEvent("radioExternal:CodeplugChange")
AddEventHandler("radioExternal:CodeplugChange", function(agencyID)
print("Radio switched to agency: " .. agencyID)
end)
C#
[EventHandler("radioExternal:CodeplugChange")]
private void OnCodeplugChange(string agencyID)
{
Debug.WriteLine($"Radio switched to agency: {agencyID}");
}
default load at script start (if a default codeplug is configured on the server).