> For the complete documentation index, see [llms.txt](https://laot7490.gitbook.io/ltbridge/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://laot7490.gitbook.io/ltbridge/scripting/events/register.md).

# Register

Register a event with formatted name.

{% hint style="info" %}
**Side:** Shared · **Category:** Events · **API:** `LT.Events.Register`
{% endhint %}

## Example

```lua
local register = LT.Events.Register
-- Client example:
register('event', function(arg1, arg2)
    print(arg1, arg2)
end)
-- Server example:
register('event', function(arg1, arg2)
    local src = source
    print(src, arg1, arg2)
end)
```

## Parameters

| Name   | Required | Description        |
| ------ | -------- | ------------------ |
| `name` | Yes      | Event name.        |
| `cb`   | No       | Callback function. |
