# Textnachricht nur für einen Spieler

Ihr könnt die Game.LocalPlayer() Funktion nutzen, um Nachrichten im Chat lediglich für einen Spieler darzustellen:

```lua
function privateMessage(playerid, msg)
	if Game.LocalPlayer() == playerid then
		dbg.stm(msg)
	end
end

function new_game()
	privateMessage(1, "Dies kann nur Spieler 1 lesen!")
	privateMessage(2, "Dies kann nur Spieler 2 lesen!")
end
```


---

# 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/tutorials/code-snippets/textnachricht-nur-fur-einen-spieler.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.
