# Installation

{% hint style="warning" %}
Ich empfehle zur Installation von Scripts **WinSCP**

**FileZilla** überträgt in den meisten Fällen einige verschlüsselte Dateien nicht. Dadurch kann es passieren, dass die Scripts nicht funktionieren!
{% endhint %}

## 1. Platzverweis herunterladen

Lade das Platzverweis Script über unser License Panel herunter.

{% embed url="<https://license.wavecore.dev>" %}

Füge das Platzverweis Script (wavecore\_platzverweis) anschließend in deine Start Config hinzu.&#x20;

Das Platzverweis Script muss **nach** der Framework (z.B. es\_extended) und MySQL (z.B. mysql-async oder oxmysql) Ressource starten.

```
start wavecore_platzverweis
```

## 2. SQL einfügen

Führe die SQL aus. Wir empfehlen dort **HeidiSQL**

```sql
CREATE TABLE IF NOT EXISTS `platzverweis_bans` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `identifier` varchar(60) NOT NULL,
    `firstname` varchar(50) NOT NULL,
    `lastname` varchar(50) NOT NULL,
    `ban_type` enum('public_place','current_position') NOT NULL,
    `place_name` varchar(100) DEFAULT NULL,
    `coordinates` longtext NOT NULL,
    `radius` float DEFAULT NULL,
    `duration_minutes` int(11) NOT NULL,
    `issued_by` varchar(60) NOT NULL,
    `issued_by_name` varchar(100) NOT NULL,
    `issued_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
    `expires_at` timestamp NOT NULL,
    `is_active` tinyint(1) NOT NULL DEFAULT 1,
    `warning_count` int(11) NOT NULL DEFAULT 0,
    `last_warning` timestamp NULL DEFAULT NULL,
    `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
    `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    PRIMARY KEY (`id`),
    KEY `identifier` (`identifier`),
    KEY `is_active` (`is_active`),
    KEY `expires_at` (`expires_at`),
    KEY `issued_by` (`issued_by`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

CREATE INDEX idx_platzverweis_active_expires ON `platzverweis_bans` (`is_active`, `expires_at`);
CREATE INDEX idx_platzverweis_identifier_active ON `platzverweis_bans` (`identifier`, `is_active`);

ALTER TABLE `platzverweis_bans` 
COMMENT = 'Speichert aktive und abgelaufene Platzverweise';

-- Beispiel-Daten
-- INSERT INTO `platzverweis_bans` (`identifier`, `firstname`, `lastname`, `ban_type`, `place_name`, `coordinates`, `radius`, `duration_minutes`, `issued_by`, `issued_by_name`, `expires_at`) VALUES
-- ('steam:123456789', 'Max', 'Mustermann', 'public_place', 'Stadtzentrum', '[{"x":200.0,"y":-800.0,"z":30.0},{"x":300.0,"y":-800.0,"z":30.0},{"x":300.0,"y":-700.0,"z":30.0},{"x":200.0,"y":-700.0,"z":30.0}]', NULL, 30, 'steam:987654321', 'Polizist Name', DATE_ADD(NOW(), INTERVAL 30 MINUTE);

```


---

# 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.wavecore.dev/wavecore/platzverweis/installation.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.
