> For the complete documentation index, see [llms.txt](https://docs.settlers-united.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.settlers-united.com/s4-lua-api-de/su-library-functions/su.buildings/su.buildings.sethaltedstate.md).

# SU.Buildings.SetHaltedState

## SU.Buildings.SetHaltedState(buildingID, haltedState)

Setzt das durch die ID angegebene Gebäude entsprechenden auf (nicht) pausiert.

#### Parameter

* `buildingID`: ID des Gebäudes
* `haltedState [0-1]`: 0 um das Gebäude arbeiten zu lassen, 1 um es zu pausieren

#### Rückgabewert

* 1: Gebäude ist nun pausiert (oder war es schon)
* 0: sonst / Fehler

#### Beispiel

```lua
local newHaltedState = SU.Buildings.SetHaltedState(buildingID, 1)    // pausiert das Gebäude
```
