# Commands

```lua
-- File: shared/commands.lua
```

## 🔧 Admin Commands

All commands are **server-side only** and require RCON / admin permissions (`true` as the third argument to `RegisterCommand`).

### Command reference

#### /addgardenerxp \[playerID] \[amount]

Adds XP to a player. Automatically triggers level-up(s) if the threshold is met.

| Parameter  | Type     | Description              |
| ---------- | -------- | ------------------------ |
| `playerID` | `number` | Server ID of the target. |
| `amount`   | `number` | Amount of XP to add.     |

**Console output:** `[SUCCESS] Added <amount> XP for player ID: <id>`

***

#### /setgardenerxp \[playerID] \[amount]

Sets a player's XP to an exact value. Recalculates levels accordingly.

| Parameter  | Type     | Description              |
| ---------- | -------- | ------------------------ |
| `playerID` | `number` | Server ID of the target. |
| `amount`   | `number` | New XP value.            |

***

#### /addgardenerlevel \[playerID] \[amount]

Adds levels to a player (capped at `Config.Levels.maxLevel`). Each added level grants **1 skill point**.

| Parameter  | Type     | Description              |
| ---------- | -------- | ------------------------ |
| `playerID` | `number` | Server ID of the target. |
| `amount`   | `number` | Number of levels to add. |

The target player receives a chat notification.

***

#### /setgardenerlevel \[playerID] \[amount]

Sets a player's level to an exact value (capped at `Config.Levels.maxLevel`). Resets XP to `0`.

| Parameter  | Type     | Description              |
| ---------- | -------- | ------------------------ |
| `playerID` | `number` | Server ID of the target. |
| `amount`   | `number` | New level value.         |

***

#### /addgardenersp \[playerID] \[amount]

Adds skill points to a player without changing their level or XP.

| Parameter  | Type     | Description                    |
| ---------- | -------- | ------------------------------ |
| `playerID` | `number` | Server ID of the target.       |
| `amount`   | `number` | Number of skill points to add. |

***

## Related pages

- [Installation](/jobs/lawnmower/installation) — Welcome to Koja-Lawnmower, a fluent job system designed to enhance gameplay for your players.
- [Configuration](/jobs/lawnmower/configuration) — Poniżej znajdują się opisane oddzielnie poszczególne tabele z shared/config.lua.
- [Exports](/jobs/lawnmower/exports) — The resource exposes several exports that can be called from other resources on both server and client sides.
- [Lawnmower](/jobs/lawnmower) — back to the section overview
