Skip to content

GlobeClear – World Cleanup System for FiveM

Overview 🌍

GlobeClear is a lightweight world cleanup system for FiveM servers. It allows server administrators to trigger a full server-side cleanup of peds, vehicles, and objects after a countdown, notifying players with a smooth UI experience. Optional Discord role-based permissions let you restrict who can execute the cleanup.

Features ✨

Installation πŸ“¦

  1. Move the GlobeClear resource folder into your server's resources/ directory.
  2. Add ensure GlobeClear to your server.cfg, Or refresh then ensure GlobeClear [Note, permissions may NOT work this way]

Configuration βš™οΈ

Configure behavior inside config.lua:

Config.ClearPeds         = true
Config.ClearVehicles     = true
Config.ClearObjects      = true

Config.Notification = {
  title      = "WorldClear",
  startText  = "Cleanup starting…",
  finishText = "Cleanup complete!"
}

-- Discord ACL settings
Config.DiscordToken        = "YOUR_BOT_TOKEN_HERE"       -- Bot token (prefixed with "Bot ")
Config.DiscordGuildId      = "YOUR_GUILD_ID_HERE"         -- Discord server (guild) ID
Config.AllowedDiscordRoleId= "123456789012345678"         -- Role ID allowed to run /worldclear

Discord ACL πŸ”’

GlobeClear can call the Discord API directly to verify a player's roles. Players possessing the configured role ID in your guild will be allowed to execute /worldclear in-game.

Ensure you have HTTP requests enabled and your bot has guilds.members.read (or appropriate) permissions.

Usage πŸš€

Both the server console and in-game players with the required Discord role can trigger a world cleanup:

/worldclear

This will initiate a 30-second countdown for all players, followed by entity removal and a final notification.

Scripts πŸ“œ