# createTrayNotification (Cliente)

> Muestra una notificación del sistema en la bandeja de Windows, mientras el juego no tiene el foco.

- **Plataforma**: MY Multiplayer (MYMP)
- **Tipo**: Función Lua
- **Lado**: Cliente
- **Categoría**: Salida y depuración
- **URL**: https://wiki.mymp.gg/es/createTrayNotification

## Sintaxis

```lua
bool createTrayNotification(string text [, string icon = "default", bool sound = true])
```

## Parámetros

| Nombre | Tipo | Descripción |
| --- | --- | --- |
| `text` | `string` | El texto de la notificación. |
| `icon` | `string` | `"default"`, `"info"`, `"warning"` o `"error"`. *(por defecto: `"default"`)* |
| `sound` | `bool` | Si la notificación reproduce el sonido del sistema. *(por defecto: `true`)* |

## Retorno

`true` si la notificación se mostró. `false` si la ventana del juego tiene el foco o se mostró otra notificación hace menos de 30 segundos.

## Ejemplo

```lua
addEvent("onRaceStart", true)
addEventHandler("onRaceStart", root, function()
    createTrayNotification("¡La carrera está comenzando!", "info")
end)
```

## Ver también

- [setClipboard (Cliente)](https://wiki.mymp.gg/es/setClipboard.md): Copia un texto al portapapeles del ordenador del jugador.
