Lyre Scripts
  • Welcome
  • Create your own bridge
  • Paid resources
    • Illegal Missions
      • Installation
      • Configuration
        • Main Script
        • [FREE] Murderer DLC
        • [FREE] Money Truck DLC
        • [FREE] Go Fast DLC
        • [FREE] ATM Robbery DLC
        • [FREE] Car Theft DLC
    • Car Rental
      • Installation
      • Configuration
    • Car Wash
      • Installation
      • Configuration
    • ⛽Lyre advanced fuel
      • Installation
      • Configuration
  • free resources
    • 📄Lyre Text UI
      • Installation
      • Configuration
      • How to use it
Powered by GitBook
On this page
  1. Paid resources
  2. Car Wash

Configuration

Default configuration

This is the default configuration of the script. Take note that there is others configurations in the bridge files : Configuration for your notification resource, keys system, fuel system, and more...

Config = {}

-- [string] → The locale you want to use. If the locale does not exist, the script will use the default locale.
Config.locale = GetConvar(GetCurrentResourceName() .. ":locale", "en")

-- [string] → The bridge you want to use. You can put a valid bridge or put "auto_detect" to let the script choose the best bridge for you.
Config.bridge = "auto_detect"

-- [boolean] → If you want the script to check for updates. If the script is not up to date, it will print a message in the console.
Config.checkForUpdates = true

-- [string] → The system you want to use to interact with the locations. You can put "marker" or "target"
Config.interactSystem = GetConvar("lyre_carwash:interact", "marker")

-- [boolean] → If you want the background to be blurred when the menu is opened.
Config.backgroundBlur = false

-- [table] → The hud functions, use them if you want to show and hide your hud when the menu is opened.
Config.hud = {
	show = function() end,
	hide = function() end,
}

-- [table] → All vehicles classes here will not be affected by the script dirt level system.
Config.blacklistedClasses = {
	[8] = true, -- Motorcycles
	[10] = true, -- Industrial
	[11] = true, -- Utility
	[13] = true, -- Cycles
	[14] = true, -- Boats
	[15] = true, -- Helicopters
	[16] = true, -- Planes
	[17] = true, -- Service
	[19] = true, -- Military
	[20] = true, -- Commercial
	[21] = true, -- Trains
	[22] = true, -- Open Wheel
}

-- [number] → The time in milliseconds between each dirt level calculation.
Config.dirtTick = 60 * 1000

-- [number] → The amount of dirt level to add to the vehicle each tick.
Config.dirtTickAmount = 1

-- [table] → The multiplier of the dirtTickAmount depending on the surface material.
Config.surfaceMultiplier = {
	[1] = 1, -- Concrete
	[4] = 1, -- Road
	[5] = 1, -- Metal
	[6] = 2, -- Sandy roadside
	[9] = 2, -- Sandstone
	[10] = 1, -- Rock
	[11] = 1, -- Rock
	[13] = 1.5, -- Cobble
	[16] = 2, -- Limestoneesque sand
	[17] = 3, -- Rocky dry dirt
	[18] = 2.5, -- Dry sand
	[19] = 2, -- Road sand
	[20] = 2, -- Grainy Sand
	[21] = 1.5, -- Gravely sand
	[22] = 3, -- Wet hard sand
	[23] = 1.25, -- Gravel road
	[24] = 3, -- Wet sand
	[31] = 1.75, -- Gravely dirt/path
	[32] = 2, -- Gravely dirt
	[35] = 2, -- Tuff Sand
	[36] = 3, -- Dirt
	[37] = 2.5, -- Deep road sand
	[38] = 2, -- Rocky sand
	[40] = 2, -- Moist dirt path
	[41] = 3.5, -- Swamp grass
	[42] = 3.5, -- Swamp sand
	[43] = 2, -- Hard Sand
	[44] = 2, -- Dirt/Sand
	[46] = 2.5, -- Hard grass
	[47] = 2, -- Grass
	[48] = 3.5, -- Tall grass
	[49] = 3, -- Farmland
	[50] = 3, -- Podzol
	[51] = 3, -- Podzol
	[52] = 4, -- Dry podzol
	[64] = 1, -- Metal
	[125] = 1, -- Drain concrete
}

