RedM documentation

Murphy's Radial Menu

Reference

Actions and API

Connect commands, events and exports, with registration that survives wheel restarts.


Action execution

The wheel is client-side. The configured action chooses what the client invokes:

type value Effect
command Command text without the chat slash. Execute a client command.
event Event name. Trigger a local client event.
serverEvent Event name. Send a network event to the server.
export { "resource", "functionName" } Call the named client export.
callback Lua function. Call the function with the slot ID and path.

args is a list forwarded to event/serverEvent/export actions. Use only commands, events and exports implemented by the target resource. A label such as “Buy” does not implement a purchase.

The receiving server must validate permissions, position, price and inventory as appropriate. visibleWhen and disabled are presentation controls and cannot secure a server action.

Client exports

Export Arguments / result
open(menuId) Open the named menu; fails for an unknown/empty menu.
openContext() Open using the configured context resolver.
close() Close the wheel.
isOpen() Return whether a menu is open.
registerMenu(menuId, definition) Add or replace a runtime menu.
unregisterMenu(menuId) Remove a runtime menu.
registerSlot(menuId, slot, path) Add/replace a slot, optionally inside a submenu path.
removeSlot(menuId, slotId, path) Remove a slot at that path.
setContextResolver(fn) Install a custom resolver; nil clears it.
setLocale(locale, translations) Set the UI locale, optionally with overrides.

The exact names are case-sensitive. Call these from a client resource after the wheel starts. Runtime changes can refresh the currently open menu.

Survive resource restarts

Runtime registrations are not persisted. Your integration should register when it starts and again when murphy_radialmenu starts. Add this pattern in your own client resource:

lua
local function registerDocsMenu()
exports.murphy_radialmenu:registerMenu("docs_runtime", {
title = "Runtime test",
slots = {
{
id = "message",
icon = "clothing_generic_hat",
label = "Print a message",
action = {
type = "callback",
value = function() print("Runtime wheel works") end,
},
},
},
})
end
CreateThread(function()
if GetResourceState("murphy_radialmenu") == "started" then
registerDocsMenu()
end
end)
AddEventHandler("onClientResourceStart", function(resource)
if resource == "murphy_radialmenu" then registerDocsMenu() end
end)

Test /radial docs_runtime, restart the wheel in a test session and open the menu again. The example follows the public 1.1.0 API; verify its behavior with your installed integrations before using it in production.

Opening another UI

For an action that opens another interface, the public guide recommends delay = 150 to avoid the selecting click immediately activating a control in the next interface. Test the actual integration and its focus/close behavior; do not use a delay to hide a missing callback.


Last updated: September 10, 2026