# SU.Game.ShowTextMessage

## SU.Game.ShowTextMessage(msg\[, icon=8\[, lifetime\_s=120\[, x, y]]]

Zeigt die Nachricht im Chat an.

**Kurzform** siehe[SU.Game.stm](/s4-lua-api-de/su-library-functions/su.game/su.game.stm.md).

#### Parameter

* `icon`: bestimmt das Symbol links neben der Nachricht im Chat (siehe Tabelle)

<table><thead><tr><th width="161">icon (optional)</th><th>Symbol links neben der Nachricht im Chat</th></tr></thead><tbody><tr><td>0</td><td>rot</td></tr><tr><td>1</td><td>blau</td></tr><tr><td>2</td><td>grün</td></tr><tr><td>3</td><td>gelb</td></tr><tr><td>4</td><td>violett</td></tr><tr><td>5</td><td>orange</td></tr><tr><td>6</td><td>türkis</td></tr><tr><td>7</td><td>weiß</td></tr><tr><td>8 (Standard)</td><td>Rufzeichen</td></tr></tbody></table>

* `lifetime_s` (optional): Zeit in Echtzeit-Sekunden (nicht Spielzeit!), wie lange die Nachricht sichtbar sein soll. Danach verschwindet sie von alleine. \
  `lifetime_s=-1` bewirkt, dass die **Nachricht** (selbst beim Klick darauf) **nicht verschwindet!**\
  \&#xNAN;**`lifetime_s=-2`** ist die am längsten bestehende aber wegklickbare Nachricht.
* `x, y` (optional): Koordinaten, zu denen der Bildschirm springt, wenn auf die Nachricht gedrückt wird.

#### Beispiel

```lua
SU.Game.ShowTextMessage("Hey there!")
SU.Game.stm("Hey there!")    // Kurzform (stm = ShowTextMessage)
SU.Game.ShowTextMessage("Hey there!", 1, 20)    // blaues icon, 20 Sekunden
SU.Game.ShowTextMessage("Hey there!", 8, 120, 100, 50)    // Bildschirm springt zu (100,50)
SU.Game.ShowTextMessage("Hey there!", 8, -1, 100, 50)    // Nachricht bleibt für immer bestehen
```


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.settlers-united.com/s4-lua-api-de/su-library-functions/su.game/su.game.showtextmessage.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