-- [boolean] → If you want the script to clean the dirt level of the blacklisted classes vehicles.
Config.forceBlacklistedToBeCleaned = true

-- [table] → The interval in milliseconds between each save of the dirt level and business datas to the database.
Config.databaseSavingInterval = 1000 * 5 * 60

-- [boolean] → If you want to show in the server console the logs of the script when the automatic saving is running.
Config.consoleShowSavingLogs = true

-- [string] → The model of the ped that will spawn in the carwash stations.
Config.managePedModel = "s_m_m_autoshop_02"

-- [table] → The default values of the stocks of the stations.
-- It's only the default values, if you have already started the script, the script has already saved the stocks in the database
-- and you have to edit stocks in the database then restart the script to apply the new values.
Config.defaultStocks = {
	water = { current = 500, max = 500 },
	soap = { current = 100, max = 100 },
	wax = { current = 100, max = 100 },
}

-- [table] → The default values of the upgrades of the stations.
-- It's only the default values, if you have already started the script, the script has already saved the upgrades in the database
-- and you have to edit upgrades in the database then restart the script to apply the new values.
Config.defaultUpgrades = {
	tank = 0,
	dispenser = 0,
	dryer = 0,
	spinner = 0,
}

-- [table] → The default values of the offers of the stations.
-- It's only the default values, if you have already started the script, the script has already saved the offers in the database
-- and you have to edit offers in the database then restart the script to apply the new values.
Config.defaultPrograms = {
	[1] = {
		name = "Deluxe Washing",
		price = 200,
		values = {
			water1 = 10,
			soap = 7,
			spinner = 1,
			water2 = 5,
			dry = 2,
			wax = 4,
		},
	},
	[2] = {
		name = "Cheap Washing",
		price = 80,
		values = {
			water1 = 10,
			soap = 2,
			spinner = 1,
			water2 = 10,
			dry = 1,
			wax = 0,
		},
	},
}

-- [string] → The name of the account used to buy and sell the carwash stations.
-- Accepted values are : "bank", "money" or "black_money"
Config.buyOrSellAccount = "bank"

-- [string] → The name of the account used to withdraw and deposit money from the carwash stations.
-- Accepted values are : "bank", "money" or "black_money"
Config.withdrawOrDepositAccount = "bank"

-- [table] → Change the blip style, blip label can be found in locale files
Config.blips = {
	["opened"] = {
		sprite = 100,
		colour = 3,
		scale = 1.0,
		isShortRange = true,
	},
	["closed"] = {
		sprite = 100,
		colour = 1,
		scale = 1.0,
		isShortRange = true,
	},
}

