[ESX / QB] Car wash / car detailer RP job (player to player) with hose

This is a RP job without NPCs and automated billing.
You need to have (ESX or QBcore) and ox_target on your server.

  • Customize locations in the configuration file.
  • Configure multiple job options in the settings.
  • Immersive experience with various sounds and effects.
  • Synchronized effects and sounds for all players.
  • Synchronized cleaning, no need to re-enter the driver’s seat.
  • Clean vehicles with players inside.
  • Collaboration: Multiple players can work on a single vehicle.
  • Complete cleaning prevents new dirt for a specific duration (X minutes).
  • Apply wax for extended cleanliness.
  • Dirt prevention status is saved even after a server restart.
  • Dropping the bucket or hose when leaving the designated area.
  • Clean progress bar with notifications.
  • Includes a custom nozzle prop.
  • Comes with both English and German locales.
  • Optimized Performance

Pictures



Preview Video


Changelog (click to expand)

Version 1.2.4:
QBCore & ESX:

  • Renamed notifications.lua to functions.lua
  • Opened up the qb-target and ox-target exports as requested (in functions.lua)
  • Added a open event in functions.lua where you can put stuff that should happen once the vehicle is fully cleaned (e.g. removing fingerprints from another script) as requested

Version 1.2.3:
QBCore:

  • Added qb-target support
  • New target functions that don’t require you to aim for the door etc. while using bucket & sponge
  • Vehicles without doors / hood / trunk work now
  • Fixed a bug that changed the mini-map size on scroll up
  • New sound and effects for the rinse option of the hose (you can still use the old one if you liked it more)
  • Tweaked foam sound
  • Fixed a lot of issues with warnings for OneSync Infinity

Version 1.2.2 (only ESX yet):

  • New target functions that don’t require you to aim for the door etc. while using bucket & sponge
  • Vehicles without doors / hood / trunk work now
  • Fixed a bug that changed the mini-map size on scroll up
  • New sound and effects for the rinse option of the hose (you can still use the old one if you liked it more)
  • Tweaked foam sound
  • Fixed a lot of issues with warnings for OneSync Infinity
  • Fix for the progress bar on 21:9 and 32:9 resolutions (provided by Stoned from the Novaline Server. Thank you!)

Version 1.1.8:

  • Catched a conversion mistake that made the duration of the wax effect much too long
  • Fixed a bug with the distance check of the bucket2
  • If you are already holding a bucket and using it again it now will make you stop using the bucket without deducting another one from your inventory

Version 1.1.7:

  • Released QB Version :partying_face:
  • Fixed “Object not found”-messages when facing a diffrent direction when wanting to clean or wax
  • Fixed a function which checks if you are in range of a bucket to wax.

Version 1.1.6:

  • Fixed some issues regarding OneSync Infinity (props despawning and falling)
  • Implemented a new way to check for the vehicle (the old one didn’t work well with players inside)
  • Fixed effects not spawning on the car when players were inside

Version 1.0.3:

  • Resolved a bug that was causing Config.JobRestriction to have no effect

Version 1.0.1:

  • Resolved a “Tried access of invalid entity: XXXX” error
  • Added new spawn method for entities. ‘Overspawning’ shouldn’t happen anymore
  • Added a function that prevents you from returning your nozzle to a diffrent hose reel and thus breaking it.
  • Added a function that deletes all entities on script stop. You can now restart the script as often as you like without having to deal with floods of hoses and buckets.
  • Added new Items to use in Inventory with wich you can place buckets and hoses.
  • Added the ability to place hoses and buckets where you want them. You can now place them in-game instead of writing them into the config file. Or you can allow you players to place their own hoses if they have the items. There are now two types. One for the detailer jobs and one for the public.
  • You can choose if the items that are placeable are persistent or not. Persistent items spawn again after server restart.

A lot of config options (click to expand)
Config = {}                         -- If you have questions, join our discord https://discord.gg/p7wvZRnWcH or write in the cfx forum post.

Config.Locale = 'en'	            -- Change the language file here 'en' and 'de' are included

