> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fzd-scripts.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Events

> Events emitted or dispatched by FzD Action Wheel.

## Named client event

When an action has `clientEvent`, the handler receives:

```lua theme={null}
AddEventHandler('my_resource:repair', function(payload, actionId)
    print(actionId)
end)
```

Arguments are `(payload, actionId)`.

## Named server event

When an action has `serverEvent`, FzD sends:

```lua theme={null}
TriggerServerEvent(action.serverEvent, payload, actionId)
```

Validate all sensitive state server-side.

## Generic selection event

If no client event, server event or command is supplied:

```lua theme={null}
AddEventHandler('fzd_actionwheel:selected', function(actionId, payload)
    -- Handle generic selection.
end)
```

Arguments are `(actionId, payload)`.

## Closed event

Whenever a visible wheel closes:

```lua theme={null}
AddEventHandler('fzd_actionwheel:closed', function()
    -- Wheel closed.
end)
```