-- [table] → The locations of the carwash, you can add more locations if you want.
-- The script will automatically create a prop so you have to put coords of a large flat surface.
--
-- Some help informations
-- AIIncomeCustomersMultiplier : number between 0 and 1, the higher the number, the more customers will come to the station.
-- For example, 1 is a good value for stations in the city, 0.5 is a good value for stations in the countryside.
-- manageMarkerStyle and usageMarkerStyle : the style of the markers, you can find the styles in the Config.markerStyles table.
-- vehicleSpawnPoint : the point where the vehicle will spawn when the station owner will start a refill mission.
-- createProp : if you want the script to create a prop at this location, set it to true. If the place of the station you want to use already have a MLO, set it to false.
Config.locations = {
	["station_1"] = {
		blipCoords = vec3(11.691478729248, -1714.2069091797, 29.038167953491),
		locations = {
			{ coords = vec4(11.691478729248, -1714.2069091797, 29.038167953491, 113.0248336792), createProp = true },
		},
		defaultBuyPrice = 50000,
		manageCoords = vec4(13.820019721985, -1710.9135742188, 29.294382095337, 295.20526123047),
		manageMarkerStyle = "management",
		usageMarkerStyle = "usage",
		vehicleSpawnPoint = vec4(14.863925933838, -1717.8842773438, 29.30295753479, 114.58106231689),
		AIIncomeCustomersMultiplier = 1,
	},
	["station_2"] = {
		blipCoords = vec3(-571.56451416016, -1151.3620605469, 21.875645446777),
		locations = {
			{ coords = vec4(-571.56451416016, -1151.3620605469, 21.875645446777, 349.55950927734), createProp = true },
		},
		defaultBuyPrice = 50000,
		manageCoords = vec4(-569.99505615234, -1154.9536132812, 22.17823600769, 210.48753356934),
		manageMarkerStyle = "management",
		usageMarkerStyle = "usage",
		vehicleSpawnPoint = vec4(-576.12725830078, -1150.7652587891, 22.178241729736, 352.3864440918),
		AIIncomeCustomersMultiplier = 1,
	},
	["station_3"] = {
		blipCoords = vec3(616.62866210938, 84.615257263184, 91.491569519043),
		locations = {
			{ coords = vec4(616.62866210938, 84.615257263184, 91.491569519043, 339.63137817383), createProp = true },
		},
		defaultBuyPrice = 50000,
		manageCoords = vec4(617.58612060547, 80.665748596191, 91.250961303711, 157.55334472656),
		manageMarkerStyle = "management",
		usageMarkerStyle = "usage",
		vehicleSpawnPoint = vec4(611.59246826172, 86.016944885254, 91.978424072266, 334.56845092773),
		AIIncomeCustomersMultiplier = 1,
	},
	["station_4"] = {
		blipCoords = vec3(-1722.0848388672, -732.88665771484, 10.07436504364),
		locations = {
			{ coords = vec4(-1722.0848388672, -732.88665771484, 10.07436504364, 141.46844482422), createProp = true },
			{ coords = vec4(-1726.1083056641, -729.36242675781, 10.07436504364, 141.46844482422), createProp = true },
		},
		defaultBuyPrice = 75000,
		manageCoords = vec4(-1722.0394287109, -728.65515136719, 10.245394706726, 324.76794433594),
		manageMarkerStyle = "management",
		usageMarkerStyle = "usage",
		vehicleSpawnPoint = vec4(-1734.4908447266, -726.55639648438, 10.426120758057, 318.90121459961),
		AIIncomeCustomersMultiplier = 1,
	},
	["station_5"] = {
		blipCoords = vec3(1687.8516845703, 3678.5625, 34.619644165039),
		locations = {
			{ coords = vec4(1687.8516845703, 3678.5625, 34.419644165039, 211.85334777832), createProp = true },
		},
		defaultBuyPrice = 35000,
		manageCoords = vec4(1683.9260253906, 3680.1159667969, 34.563934326172, 35.70539855957),
		manageMarkerStyle = "management",
		usageMarkerStyle = "usage",
		vehicleSpawnPoint = vec4(1681.5877685547, 3675.8151855469, 34.637748718262, 211.33851623535),
		AIIncomeCustomersMultiplier = 0.5,
	},
	["station_6"] = {
		blipCoords = vec3(203.65420532227, 6603.4365234375, 31.631801605225),
		locations = {
			{ coords = vec4(203.65420532227, 6603.4365234375, 31.431801605225, 5.2875380516052), createProp = true },
		},
		defaultBuyPrice = 35000,
		manageCoords = vec4(206.46221923828, 6600.3706054688, 31.647720336914, 188.47428894043),
		manageMarkerStyle = "management",
		usageMarkerStyle = "usage",
		vehicleSpawnPoint = vec4(198.26509094238, 6603.4926757812, 31.736623764038, 7.9975109100342),
		AIIncomeCustomersMultiplier = 0.5,
	},
}

-- [table] → This is the prices to restock the stocks of the carwash stations. You can edit the prices here.
Config.buyPrices = {
	water = 2,
	soap = 10,
	wax = 15,
}

-- [table] → This is the amount of percentage of dirt removed for each washing steps. You can edit the values here.
Config.dirtRemoverEfficiency = {
	water = 1,
	soap = 10,
	spinner = 10,
}

-- [table] → This the amount of days before the vehicle get dirty again after the washing for each washing steps. You can edit the values here.
Config.timeoutEfficiency = {
	dryer = 1,
	wax = 2,
}

-- [table] → The fees that an owner of a station will pay if he want instant stock delivery
Config.expressFeesPercentage = 20

