Kartik Scripts

Vehicle Wax & Protection

📄 Config file: shared/wax_config.lua

Vehicle waxes provide a protective layer that slows down dirt accumulation over time. The system supports multiple tiers of wax, each with its own protection factor and durability.


Wax Configuration

Each wax tier is defined in the Config.Waxes table:

Config.Waxes = {
    ['wax_basic'] = {
        label = "Basic Wax",
        duration = 8000,
        protectionFactor = 0.5, -- Dirt accumulates 50% slower
        maxDistance = 50000.0,  -- Lasts for 50km
    },
    -- ...
}

Protection Options

OptionWhat it does
labelName shown on the progress bar.
durationTime in milliseconds to apply the wax.
protectionFactorA multiplier for dirt accumulation. 0.2 means dirt accumulates at only 20% of the normal rate.
maxDistanceTotal distance (in distance units) the wax remains active.

Usage Summary

  1. Wash Vehicle: The vehicle must be completely clean (Dirt Level 0) before wax can be applied. Use a Cleaning Kit or a car wash.
  2. Apply Wax: Use a wax item from your inventory while standing near the vehicle.
  3. Active Protection: Once applied, the script automatically reduces the dirt accumulation rate in the background.
  4. Distance Tracked: The remaining wax durability is tracked via the vehicle's State Bag. You can see the remaining protection distance in the vehicle information menu.

Technical Details (State Bags)

The wax state is stored in the vehicle's state bags:

  • wax_type: The key of the wax currently applied (e.g. wax_premium).
  • wax_durability: Remaining distance units.
  • wax_factor: The active protection multiplier.

On this page