Config.RangeLimit = 8.0             -- How close you need to be to the bucket to perform waxing and cleaning tasks

Config.Volume = 0.90                -- Volume of the sound effects
Config.SoundRange = 6               -- How far you can be away and still hear the sound.
Config.SoundFiles = 3               -- The Nummber of random soundfiles for the washing effect. You may add more but have to declare them in the fxmanifest.lua

-- Progress Bar --
-- We highly recommend using the progress bar. It looks clean and shows most notifications the script needs in one spot.
Config.ProgressBar = true           -- Wether you want to use the progress bar
Config.HideBarAfter = 5             -- After how many seconds without interaction the progressbar should be hidden.
Config.ProgressColor = '#4eb3de'    -- Here you can edit the progress color to your likings. https://g.co/kgs/qpnR1M
Config.FinishedColor = '#4ede83'    -- Here you can edit the finished color to your likings. https://g.co/kgs/qpnR1M
Config.InfoColor = '#ede174'         -- Here you can edit the color for the wax notification to your likings. https://g.co/kgs/qpnR1M
Config.WrongColor = '#eb584d'       -- Here you can edit the color for the wrong action to your likings. https://g.co/kgs/qpnR1M


Config.EnableCommand = true         -- Enable /cardirt command for testing
Config.StepMessage = false          -- Enable if you want to have the messages shown when a step is completed or in wrong order
Config.UseMissiontext = false       -- If false the script uses notifications from notifications.lua if true uses the "mission-passed-style text"
Config.TextTimer = 0.7              -- How long these messages should be shown
Config.EffectRange = 50.0           -- From how far the particle effects of the washing can be seen. If too high might bring 'Object does not exist' warnings for players.

Config.JobRestriction = true                    -- If you want the cleaning and waxing be restricted to jobs
Config.AllowedJobs = {'detailer', 'mechanic'}   -- Here you can put the jobs that are allowed to clean and wax the cars

-- Wash Options
Config.InteractDistance = 2.5      -- How close you need to be to pick up a bucket
Config.BucketModel = 'prop_cleaning_trolly'      -- The bucket model (hash) that should spawn and be interactive https://forge.plebmasters.de/objects/prop_cs_mopbucket_01
Config.WashDistance = 2.0          -- From how far away you can get the target option to wash a vehicle (might need to be higher for big trucks etc.)
Config.HandwashDuration = 10       -- How long in seconds one instance of handwashing is
Config.CleaningFactor = 0.5        -- How much dirt should be washed off the car per second when using the sponge. (Maximum car dirtyness in GTA is 15.0)
Config.CleanCooldown = 120         -- How long a vehicle can be left aside until you need to start the cleaning over again (default 120 seconds)
Config.CleanEffect = 30            -- How long (in minutes) the car should be kept clean after the wash (no wax)
Config.SpongeCleaningIncrement = 30   -- The higher the number the faster this stage of cleaning is done. (sponging) Default: 0.15

-- Hose Options
Config.HoseDB = true                -- If you want to use in-game placed hoses. You need to create hose_list table in your database.
Config.InteractDistance2 = 2.5      -- How close you need to be to pick up a hose
Config.HoseModel = 'prop_hose_3'        -- The model (hash) where you can pick up the hose https://forge.plebmasters.de/objects/prop_hose_3
Config.HoseLength = 10.0            -- How far you can pull the hose
Config.FoamCleaningFactor = 0.0     -- How much the foaming should actually clean the car per second (if unwanted set to 0)
Config.RinseCleaningFactor = 0.0    -- How much the rinsing should actually clean the car per second (if unwanted set to 0)
Config.HoseCleaningIncrement = 10   -- How long (in seconds) you need to spray foam or rinse the car (default 10)
Config.SameSpotWarning = true       -- If the player should be noticed about cleaning the same spot (not moving while spraying)
Config.SameSpotNotificationTime = 1 -- After how many seconds the player should be noticed that he is cleaning only one spot

