Car Wash
Car Wash includes automatic washes, pressure-wand hand washing, purchasable locations, and mobile wash businesses. Automatic washes offer Basic, Deluxe, and Supreme packages, with optional wax and clearcoat protection against dirt.
POPULAR LINKS
- BUY IT! Purchase Car Wash from BigDaddyScripts.com
- SERVER.LUA How to use the included server.lua with BigDaddy Scripts to set up framework integration for money functions
{:links-list}
This script has been completely rewritten so be sure to read ALL of these instructions to avoid making mistakes setting the script up.
INSTALLATION
- Open the downloaded ZIP product file and drop the folder in it somewhere in your resources folder.
- Add your product key (get it here) to the
settings.inifile - Add
start BigDaddy-CarWashto yourserver.cfg.
Start BigDaddy-Gizmo before this resource; it is a required manifest dependency even if UseGizmo=false. Start your money framework, selected targeting resource, inventory, and database provider before Car Wash as well.
DO NOT RENAME THE FOLDER.
If you change the name of the folder it will not function correctly so leave the name as it is.
{:is-danger}
FRAMEWORK AND DATABASE SETUP
Money integration is selected in server.lua. The included branches are nat, qb, esx, nd, bigdaddy, and custom. Implement your own transactions in the custom branch when using another provider. Fixed-location purchases and maintenance repairs use bridge/repair.adapters.lua, which supports QB, Qbox, and ESX player identities and jobs; its bank integration follows the framework selected in server.lua. Custom setups must also implement the adapter's confirmed bank operations. Other ownership/reporting and mobile business flows still use QBCore player and citizen-ID functions, so selecting another money framework does not replace those requirements.
-
To be able to use this resource you will be required to modify your qb-smallresources. YOU MUST REMOVE
carwash.lua, from the client folder to remedy a conflict between the scripts. -
There is a database table to be able to use the business ownership aspect. You must have a mysql database already created and connected to your server.
-
The database bridge detects
oxmysql,mysql-async, orghmattimysql, in that order. Start your selected provider first. Themysql-asyncbranch expects itsMySQL.AsyncAPI to be available to the bridge. - The current code creates
bd_carwashandbd_vehicle_detailautomatically when needed. The foreclosure bridge also addsbd_carwash.lastOwnerActivityto existing tables when missing. The database user must have permission to create and alter tables.
When updating from an earlier release, deploy the updated client DLL, fxmanifest.lua, html/index.html, bridge/qb.mysql.server.lua, and bridge/qb.inventory.server.lua together with bridge/purchase.server.lua, bridge/maintenance.server.lua, bridge/repair.server.lua, and bridge/repair.adapters.lua. Keep the foreclosure and vehicle-key bridge modules installed. Merge the settings below into your configured settings.ini, preserving your license and custom values, and restart BigDaddy-CarWash. Restart after changing repair job names so the targets use the new configuration.
- There is a locations.json file in the root. This is how the script builds the car wash locations. It comes preconfigured with several locations. There are in-game tools to add locations visually.
DO NOT edit the locations.json file directly. You WILL break the script if you change the items in that file. Use the in-game tools for managing your locations. You've been warned.
{:is-danger}
There are admin tools to add, edit, delete carwash locations. There are also tools to set up the locations as purchasable businesses that players can buy and receive revenue from. (see below for instructions on those tools)
{:is-info}
server.lua is where money is setup. Just set your framework at the top of the file for any of the included frameworks. If your framework is not included there is a custom section to add your own money integration. More info here.
Targeting
Set UseTargeting=true to use a running qb-target or ox_target resource. The code generally checks QB Target first. With UseTargeting=false, normal wash access uses proximity prompts instead. Business sale signs and owner/admin target menus still need a supported targeting resource.
Inventory
The bridge detects ox_inventory or a QBCore inventory setup. Mobile businesses require an inventory item named carwash_business, with its businessId metadata preserved. Define that item in your selected inventory before using /buymobilewash. The mobile purchase flow also checks that qb-core is started.
Mobile vehicle keys
VehicleKeys=auto detects one running supported key resource: qbx_vehiclekeys, qb-vehiclekeys, qs-vehiclekeys, wasabi_carlock, or Renewed-Vehiclekeys. If multiple providers are running, select one explicitly. For another provider, implement CustomGrant in bridge/vehiclekeys.server.lua and select custom. Use none to skip key granting. Auto mode reports a failure when no supported provider is available.
CONFIGURATION
Settings are in settings.ini.
| SETTING | DEFAULT | DESCRIPTION |
|---|---|---|
| [licensing] | ||
| key1 | none | This is where you put your product key |
| [settings] | ||
| ForeclosureDays | 30 | Days without qualifying owner activity before automatic foreclosure. Set to 0 to disable automatic foreclosure. Mobile businesses are excluded. |
| ForeclosureListingPrice | 100000 | Sale price used after automatic foreclosure only when the location has no positive stored price. Minimum effective value is 1. |
| UseMoney | true | Enables charging for normal washes and business purchases. Configure server.lua. Hose-break charges call the payment code separately. |
| ShowPrompts | true | Shows proximity wash and weather messages when using proximity access. |
| ShowBlips | true | Shows car wash map markers. |
| UseTargeting | true | Uses QB Target or OX Target for wash interactions. |
| UseGizmo | true | Uses BigDaddy-Gizmo for placement and editing. The manifest dependency remains required when false. |
| VehicleKeys | auto | Mobile vehicle key provider; see the supported values above. |
| CurrencySymbol | $ | Client interface currency symbol. server.lua has a separate currencySymbol for money notifications. |
| LargeWashBasicPrice | 350 | Basic package price for the large automatic wash. |
| LargeWashDeluxePrice | 450 | Deluxe package price for the large automatic wash. |
| LargeWashSupremePrice | 550 | Supreme package price for the large automatic wash. |
| CustomWashBasicPrice | 200 | Basic package price for custom and small automatic washes. |
| CustomWashDeluxePrice | 250 | Deluxe package price for custom and small automatic washes. |
| CustomWashSupremePrice | 300 | Supreme package price for custom and small automatic washes. |
| HandWashPrice | 100 | Price of a stationary pressure-wand wash. |
| HandwashTimeToClean | 15000 | Mobile pressure-wand cleaning duration in milliseconds. |
| MaxTimeToClean | 90 | Stationary pressure-wand cleaning duration in seconds, passed to the cleaning-progress calculation. |
| BreakCost | 2500 | Charge for breaking a wash hose. |
| MobileWashBusinessPurchasePrice | 250000 | Price to purchase a mobile wash business. |
| MechanicalFailureChance | 10 | Percentage chance of maintenance on every 23rd recorded wash at an owned location without pending maintenance. Effective range is 0–100; set to 0 to prevent new issues. |
| MechanicalJobs | mechanic,plumber,electrician | Comma-separated framework job names allowed to repair washes. Leave empty to allow eligible owner self-repair without a job service. |
| MechanicalOnDutyOnly | true | Requires repair workers to be on duty. Set false if your server does not use duty status. |
| SelfRepairMultiplier | 1.2 | Multiplier applied to the saved issue cost for owner self-repair; 1.2 adds 20%. Minimum effective value is 1. |
| SmallCostPerWash | 20 | Utilities accrued for custom and small automatic washes. |
| LargeCostPerWash | 50 | Utilities accrued for large automatic washes. |
| HandCostPerWash | 10 | Utilities accrued for stationary hand-wash usage. |
| ClosedWeatherTypes | RAIN,THUNDER,... | Weather types that close supported wash entry points. Use comma-separated names without spaces. |
| useCustomDirt | true | Enables custom vehicle dirt accumulation. |
| DirtRateOnDirtPerSecond | .05 | Dirt accumulation rate on recognized dirt surfaces. |
| DirtRateOnRoadPerSecond | 0.000025 | Dirt accumulation rate on other surfaces. |
| DirtMinSpeedMps | 1.0 | Minimum vehicle speed, in meters per second, for custom dirt accumulation. |
| WetGroundLingerSeconds | 180 | Time wet-ground behavior persists after the configured wet-weather state ends. |
| WetGroundMultiplier | 1.5 | Multiplier applied to dirt accumulation while wet-ground behavior is active. |
| AdminAcePermission | command | ACE checked at player startup for the admin flag. An empty value gives every player that flag. |
| debug | false | Enables diagnostic output. |
| [locales] | Update text language in game for notifications, labels, descriptions |
Leave the supplied DesyncKey unchanged.
For a dedicated administrator permission, set AdminAcePermission=bigdaddy.carwash.admin and grant it to your existing admin group in server.cfg:
add_ace group.admin bigdaddy.carwash.admin allow
HOW TO PLAY
Car wash map markers are shown when ShowBlips=true. For an automatic wash, drive up to its pay kiosk, interact using your targeting system or proximity prompt, and choose Basic, Deluxe, or Supreme. Stay in the vehicle while the automatic cycle runs. Access is blocked when the wash is occupied, closed by configured weather, or awaiting maintenance.
For a pressure-wand wash, leave the vehicle and interact with the wash station. Aim at the nearby vehicle and hold the attack control (normally the left mouse button) to spray. Use the character-wheel control (normally Left Alt) to switch WASH/RINSE mode. Use the cancel control (normally X), or the station's return-wand target option, to stop. Stretching or breaking the hose can incur the configured repair charge.
Deluxe and Supreme packages apply protection that reduces custom dirt accumulation. The code stores wax and clearcoat status by plate in bd_vehicle_detail, with 60-minute protection durations. The supplied money bridge's normal framework credit checks require the bank balance to be greater than the price; an exact-price balance is rejected.
Mobile wash businesses
Use /buymobilewash to open the purchase form. The default price is 250000. The business uses the carwash_business inventory item and its metadata to identify it. Use the item to access your mobile business, deploy its vehicle and wash equipment, and use the targeting options to wash vehicles or park the vehicle and go off duty. Start the configured vehicle-key provider before using this feature.
/carwashreport opens the report for your owned car washes.
ADMIN TOOLS
Car wash locations
NOTE: You must have permissions (defined in settings.ini) to use the admin tools
-
Walk to any location you would like to add a car wash.
-
Use the
carwashaddcommand and you will be shown a menu. -
Type in a UNIQUE NAME (it cannot match any name of any other wash).
Give every wash a unique name. Groupable wash stations are linked by proximity, using a 75-unit distance and connected neighboring stations; matching names with numbered suffixes are not required. Nearby stations can therefore become part of the same business group.
{:is-info}
-
After entering the name choose a car wash type from the buttons below and one will be spawned on screen but partially transparent with a gizmo beneath it. Use that gizmo to move the carwash around until it is exatly where you want it and hit ENTER. If you want to cancel hit DEL.
-
If you want to edit the position, you can use the ADMIN menu using the target on the pay machine part of the wash location or using the
carwasheditcommand. - Deleting a carwash location can also be done in the ADMIN menu or using the
carwashdeletecommand.
Creating groups
Hand-wash stations are grouped automatically when their placement is saved through the creation or editing tools. To create a multi-station business, use /carwashadd to place each hand-wash station near the others and give every station a unique name. You do not need matching names, numbered suffixes, or a separate group command.
The grouping distance is 75 units, measured between saved station positions. Only hand-wash station types are groupable; automatic drive-through washes and mobile businesses do not join these proximity groups.
Groups follow a chain of neighboring stations. For example, if A is 60 units from B and B is 60 units from C, all three form one group even if A is more than 75 units from C. To keep two businesses separate when placing them, leave more than 75 units between every station in one business and every station in the other.
The script reuses an existing group name when one is found. Otherwise, it uses the alphabetically first station name as the group name and saves that name for every connected station. The stations keep their own unique names and locations.
Grouped stations are purchased together. Admin listing edits, ownership changes, and manual foreclosure apply to the group. Adding a nearby station can join or merge existing groups, so check the business grouping after placing or editing stations. Moving a station does not guarantee that every remaining station's saved group will be split or rebuilt; the grouping check starts from the station being saved.
Setting up businesses
- Use the targeting ADMIN menu on the paymachine of a car wash and you will see a form with all the information related to this location. Fill in the price and description and click
ADD LISTINGto make this location purchasable as a business. - Using the same menu you can edit the listing, remove the listing, and even edit the location's position using the gizmo.
The admin menu hides REMOVE LISTING and DELETE CARWASH while a location is owned. To revoke ownership and put the business back up for sale, clear its Owner ID, keep a positive sale price, and save. See manual foreclosure below.
{:is-info}
- When a location is purchasable but unowned, there will be a FOR SALE sign near the pay machine of the location. The targeting on that sign has options to see and purchase the property if you choose to.
Fixed-location purchases recheck the listing price and ownership on the server before assigning the business. A grouped business is purchased for the selected listing's price, with all stations in that group transferred together. If the listing changes, reopen it before trying again. An uncertain payment or purchase result requires administrator review before another payment attempt.
REVENUE and UTILITES
Listed locations record revenue and utilities in bd_carwash. Use the OWNER MENU to collect revenue and pay utilities.
Revenue accounting records the amount actually charged for the selected automatic package or stationary hand wash. When UseMoney=false, recorded wash revenue is zero. Utilities are recorded separately using LargeCostPerWash, SmallCostPerWash, or HandCostPerWash. The legacy LargeWashPrice and CustomWashPrice settings are no longer used or required.
MAINTENANCE
Every 23rd recorded wash at an owned location without pending maintenance triggers a server-side failure check using MechanicalFailureChance. A maintenance issue closes the location until it is repaired. Issue definitions are in mechanical.json, per car wash type. The script selects an issue and saves a repair cost within its configured range when the failure occurs.
Owners can open the OWNER MENU to see the pending issues, saved costs, and available repair workers' contact information. MechanicalJobs must contain your framework's actual job names. With MechanicalOnDutyOnly=true, only on-duty workers count as available.
Eligible workers use the Repair car wash target at the wash equipment to complete repairs. Arrange payment through your existing job billing system; Car Wash does not charge the owner or pay the worker for this repair route.
When no eligible workers are online, the owner can self-repair through the OWNER MENU for the displayed total: the saved issue cost multiplied by SelfRepairMultiplier (20% extra by default). Leaving MechanicalJobs empty makes this route available without a job service. With UseMoney=false, eligible owner self-repair is free. Quotes expire after two minutes; reopen the menu to refresh. Worker availability, ownership, distance, and price are checked again when completing the repair.
Both worker repairs and owner self-repairs require being within 10 metres of the saved hand-wash position or 15 metres of an automatic wash's origin. Viewing maintenance information has no repair-distance restriction. Successful repairs clear pending maintenance, reopen the wash, and reset its owner-activity timer, including when a worker completes the repair.
Self-repair requires a confirmed bank payment before clearing maintenance. A confirmed payment is refunded if the database update is established to have failed. If the payment or database result is uncertain, contact an administrator before paying again.
AUTOMATIC FORECLOSURE
Automatic foreclosure is enabled by default with ForeclosureDays=30. An owned fixed location becomes eligible after that many days without qualifying owner activity, even if it has no maintenance issue. Set ForeclosureDays=0 to disable this process. Mobile businesses (type 3) are excluded.
The inactivity timer resets when the owner collects positive revenue, completes required maintenance, or acquires or changes ownership through the ownership-saving flows. Collecting zero revenue, opening menus, paying utilities, and customer use do not reset it. Activity on any station protects the stations sharing its owner and business group.
Checks run after database detection at resource startup, then every 24 hours, including when no players are connected. A location is reclaimed at an eligible check rather than at the exact moment its timer expires. The bd_carwash table must exist for the check to run successfully.
Activity is stored in the database in UTC, so restarts do not reset the timer. Existing owners without a recorded activity timestamp receive a full grace period at the first enabled check. With automatic foreclosure disabled, the sweep leaves those untracked timestamps untouched.
Automatic foreclosure clears the owner ID, stored owner name, and activity timestamp. It preserves a positive sale price, or uses ForeclosureListingPrice if no positive price exists, and refreshes client sale signs. Revenue, utilities, maintenance requirements, and wash history remain. No refund is issued to the former owner.
MANUAL FORECLOSURE
Administrators can manually revoke ownership through the location's ADMIN menu. Clear the Owner field, set or retain a sale price greater than zero, and click SAVE. The location becomes unowned and available to purchase, and its for-sale sign is refreshed. For grouped stations, the change applies to the whole group.
This manual action updates ownership, price, and description. It does not clear maintenance issues, revenue, utilities, wash counts, or the stored owner name, and it does not refund the former owner. Administrators can use it independently of the automatic foreclosure schedule, including when ForeclosureDays=0.
COMMANDS
| COMMAND | ARGUMENTS | DESCRIPTION |
|---|---|---|
/carwashadd |
none | Admin: opens the wash creation menu. |
/carwashedit |
none | Admin: edits the nearest supported wash within 25 units. |
/carwashdelete |
none | Admin: requests confirmation to delete the nearest supported wash within 25 units. |
/buymobilewash |
none | Opens the mobile wash business purchase form. |
/carwashreport |
none | Opens your owned car wash report. |