Modifications
Remember that this resource has verified DMCA protection, and its illegal use or distribution could imply a claim for protection of Title 17 of Chapter 512 (c) (3) of the Digital Millennium Copyright Act


Basically the idea is to add the default value of the Job column.
- If it is
NULL
, we will place false in theConfig.JobColumn
- In the case of simply having a blank space, we will change the
Config.JobColumn
to""
(two quotes) - In case we have a text such as 'civ', we will add this in the heat of
Config.JobColumn
We will check the job column inside
owned_vehicles
, to see the default value of this columnIn order for us to store and remove vehicles, we must first follow this step strictly, otherwise we will never be able to see the vehicles in our garage
Please, review this step yes or yes, since it is important for the operation of the resource

Basic Job garages are for ESX jobs that depend on the job column, such as esx_policejob or esx_ambulancejob among others
When buying a vehicle in these scripts we can save and remove jobs vehicles within the garages created in config_job.lua called Config.GaragesJobOwnedVehicles
If you don't have the necessary skills or don't know how this system works, simply remove the garages of this type and go directly to
6. RENTAL GARAGES
The vehicles mentioned in this step can only be taken out of the garage in this configuration
You will be able to save it in any garage but you will only be able to see it and remove it from the garages below


Rental garages is the most classic system of garages for miners, lumberjack among others
Here workers can rent a vehicle for a configurable amount and return the vehicle to get the money back or a percentage of it
To configure this system we can do it from
config_job.lua
in Config.GaragesJob
This system is the most recommended, since it is easy to apply and does not bring previous installations or modifications


Quasar Garages has a super advanced vehicle deformation system, which will be stored hit by hit in your database
If you don't have basic Lua skills I recommend you not to use this function, as it requires some file modifications

To disable this feature we can simply disable Config.Deformation inside the config.lua

In each resource that repairs our vehicle, we must add this event next to the entity that we will repair, in this case vehicle, but in your scripts it may vary
1
TriggerServerEvent("qs-garages:fix_sv", NetworkGetNetworkIdFromEntity(vehicle))