Config.sprayTypes = {}
--Config.sprayTypes[1] = {fxDict = 'scr_xs_celebration', fxName = 'scr_xs_champagne_spray', fxRotation = vector3(0.0, 90.0, 0.0), sound1 = "fh_detailer_foam1", sound2 = "fh_detailer_foam2"}
--Config.sprayTypes[2] = {fxDict = 'core', fxName = 'water_cannon_jet', fxRotation = vector3(0.0, 0.0, -90.0), sound = nil}
Config.sprayTypes[1] = {fxDict = 'scr_carwash', fxName = 'ent_amb_car_wash_jet_soap', fxRotation = vector3(0.0, 90.0, 0.0), sound1 = "fh_detailer_foam1", sound2 = "fh_detailer_foam2"}
Config.sprayTypes[2] = {fxDict = 'scr_carwash', fxName = 'ent_amb_car_wash_jet', fxRotation = vector3(0.0, 90.0, 0.0), sound1 = "fh_detailer_rinse1", sound2 = "fh_detailer_rinse2"}
-- Wax Options
Config.WaxDuration = 25            -- How long (in seconds) it should take to apply wax
Config.WaxEffect = 120             -- How long (in minues) the car is protected from dirt after using the wax
Config.WaxLocationRestriction = true    -- If the wax should only be applyable near a car wash station
Config.NeedWax = true               -- True if the player should need the wax-item to apply it
Config.WaxConsume = true            -- If you want the wax-item to be consumed
Config.WaxName = 'car_wax'          -- The name of the wax in your items table 
Config.Interval = 10                -- How often in seconds should the wax check if the car has gotten dirty and if so lose the dirt. More time = less resmon.

-- Hose Placement
-- If you don't want to use this just don't use the hose_reel item.
Config.HoseInstallJob = true        -- If only person with certain jobs can install hoses. false = everybody can
Config.HoseInstaller = {'mechanic', 'handyman'} -- Jobs that are allowed to place a hose if Config.HoseInstallJob = true
Config.HoseConsume = true           -- Wether the hose reel should be deducted from the players inventory after placing it
Config.HosePersistent = true

-- Second hose
Config.HoseInstallJob2 = false      -- If you need a certain job to place this hose. false = everybody can
Config.HoseInstaller2 = {'detailer', 'job2', 'job3'} -- If you enable Config.HoseInstallJob2 these are the jobs that can place one
Config.HoseModel2 = 'prop_hose_1'   -- The model for the second hose
Config.Hose2Persistent = false      -- If the placed hose should spawn again after server restart
Config.InHandPosition2 = vector3(0.0, 0.0, -0.5)    -- If you are using a diffrent model for the hose you might need to adjust these. These are for the position while carrying the hose.
Config.InHandRotation2 = vector3(15.0, 0.0, 180.0)  -- If you are using a diffrent model for the hose you might need to adjust these. These are for the rotation while carrying the hose.


-- Inventory Buckets

Config.PersistentBucket = true                      -- If false the bucket only stays until server restart
Config.BucketPlaceJob = true                        -- If only person with certain jobs can install buckets or use them. false = everybody can
Config.BucketPlacer = {'detailer'}                  -- Jobs that are allowed to place a bucket if Config.BucketPlaceJob = true
Config.BucketConsume = true                         -- If true the bucket will be deducted from the inventory on use
Config.InHandPosition = vector3(0.0, 0.0, 0.0)      -- If you are using a diffrent model for the hose you might need to adjust these. These are for the position while carrying the hose.
Config.InHandRotation = vector3(195.0, 0.0, 0.0)    -- If you are using a diffrent model for the hose you might need to adjust these. These are for the rotation while carrying the hose.

Config.BucketPlaceJob2 = false						-- If you need a certain job for placing/using the second (public?) bucket
Config.BucketPlacer = {'detailer'}					-- The jobs you need if you need a job
Config.PlaceBucket2 = false							-- If true you place a bucket on the ground which can be interacted with multiple times. If false you just get the bucket into your hands temporary.
Config.PersistentBucket2 = false                    -- If true the bucket will spawn again after server restart. If false it will be deleted on restart.
Config.BucketModel2 = 'prop_cs_bucket_s'			-- The model for the second bucket if you choose to place it on the ground.

