> For the complete documentation index, see [llms.txt](https://docs.perfectcs2.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.perfectcs2.com/documentacao/api/client.md).

# client

Notificações e utilidades.

## client.notify

```lua
client.notify(title, [text], [kind="info"], [seconds=4])
```

Mostra uma notificação no canto da tela, igual às do Perfect. Ela aparece mesmo com o menu fechado.

| Parâmetro |                                                                  |
| --------- | ---------------------------------------------------------------- |
| `kind`    | `"info"`, `"success"`, `"warning"` ou `"error"`, que mudam a cor |
| `seconds` | Quanto tempo fica na tela, de 1 a 30                             |

```lua
client.notify("Config applied", "Rifle FOV set to 3.5", "success")
```

## client.delay

```lua
client.delay(seconds, fn)
```

Roda `fn` uma vez, depois de `seconds`. Para repetir, chame de novo dentro dela:

```lua
local function every_second()
    print("tick")
    client.delay(1, every_second)
end
every_second()
```

## Outras

| Função                       | Devolve / faz                             |
| ---------------------------- | ----------------------------------------- |
| `client.username()`          | Nome do usuário logado no Perfect         |
| `client.version()`           | Versão do Perfect, como `"4.0"`           |
| `client.fps()`               | FPS atual (média dos últimos frames)      |
| `client.clipboard_get()`     | Texto da área de transferência            |
| `client.clipboard_set(text)` | Copia `text` para a área de transferência |

## print e warn

`print(...)` e `warn(...)` escrevem no **Console** do script, na aba Scripts; `warn` aparece em amarelo. Os valores são convertidos com `tostring` e separados por espaços.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.perfectcs2.com/documentacao/api/client.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
