Carwipe

Configuration

Configuration

Files you can edit

File What is in it
config.lua Every setting on this page
locale.lua Panel, command and design footer texts in Spanish and English

Both files are not encrypted. Restart the resource after a change.

The panel wins over config.lua. The automatic mode, the interval, the design, the colours and the position are first-boot defaults: once an admin changes one of them in /carwipepanel, the saved value is used from then on, even if you edit the config. See Panel settings.

General

Config.Language      = 'es'             -- 'es' | 'en'
Config.Command       = 'carwipe'        -- /carwipe [seconds]
Config.CancelCommand = 'cancelcarwipe'  -- /cancelcarwipe
Config.PanelCommand  = 'carwipepanel'   -- /carwipepanel
Config.CountdownTime = 35               -- seconds
Option Default What it does
Config.Language 'es' Language of the panel, the command help and the design footers (locale.lua)
Config.Command 'carwipe' Command that starts a carwipe
Config.CancelCommand 'cancelcarwipe' Command that cancels the running carwipe
Config.PanelCommand 'carwipepanel' Command that opens the admin panel
Config.CountdownTime 35 Countdown in seconds for automatic wipes, for /carwipe without a number, and the panel's starting value

Admin panel

Config.Panel = {
    accent = false,   -- e.g. '#9e0303' to match your server colours
}

accent is an optional hex colour for the panel itself. false keeps the default.

Permissions

Config.PermissionMode = 'auto'                        -- 'auto' | 'ace'
Config.AcePermission  = 'group.admin'
Config.AdminGroups    = { 'admin', 'god', 'superadmin' }
Config.PermissionMode Behaviour
'auto' (default) A player is admin if they have the ACE in Config.AcePermission, or a QBX / QB-Core permission listed in Config.AdminGroups, or an ESX group listed in Config.AdminGroups. The commands show in chat suggestions for everyone, but refuse non-admins
'ace' Only the ACE check. The commands are hidden from players who don't have it

How to grant the ACE is on the Installation page (step 4). The server console always has access.

Automatic carwipe

Config.AutoCarwipe  = true   -- run carwipes on a timer
Config.AutoInterval = 60     -- minutes between automatic carwipes

Every automatic carwipe uses Config.CountdownTime. If a carwipe is already running when the timer fires, that round is skipped. Admins can switch the mode and change the interval (5 to 720 minutes) from the panel.

Vehicle whitelist

Config.WhitelistedVehicles = {
    'DLTS7',
    'DLTS6',
    -- ...
}

Vehicle model names (spawn names) that are never removed. Useful for trailers and other vehicles players can't sit in. The shipped list is an example: replace it with your own models.

Plate whitelist

Config.WhitelistedPlates = {
    'DEALER',
}

Vehicles whose plate matches an entry are never removed. Upper / lower case and spaces around the plate don't matter.

  • 'DEALER' protects jg-dealerships showroom vehicles.
  • Add 'TEST1111' if you also want jg-dealerships test-drive cars protected.

What gets removed

When the countdown ends, every empty vehicle is removed except:

  • the vehicle a player is sitting in
  • models in Config.WhitelistedVehicles
  • plates in Config.WhitelistedPlates
  • vehicles attached to something else (for example a car loaded on a trailer)

Announcement

Config.UI = {
    position = 'top-center',
    theme    = 'classic',

    colors = {
        primary       = '#9e0303',   -- accent: icons, progress bar, highlights
        background    = '#030000',   -- card background
        gradientStart = '#050000',
        gradientEnd   = '#050000',
    },

    texts = {
        title    = 'Limpieza de Carros',
        subtitle = 'Sistema Automático',
        message  = 'Todos los <span class="highlight">carros vacíos</span> serán <span class="highlight">removidos</span> de las calles. ¡Súbete a tu vehículo antes que termine el tiempo!',
        footer   = 'Limpieza en proceso',
    },
}

Position

'top-left', 'top-center', 'top-right', 'center-left', 'center-center', 'center-right', 'bottom-left', 'bottom-center', 'bottom-right'. The older 'top', 'center' and 'bottom' still work.

A position dragged in the panel replaces this one for everyone.

Design

theme Look
'classic' (default) The original card
'dash' Car dashboard: carbon fibre, LED digits, fuel gauge
'flip' Split-flap clock; the seconds card flips on every tick
'alert' Esports-style lower third with angled edges
'ring' Round countdown dial with the time in the middle

Your colours apply on top of whichever design you pick.

Colours

  • primary — accent colour (icons, progress bar, highlights)
  • background — base colour of the card
  • gradientStart / gradientEnd — kept so older configs load; the current designs don't use them

The panel has six colour pickers (Primary, Background, Text, Text 2, Borders, Bar). Saved panel colours replace these for everyone; RESET in the panel goes back to the config colours.

Texts

  • title, subtitle, message, footer — what the card says.
  • message accepts <span class="highlight">…</span> to colour words with the accent.
  • Leave footer at its default text and each design shows its own footer (from locale.lua). Change it and your text shows on every design.

Panel settings

These are saved in the suty_carwipe table when an admin changes them in /carwipepanel:

Setting Config default it replaces
Automatic carwipe on / off Config.AutoCarwipe
Interval (minutes) Config.AutoInterval
Announcement design Config.UI.theme
Announcement colours Config.UI.colors
Announcement position Config.UI.position

To go back to the config values for everything, empty the table and restart the resource:

DELETE FROM suty_carwipe;

Quick reference

Want to… Set
Make the countdown 60 seconds Config.CountdownTime = 60
Turn off automatic carwipes Config.AutoCarwipe = false (or the panel toggle)
Run it every 2 hours Config.AutoInterval = 120 (or the panel)
Protect a model Add it to Config.WhitelistedVehicles
Protect a plate Add it to Config.WhitelistedPlates
Show the panel in English Config.Language = 'en'
Rename /carwipe Config.Command = 'limpieza'
Hide the commands from non-admins Config.PermissionMode = 'ace'

Merry Christmas.

From Suty.