# Server Cleaner

The **Server Cleaner Script** for FiveM is the one-stop solution for managing Server cleanup via in game, this script supports global sided changing, This script also has built in discord logging via webhooks  and has Discord Role Permission or Ace Permissions!

***

<figure><img src="/files/7zh66Nef7GwSoeKKYldi" alt=""><figcaption></figcaption></figure>

1. [VeniceNotify](https://forum.cfx.re/t/codem-advancednotifysystem/4812202)
2. [OkOkNotify](https://forum.cfx.re/t/okoknotify-standalone-paid/3907758)
3. [Ox\_lib](https://github.com/overextended/ox_lib)
4. Chat
5. GTA

***

<figure><img src="/files/SpMscVNMZqsjkgvXax7q" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/BII4UdNOK1x8uHt9V8Xh" alt=""><figcaption></figcaption></figure>

<p align="center">If you don't have access to the menu</p>

<figure><img src="/files/9QIF8uKri8QQop5vH8Zy" alt=""><figcaption></figcaption></figure>

<p align="center">If you have permission to the menu, but don't have access to perform actions</p>

<figure><img src="/files/HdKdcXAg1QHaTAASOEr9" alt=""><figcaption></figcaption></figure>

<p align="center">Menu Preview, Only shows the options you have access to</p>

<figure><img src="/files/YIBVz4eVRALCawE6tzxY" alt=""><figcaption></figcaption></figure>

<p align="center">10 Second Notification</p>

<figure><img src="/files/yWxomx5aF76s7Lq5nKmb" alt=""><figcaption></figcaption></figure>

<p align="center">5 Second Notification</p>

<figure><img src="/files/ubCecUzCGttc4dE8GynO" alt=""><figcaption></figcaption></figure>

<p align="center">Completed Notification</p>

<figure><img src="/files/BF00lrlAPR3FYkAS9t9h" alt=""><figcaption></figcaption></figure>

<p align="center">Discord Logging Preview</p>

***

```lua
Config = {}
-----------------------------------------------------------------------------------------------------
-- Discord Logging Configuration
-----------------------------------------------------------------------------------------------------
Config.webhookUrl = "YOUR DISCORD WEBHOOK"
-----------------------------------------------------------------------------------------------------
-- Permission Configuration
-----------------------------------------------------------------------------------------------------
Config.Permission = "Discord" -- Options: "Discord", "Ace"
-----------------------------------------------------------------------------------------------------
-- Base Menu Permission Configuration
-----------------------------------------------------------------------------------------------------
Config.MenuPermission = "admin"  -- To Open The Menu
Config.DiscordRoleMenuPermission = "DISCORDROLEIDFORCLEANUPMENU"  -- To Open The Menu
-----------------------------------------------------------------------------------------------------
-- Ace Permission Configuration
-----------------------------------------------------------------------------------------------------
Config.vehicleClearPermission = "toggle-npc"
Config.propClearPermission = "toggle-npc"
Config.pedClearPermission = "toggle-npc"
Config.chatClearPermission = "toggle-npc"
Config.TriggerGlobalClear = "toggle-npc"
-----------------------------------------------------------------------------------------------------
-- Discord Role Permission Configuration
-----------------------------------------------------------------------------------------------------
Config.DiscordRolevehicleClearPermission = "DISCORDROLEIDFORCLEANUP1"
Config.DiscordRolepropClearPermission = "DISCORDROLEIDFORCLEANUP2"
Config.DiscordRolepedClearPermission = "DISCORDROLEIDFORCLEANUP3"
Config.DiscordRolechatClearPermission = "DISCORDROLEIDFORCLEANUP4"
Config.DiscordRoleTriggerGlobalClear = "DISCORDROLEIDFORCLEANUP5"
-----------------------------------------------------------------------------------------------------
-- Zone Cleanup Configuration
-----------------------------------------------------------------------------------------------------
Config.UseCleanupZones = true  -- Enable or disable cleanup zones
Config.CleanupZones = {
    {
        name = "Sandy Shores 24/7",
        coords = vector3(1983.33, 3765.33, 32.34),
        size = vector3(101.0, 60.0, 9999.0),
        rotation = 27.0,
        debug = false,
        time = 30,  -- Time before the zone is cleaned up
        timeType = "minutes",  -- Options: "seconds", "minutes", "hours"
        type = "all",  -- Options: "vehicles", "props", "peds", "all"
    }
}
-----------------------------------------------------------------------------------------------------
-- Notification Configuration
-----------------------------------------------------------------------------------------------------
Config.NotifyType = "Ox_lib"
Config.notifyTime = 5000  -- Duration of notifications (in milliseconds)
-- Available Notification Types
-- 1. VeniceNotify
-- 2. OkOkNotify
-- 3. ADNotify
-- 4. Ox_lib
-- 5. Chat
-- 6. GTA
-----------------------------------------------------------------------------------------------------
return Config

```

{% hint style="success" %}
Downloads

\[PAID | Open Source] [Official Store Link](https://arcticdevlabs.com/package/script?script=Server-Cleaner)
{% endhint %}


---

# 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://arctic-development.gitbook.io/arctic-development/scripts/server-cleaner.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.
