# setClipboard (Cliente)

> Copia un texto al portapapeles del ordenador del jugador.

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

## Sintaxis

```lua
bool setClipboard(string text)
```

## Parámetros

| Nombre | Tipo | Descripción |
| --- | --- | --- |
| `text` | `string` | El texto. |

## Retorno

`true`.

## Ejemplo

```lua
addCommandHandler("copypos", function()
    local pos = getElementPosition(localPlayer)
    setClipboard(("%.2f, %.2f, %.2f"):format(pos.x, pos.y, pos.z))
end)
```

## Ver también

- [createTrayNotification (Cliente)](https://wiki.mymp.gg/es/createTrayNotification.md): Muestra una notificación del sistema en la bandeja de Windows, mientras el juego no tiene el foco.