-- [table] → The ranges of the values of the offers. You can edit the min, max and default values here.
-- The default values are the values that will be used if the player does not change the values in the menu.
-- There are not necessary the same values as in the default offers.
Config.ranges = {
	water1_range = {
		min = 10,
		max = 50,
		default = 10,
	},
	soap_range = {
		min = 0,
		max = 10,
		default = 2,
	},
	spinner_range = {
		min = 0,
		max = 10,
		default = 1,
	},
	water2_range = {
		min = 5,
		max = 50,
		default = 10,
	},
	dry_range = {
		min = 0,
		max = 10,
		default = 1,
	},
	wax_range = {
		min = 0,
		max = 10,
		default = 2,
	},
}

-- [table] → The upgrades of the carwash stations. You can edit the prices and the values of the upgrades here.
Config.upgrades = {
	dispenser = {
		[0] = {
			name = "Level #0",
			price = 0,
			speed = 1.5,
		},
		[1] = {
			name = "Level #1",
			price = 2500,
			speed = 1.25,
		},
		[2] = {
			name = "Level #2",
			price = 5000,
			speed = 1.0,
		},
		[3] = {
			name = "Level #3",
			price = 10000,
			speed = 0.75,
		},
		[4] = {
			name = "Level #4",
			price = 20000,
			speed = 0.50,
		},
		[5] = {
			name = "Level #5",
			price = 50000,
			speed = 0.25,
		},
	},
	dryer = {
		[0] = {
			name = "Level #0",
			price = 0,
			speed = 10,
		},
		[1] = {
			name = "Level #1",
			price = 2500,
			speed = 9,
		},
		[2] = {
			name = "Level #2",
			price = 5000,
			speed = 8,
		},
		[3] = {
			name = "Level #3",
			price = 10000,
			speed = 7,
		},
		[4] = {
			name = "Level #4",
			price = 20000,
			speed = 6,
		},
		[5] = {
			name = "Level #5",
			price = 50000,
			speed = 5,
		},
	},
	spinner = {
		[0] = {
			name = "Level #0",
			price = 0,
			speed = 10,
		},
		[1] = {
			name = "Level #1",
			price = 2500,
			speed = 9,
		},
		[2] = {
			name = "Level #2",
			price = 5000,
			speed = 8,
		},
		[3] = {
			name = "Level #3",
			price = 10000,
			speed = 7,
		},
		[4] = {
			name = "Level #4",
			price = 20000,
			speed = 6,
		},
		[5] = {
			name = "Level #5",
			price = 50000,
			speed = 5,
		},
	},
	tank = {
		[0] = {
			name = "Level #0",
			price = 0,
			capacityMultiplier = 1,
		},
		[1] = {
			name = "Level #1",
			price = 2500,
			capacityMultiplier = 2,
		},
		[2] = {
			name = "Level #2",
			price = 5000,
			capacityMultiplier = 5,
		},
		[3] = {
			name = "Level #3",
			price = 10000,
			capacityMultiplier = 10,
		},
		[4] = {
			name = "Level #4",
			price = 20000,
			capacityMultiplier = 20,
		},
		[5] = {
			name = "Level #5",
			price = 50000,
			capacityMultiplier = 50,
		},
	},
}

-- [string] → The action that will be used when clicking the express refill button in the menu.
-- Accepted values are : "default", "custom" or "none"
-- "default" will use the default function to refill the stocks of the carwash stations.
-- "custom" will use the custom function to refill the stocks of the carwash stations. You have to write your own code in the customExpressRefillFunction bridge function.
-- "none" will just disable the button in the menu.
Config.expressRefillAction = "default"

-- [string] → The action that will be used when clicking the refill button in the menu.
-- Accepted values are : "default", "custom" or "none"
-- "default" will use the default function to refill the stocks of the carwash stations.
-- "custom" will use the custom function to refill the stocks of the carwash stations. You have to write your own code in the customRefillFunction bridge function.
-- "none" will just disable the button in the menu.
Config.refillAction = "default"

-- [table] → The name of the vehicle that will be used in the default refill mission.
Config.defaultRefillMissionVehicle = { type = "automobile", name = "mule3" }

-- [vector4] → The location where station owners have to go to get the products for the refill mission.
Config.defaultRefillMissionGetProductsLocation = vec4(144.4454498291, -3006.0520019531, 6.030921459198, 2.8421258926392)

-- [boolean] → If you want the script to close the station when there is no stock in the station.
-- If you set this to false, the station will stay open but the players will not be able to use it.
Config.closeStationWhenNoStock = true