This step is not required, but if you use vehicleshops with RGB systems, you will need to adapt your es_extended to work with their color save
To do this, we will go to es_extended/client/functions.lua and modify the two events below
../client/functions.lua
1
ESX.Game.GetVehicleProperties = function(vehicle)
2
if DoesEntityExist(vehicle) then
3
local color1, color2 = GetVehicleColours(vehicle)
4
5
local color1Custom = {}
6
color1Custom[1], color1Custom[2], color1Custom[3] = GetVehicleCustomPrimaryColour(vehicle)
7
8
local color2Custom = {}
9
color2Custom[1], color2Custom[2], color2Custom[3] = GetVehicleCustomSecondaryColour(vehicle)
10
11
local pearlescentColor, wheelColor = GetVehicleExtraColours(vehicle)
12
13
local extras = {}
14
for id = 0, 25 do
15
if (DoesExtraExist(vehicle, id)) then
16
extras[tostring(id)] = IsVehicleExtraTurnedOn(vehicle, id)
17
end
18
end
19
20
local neonColor = {}
21
neonColor[1], neonColor[2], neonColor[3] = GetVehicleNeonLightsColour(vehicle)
22
23
local tyreSmokeColor = {}
24
tyreSmokeColor[1], tyreSmokeColor[2], tyreSmokeColor[3] = GetVehicleTyreSmokeColor(vehicle)
25
26
return {
27
model = GetEntityModel(vehicle),
28
29
plate = ESX.Math.Trim(GetVehicleNumberPlateText(vehicle)),
30
plateIndex = GetVehicleNumberPlateTextIndex(vehicle),
31
32
bodyHealth = ESX.Math.Round(GetVehicleBodyHealth(vehicle), 1),
33
engineHealth = ESX.Math.Round(GetVehicleEngineHealth(vehicle), 1),
34
35
fuelLevel = ESX.Math.Round(GetVehicleFuelLevel(vehicle), 1),
36
dirtLevel = ESX.Math.Round(GetVehicleDirtLevel(vehicle), 1),
37
38
color1 = color1,
39
color1Custom = color1Custom,
40
41
color2 = color2,
42
color2Custom = color2Custom,
43
44
pearlescentColor = pearlescentColor,
45
46
color1Type = GetVehicleModColor_1(vehicle),
47
color2Type = GetVehicleModColor_2(vehicle),
48
49
wheelColor = wheelColor,
50
wheels = GetVehicleWheelType(vehicle),
51
windowTint = GetVehicleWindowTint(vehicle),
52
53
extras = extras,
54
55
neonEnabled = {
56
IsVehicleNeonLightEnabled(vehicle, 0),
57
IsVehicleNeonLightEnabled(vehicle, 1),
58
IsVehicleNeonLightEnabled(vehicle, 2),
59
IsVehicleNeonLightEnabled(vehicle, 3)
60
},
61
62
neonColor = neonColor,
63
tyreSmokeColor = tyreSmokeColor,
64
65
dashboardColor = GetVehicleDashboardColour(vehicle),
66
interiorColor = GetVehicleInteriorColour(vehicle),
67
68
modSpoilers = GetVehicleMod(vehicle, 0),
69
modFrontBumper = GetVehicleMod(vehicle, 1),
70
modRearBumper = GetVehicleMod(vehicle, 2),
71
modSideSkirt = GetVehicleMod(vehicle, 3),
72
modExhaust = GetVehicleMod(vehicle, 4),
73
modFrame = GetVehicleMod(vehicle, 5),
74
modGrille = GetVehicleMod(vehicle, 6),
75
modHood = GetVehicleMod(vehicle, 7),
76
modFender = GetVehicleMod(vehicle, 8),
77
modRightFender = GetVehicleMod(vehicle, 9),
78
modRoof = GetVehicleMod(vehicle, 10),
79
80
modEngine = GetVehicleMod(vehicle, 11),
81
modBrakes = GetVehicleMod(vehicle, 12),
82
modTransmission = GetVehicleMod(vehicle, 13),
83
modHorns = GetVehicleMod(vehicle, 14),
84
modSuspension = GetVehicleMod(vehicle, 15),
85
modArmor = GetVehicleMod(vehicle, 16),
86
87
modTurbo = IsToggleModOn(vehicle, 18),
88
modSmokeEnabled = IsToggleModOn(vehicle, 20),
89
modXenon = GetVehicleXenonLightsColour(vehicle),
90
91
modFrontWheels = GetVehicleMod(vehicle, 23),
92
modBackWheels = GetVehicleMod(vehicle, 24),
93
94
modPlateHolder = GetVehicleMod(vehicle, 25),
95
modVanityPlate = GetVehicleMod(vehicle, 26),
96
modTrimA = GetVehicleMod(vehicle, 27),
97
modOrnaments = GetVehicleMod(vehicle, 28),
98
modDashboard = GetVehicleMod(vehicle, 29),
99
modDial = GetVehicleMod(vehicle, 30),
100
modDoorSpeaker = GetVehicleMod(vehicle, 31),
101
modSeats = GetVehicleMod(vehicle, 32),
102
modSteeringWheel = GetVehicleMod(vehicle, 33),
103
modShifterLeavers = GetVehicleMod(vehicle, 34),
104
modAPlate = GetVehicleMod(vehicle, 35),
105
modSpeakers = GetVehicleMod(vehicle, 36),
106
modTrunk = GetVehicleMod(vehicle, 37),
107
modHydrolic = GetVehicleMod(vehicle, 38),
108
modEngineBlock = GetVehicleMod(vehicle, 39),
109
modAirFilter = GetVehicleMod(vehicle, 40),
110
modStruts = GetVehicleMod(vehicle, 41),
111
modArchCover = GetVehicleMod(vehicle, 42),
112
modAerials = GetVehicleMod(vehicle, 43),
113
modTrimB = GetVehicleMod(vehicle, 44),
114
modTank = GetVehicleMod(vehicle, 45),
115
modWindows = GetVehicleMod(vehicle, 46),
116
modLivery = GetVehicleMod(vehicle, 48),
117
livery = GetVehicleLivery(vehicle)
118
}
119
else
120
return
121
end
122
end
../client/functions.lua
1
ESX.Game.SetVehicleProperties = function(vehicle, props)
2
if (props == nil or vehicle == nil or not DoesEntityExist(vehicle)) then return end
3
4
SetVehicleModKit(vehicle, 0)
5
SetVehicleAutoRepairDisabled(vehicle, false)
6
7
if (props.plate) then
8
SetVehicleNumberPlateText(vehicle, props.plate)
9
end
10
11
if (props.plateIndex) then
12
SetVehicleNumberPlateTextIndex(vehicle, props.plateIndex)
13
end
14
15
if (props.bodyHealth) then
16
SetVehicleBodyHealth(vehicle, props.bodyHealth + 0.0)
17
end
18
19
if (props.engineHealth) then
20
SetVehicleEngineHealth(vehicle, props.engineHealth + 0.0)
21
end
22
23
if (props.fuelLevel) then
24
SetVehicleFuelLevel(vehicle, props.fuelLevel + 0.0)
25
end
26
27
if (props.dirtLevel) then
28
SetVehicleDirtLevel(vehicle, props.dirtLevel + 0.0)
29
end
30
31
if (props.color1) then
32
ClearVehicleCustomPrimaryColour(vehicle)
33
34
local color1, color2 = GetVehicleColours(vehicle)
35
SetVehicleColours(vehicle, props.color1, color2)
36
end
37
38
if (props.color1Custom) then
39
SetVehicleCustomPrimaryColour(vehicle, props.color1Custom[1], props.color1Custom[2], props.color1Custom[3])
40
end
41
42
if (props.color2) then
43
ClearVehicleCustomSecondaryColour(vehicle)
44
45
local color1, color2 = GetVehicleColours(vehicle)
46
SetVehicleColours(vehicle, color1, props.color2)
47
end
48
49
if (props.color2Custom) then
50
SetVehicleCustomSecondaryColour(vehicle, props.color2Custom[1], props.color2Custom[2], props.color2Custom[3])
51
end
52
53
if (props.color1Type) then
54
SetVehicleModColor_1(vehicle, props.color1Type)
55
end
56
57
if (props.color2Type) then
58
SetVehicleModColor_2(vehicle, props.color2Type)
59
end
60
61
if (props.pearlescentColor) then
62
local pearlescentColor, wheelColor = GetVehicleExtraColours(vehicle)
63
SetVehicleExtraColours(vehicle, props.pearlescentColor, wheelColor)
64
end
65
66
if (props.wheelColor) then
67
local pearlescentColor, wheelColor = GetVehicleExtraColours(vehicle)
68
SetVehicleExtraColours(vehicle, pearlescentColor, props.wheelColor)
69
end
70
71
if (props.wheels) then
72
SetVehicleWheelType(vehicle, props.wheels)
73
end
74
75
if (props.windowTint) then
76
SetVehicleWindowTint(vehicle, props.windowTint)
77
end
78
79
if (props.extras) then
80
for id = 0, 25 do
81
if (DoesExtraExist(vehicle, id)) then
82
SetVehicleExtra(vehicle, id, props.extras[tostring(id)] and 0 or 1)
83
end
84
end
85
end
86
87
if (props.neonEnabled) then
88
SetVehicleNeonLightEnabled(vehicle, 0, props.neonEnabled[1] == true or props.neonEnabled[1] == 1)
89
SetVehicleNeonLightEnabled(vehicle, 1, props.neonEnabled[2] == true or props.neonEnabled[2] == 1)
90
SetVehicleNeonLightEnabled(vehicle, 2, props.neonEnabled[3] == true or props.neonEnabled[3] == 1)
91
SetVehicleNeonLightEnabled(vehicle, 3, props.neonEnabled[4] == true or props.neonEnabled[4] == 1)
92
end
93
94
if (props.neonColor) then
95
SetVehicleNeonLightsColour(vehicle, props.neonColor[1], props.neonColor[2], props.neonColor[3])
96
end
97
98
if (props.modSmokeEnabled) then
99
ToggleVehicleMod(vehicle, 20, true)
100
end
101
102
if (props.tyreSmokeColor) then
103
SetVehicleTyreSmokeColor(vehicle, props.tyreSmokeColor[1], props.tyreSmokeColor[2], props.tyreSmokeColor[3])
104
end
105
106
if (props.dashboardColor) then
107
SetVehicleDashboardColour(vehicle, props.dashboardColor)
108
end
109
110
if (props.interiorColor) then
111
SetVehicleInteriorColour(vehicle, props.interiorColor)
112
end
113
114
if (props.modSpoilers) then
115
SetVehicleMod(vehicle, 0, props.modSpoilers, false)
116
end
117
118
if (props.modFrontBumper) then
119
SetVehicleMod(vehicle, 1, props.modFrontBumper, false)
120
end
121
122
if (props.modRearBumper) then
123
SetVehicleMod(vehicle, 2, props.modRearBumper, false)
124
end
125
126
if (props.modSideSkirt) then
127
SetVehicleMod(vehicle, 3, props.modSideSkirt, false)
128
end
129
130
if (props.modExhaust) then
131
SetVehicleMod(vehicle, 4, props.modExhaust, false)
132
end
133
134
if (props.modFrame) then
135
SetVehicleMod(vehicle, 5, props.modFrame, false)
136
end
137
138
if (props.modGrille) then
139
SetVehicleMod(vehicle, 6, props.modGrille, false)
140
end
141
142
if (props.modHood) then
143
SetVehicleMod(vehicle, 7, props.modHood, false)
144
end
145
146
if (props.modFender) then
147
SetVehicleMod(vehicle, 8, props.modFender, false)
148
end
149
150
if (props.modRightFender) then
151
SetVehicleMod(vehicle, 9, props.modRightFender, false)
152
end
153
154
if (props.modRoof) then
155
SetVehicleMod(vehicle, 10, props.modRoof, false)
156
end
157
158
if (props.modEngine) then
159
SetVehicleMod(vehicle, 11, props.modEngine, false)
160
end
161
162
if (props.modBrakes) then
163
SetVehicleMod(vehicle, 12, props.modBrakes, false)
164
end
165
166
if (props.modTransmission) then
167
SetVehicleMod(vehicle, 13, props.modTransmission, false)
168
end
169
170
if (props.modHorns) then
171
SetVehicleMod(vehicle, 14, props.modHorns, false)
172
end
173
174
if (props.modSuspension) then
175
SetVehicleMod(vehicle, 15, props.modSuspension, false)
176
end
177
178
if (props.modArmor) then
179
SetVehicleMod(vehicle, 16, props.modArmor, false)
180
end
181
182
if (props.modTurbo) then
183
ToggleVehicleMod(vehicle, 18, props.modTurbo)
184
end
185
186
if (props.modXenon) then
187
ToggleVehicleMod(vehicle, 22, true)
188
SetVehicleXenonLightsColour(vehicle, props.modXenon)
189
end
190
191
if (props.modFrontWheels) then
192
SetVehicleMod(vehicle, 23, props.modFrontWheels, false)
193
end
194
195
if (props.modBackWheels) then
196
SetVehicleMod(vehicle, 24, props.modBackWheels, false)
197
end
198
199
if (props.modPlateHolder) then
200
SetVehicleMod(vehicle, 25, props.modPlateHolder, false)
201
end
202
203
if (props.modVanityPlate) then
204
SetVehicleMod(vehicle, 26, props.modVanityPlate, false)
205
end
206
207
if (props.modTrimA) then
208
SetVehicleMod(vehicle, 27, props.modTrimA, false)
209
end
210
211
if (props.modOrnaments) then
212
SetVehicleMod(vehicle, 28, props.modOrnaments, false)
213
end
214
215
if (props.modDashboard) then
216
SetVehicleMod(vehicle, 29, props.modDashboard, false)
217
end
218
219
if (props.modDial) then
220
SetVehicleMod(vehicle, 30, props.modDial, false)
221
end
222
223
if (props.modDoorSpeaker) then
224
SetVehicleMod(vehicle, 31, props.modDoorSpeaker, false)
225
end
226
227
if (props.modSeats) then
228
SetVehicleMod(vehicle, 32, props.modSeats, false)
229
end
230
231
if (props.modSteeringWheel) then
232
SetVehicleMod(vehicle, 33, props.modSteeringWheel, false)
233
end
234
235
if (props.modShifterLeavers) then
236
SetVehicleMod(vehicle, 34, props.modShifterLeavers, false)
237
end
238
239
if (props.modAPlate) then
240
SetVehicleMod(vehicle, 35, props.modAPlate, false)
241
end
242
243
if (props.modSpeakers) then
244
SetVehicleMod(vehicle, 36, props.modSpeakers, false)
245
end
246
247
if (props.modTrunk) then
248
SetVehicleMod(vehicle, 37, props.modTrunk, false)
249
end
250
251
if (props.modHydrolic) then
252
SetVehicleMod(vehicle, 38, props.modHydrolic, false)
253
end
254
255
if (props.modEngineBlock) then
256
SetVehicleMod(vehicle, 39, props.modEngineBlock, false)
257
end
258
259
if (props.modAirFilter) then
260
SetVehicleMod(vehicle, 40, props.modAirFilter, false)
261
end
262
263
if (props.modStruts) then
264
SetVehicleMod(vehicle, 41, props.modStruts, false)
265
end
266
267
if (props.modArchCover) then
268
SetVehicleMod(vehicle, 42, props.modArchCover, false)
269
end
270
271
if (props.modAerials) then
272
SetVehicleMod(vehicle, 43, props.modAerials, false)
273
end
274
275
if (props.modTrimB) then
276
SetVehicleMod(vehicle, 44, props.modTrimB, false)
277
end
278
279
if (props.modTank) then
280
SetVehicleMod(vehicle, 45, props.modTank, false)
281
end
282
283
if (props.modWindows) then
284
SetVehicleMod(vehicle, 46, props.modWindows, false)
285
end
286
287
if (props.modLivery) then
288
SetVehicleMod(vehicle, 48, props.modLivery, false)
289
end
290
291
if (props.livery) then
292
SetVehicleLivery(vehicle, props.livery)
293
end
294
end
Last modified 2mo ago