# SU.Buildings.SetProductionPercentMode

## SU.Buildings.SetProductionPercentMode(buildingID, enable)

Gibt dem durch die ID angegebenen Gebäude den Auftrag, in oder aus dem Prozente-Modus zu wechseln.

#### Notiz

* die KI stellt die Produktion der Waffenschmiede alle paar Sekunden um, somit ist diese Funktion **bei aktivierten KIs** momentan ziemlich **sinnlos**!

#### Parameter

* `buildingID`: ID des Gebäudes
* `enable [0-1]`: 0 deaktiviert, 1 aktiviert den Prozente-Modus beim Gebäude

#### Rückgabewert

* 1: erfolgreicher Aufruf (dies bedeutet nur, dass die Parameter valide waren und nicht zwingend, dass der Auftrag ausgeführt wird, z.B. wenn das Gebäude keine Ware produzieren kann!)
* 0: sonst / Fehler

#### Beispiel

```lua
local success = SU.Buildings.SetProductionPercentMode(buildingID, 1)
```


---

# 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.buildings/su.buildings.setproductionpercentmode.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.
