Pressure Washer
Discover a new standard of realism and immersion with the Pressure Washer Script! This script brings immersive, configurable vehicle cleaning to your server with framework integration and ox_target support. Enjoy a realistic dirt system and advanced customization for a truly dynamic gameplay experience.
Installation
Download the Script
Download Pressure Washer using the Cfx Portal.
Download the Dependencies
Download the latest ox_lib GitHub.
Server.cfg Configuration
Add the following lines to your server.cfg to ensure the required resources are loaded:
ensure ox_lib
ensure sx_pressurewasherMake sure ox_lib is started before sx_pressurewasher.
Commands
Staffs can use the /createpressurewasher command to create pressure washer stands in-game. This requires the PressureWasher.Create ace permission.
Ace Permission Setup
| Permission | Description |
|---|---|
PressureWasher.Create | Allows user to create pressure washer stands with the command |
Configuration
The Pressure Washer Script is highly configurable to fit your server's needs. Below is an overview of the main configuration options:
Config = {}
--- @type 'en' | 'de'
Config.Language = 'en'
--- @type 'standalone' | 'nd' | 'qb' | 'esx' | 'ox'
Config.Framework = 'standalone'
Config.PressureWasherProp = `weapon_pressurewasher`
Config.PressureWasherStand = `prop_compressor_02`
--- @type '3d' | 'ox_target'
Config.InteractionType = '3d'
Config.InteractionKey = 51 -- E key by default, used for 3D text interaction
Config.InteractionDistance = 2.0 -- Maximum distance allowed for interaction
-- Maximum allowed rope length between washer and stand
Config.MaxRopeLength = 8.0
-- The rate at which dirt is removed per milliseconds when using the pressure washer
Config.DirtRemovalRate = 0.013
-- Advanced dirt system: visually more dirt and controls how much dirt is applied over time
Config.AdvancedDirtLevel = {
Enabled = true,
UpdateInterval = 10000, -- in milliseconds
SurfaceCategories = {
-- Concrete, asphalt, etc.
['Street'] = {
DirtLevelRate = 0.03,
MaxDirtLevel = 4.0
},
-- Dirt, sand, mud, swamp, etc.
['Offroad'] = {
DirtLevelRate = 0.1,
MaxDirtLevel = 15.0
},
}
}
-- Blip configuration for the pressure washer location
Config.Blip = {
Enabled = true,
Sprite = 365,
Display = 4,
Scale = 0.8,
Color = 2,
Name = "Pressure Washer"
}Troubleshooting
- Ensure ox_lib is installed and started before sx_pressurewasher.
- Make sure you have the correct ace permissions for staff commands.