-- System
Config.DeleteRunOuts = true		    -- If true it deletes run out wax effects from the database to keep it clean
Config.DeleteRunOutsInterval = 30   -- How often the cleansing of run out wax-entries should take place (in minutes, default: every 30 min)


Config.Locations = {
vector4(173.88, -1716.98, 29.38-0.98, 53.85), --Location 1
vector4(168.27, -1712.62, 29.27-0.98, 240.94), --Location 2
vector4(171.96, -1739.85, 29.27-0.98, 238.11),
vector4(31.160442, -1405.068115, 28.33, 212.598419)
}


--If it is more convenient for you, you can delete all entries from Config.HoseLocation and place them in-game (you need to create hose_list table in your database)
Config.HoseLocations = {
vector4(175.02, -1740.38, 29.48, 180.00), --Location 1
vector4(174.165, -1716.62, 29.29, 228.18),
vector4(33.87, -1404.00, 29.33, 0),
vector4(39.784618, -1405.898926, 29.347290, 272.125977)
}


Get this and other Scripts at the Tebex-Store:
fivehead.eu


Code is accessible No
Subscription-based No
Lines (approximately) ~1800
Requirements ESX and ox-target
QBCore and ox_target or qb-target
Support Yes
5 Likes

would love if can set up at personal house, and require the use of items rather than being locked to certain locations and zones. Over all great concept i will support hoping you consider my suggestion in the near future.

1 Like

Good suggestion. I will make the location restriction optional and maybe do a in-game hose placement (if you maybe bought one at the hardware store) additional to the ones that are placed in the config file.

2 Likes

cant wait bro
been washing my cars for no reason now… thanks

is there payment to use and/or job restriction?
This is pretty dope, also can you place different props and such around when you create a new location?

Damn my post and answers always need to be checked for approval…

There is no p4yment option yet but I will add one soon.
Job restriction is already in place and you can add multiple jobs.

You can add multiple locations for the bucket and the hose in the config file but I am not sure if it is this your are asking about. Adding completely diffrent props would be possible but if they spawn elswhere on the map they would be usable too.

1 Like

will their be a qb core version of this script any time in the future??

Yes. As it only uses 2 functions of ESX it should be no trouble to convert.

let me know when this is converted to qb core and i will most defiantly consider purchasing this script.

Me as well

It took some time but I decided to go the extra mile.

You can now place two types of hoses.
You can decide in the config if you need a certain job to place them.
You can decide if they should be persistent or be deleted on server restart.


Also you can place two types of buckets.
Same with optional job or persistency.
Or you can decide that the bucket item is used directly from the inventory.

Also some bug-fixes :slightly_smiling_face:

Hope this is how you imagined.

1 Like

will be testing this ASAP gr8 work thanks for taking my advice.
i may have one more small suggestion if you dont mind when it comes to waxing car. dont h8 me please only want to see this script at full potential i know your capable of doing :blush: :wink: :sunglasses:

1 Like

Hello, I bought this today but they don’t arrive, is there a problem?

He found the script in his granted assets. Maybe Tebex was slow.
Just for people reading this :smile:

Just want to say that this script its 10/10 , this idea was ours and we brought this to fivehead as we was using anther jet wash script that was unoptimized and buggy , we told him what we wanted and he did not just deliver but also added a lot more features that we did not think of.

fiveheads support is also 10/10 , We have got to know him from him doing a few scripts for us and can say hands down that he delivers 100% and beyound.

Thanks for doing this script for us and we hope that other server enjoy this script.

1 Like

Thank you for your kind words :smiling_face_with_tear: :heart:
I am very happy you enjoy the script and hope it brings a lot of fun interaction to your community!

1 Like

Any word on the QB version?

Since I just finished my other project and also the next update for this script, I now have time to start with the QB version :+1:

1 Like

as soon as this drops for qb core i will grab it.

@panthermgr @smittyxfriends

The conversion is done and it’s uploaded.

Please be aware that even though I’ve thoroughly tested everything, this was my first time working with QBcore. If you come across any bugs, please let me know, and I’ll address them as soon as possible.