-- [number] → When creating a new offer, the owner can choose the price for the offer. This configuration allows you to set a minimum
-- percentage of the break-even price.
-- For example : If the break-even price of the offer is $100 and Config.minimumBreakevenPercentage is set to 100, the owner will have to set a price of at least $100, at least equal to the breake-even price.
-- Other example : If the break-even price of the offer is $150 and Config.minimumBreakevenPercentage is set to 50, the owner will have to set a price of at least $75, lower than the breake-even price.
-- This configuration is very important for your server economy and can prevent all players from setting the price of the offers to a very low price and make the carwash stations unprofitable.
-- The recommended value is between 100, so the owners will not be able to create non profitable offers.
Config.minimumBreakevenPercentage = 100

-- [boolean] → If you want the script to network the washing animations.
-- true : more realistic, all players will see the washing animation, but it can cause problem with some anticheats
-- false : less realistic, only the player who is washing the vehicle will see the animation, but it will not cause any problem with anticheats
-- The recommended value is true, but if you have problems with anticheats, you can set it to false.
Config.networkWashingAnimations = true

-- [string] → The name of the model of the NPC that will be used in the default refill mission
Config.defaultRefillNpcModel = "s_m_m_autoshop_02"

-- [boolean] → If you want the script to use the AI income generation system.
-- If you set this to false, the script will not generate any income for the stations.
-- This option could be useful if your server is a small community because in a small community there are not enough players to generate income for the stations.
Config.AIIncomeGeneration = true

-- [number] → The time in milliseconds between each AI income generation cycle.
-- The recommended value is between 30 minutes and 1 hour.
Config.AIIncomeGenerationInterval = 1000 * 30 * 60

-- [number] → The number of customers that will be generated for each AI income generation cycle.
-- The recommended value is between 10 and 50.
Config.AIIncomeCustomersPerCycle = 10

-- [number] → The percentage of rich customers that will be generated for each AI income generation cycle.
-- The recommended value is 40, so 40% of the customers will considered as rich customers.
-- The rich customers not care about the price of the washing and will pay the full price of the offer.
-- The poor customers will prefer to pay a lower price and will search for the cheapest offer.
Config.AIIncomeCustomersRichPercentage = 40

-- [boolean] → If you want the script block npc to spawn in zone used by the carwash stations.
-- Only disable this if you have already a system to block NPCs.
Config.antiNPCSpawn = true

-- [table] → The styles for the markers, only used if Config.interactSystem is set to "marker"
Config.markerStyles = {
	["management"] = {
		["far"] = {
			{
				type = 6,
				size = vec3(1.0, 1.0, 1.0),
				rotation = vec3(270.0, 0.0, 0.0),
				offset = vec3(0.0, 0.0, -1.0),
				bobUpAndDown = false,
				faceCamera = false,
				rotate = false,
				color = { r = 200, g = 25, b = 25, a = 150 },
			},
		},
		["near"] = {
			{
				type = 6,
				size = vec3(1.0, 1.0, 1.0),
				rotation = vec3(270.0, 0.0, 0.0),
				offset = vec3(0.0, 0.0, -1.0),
				bobUpAndDown = false,
				faceCamera = false,
				rotate = false,
				color = { r = 200, g = 100, b = 100, a = 150 },
			},
		},
	},
	["usage"] = {
		["far"] = {
			{
				type = 1,
				size = vec3(2.0, 2.0, 1.0),
				rotation = vec3(0.0, 0.0, 0.0),
				offset = vec3(0.0, 0.0, -1.0),
				bobUpAndDown = false,
				faceCamera = false,
				rotate = false,
				color = { r = 25, g = 25, b = 200, a = 150 },
			},
		},
		["near"] = {
			{
				type = 1,
				size = vec3(2.0, 2.0, 1.0),
				rotation = vec3(0.0, 0.0, 0.0),
				offset = vec3(0.0, 0.0, -1.0),
				bobUpAndDown = false,
				faceCamera = false,
				rotate = false,
				color = { r = 100, g = 100, b = 200, a = 150 },
			},
		},
	},
}
PreviousInstallationNextLyre advanced fuel

Last updated 2 months ago