ESX Advanced Garage - HumanTree92/VENT_ESX_Scripts GitHub Wiki
- Saying you don’t own any Vehicles / Can’t Pull Vehicles out of Garage/Impound
- If this pops up then you installed it wrong or you have edited the script. I don’t offer support if you edit anything besides the
config.lua
- If this pops up then you installed it wrong or you have edited the script. I don’t offer support if you edit anything besides the
Setting up to Work with ESX Property
Go to server/main.lua of esx_property & do the following:
- Under -
TriggerClientEvent('esx_property:setPropertyOwned', xPlayer.source, name, true, rented)- Add -
xPlayer.triggerEvent('esx_advancedgarage:getPropertiesC')
- Add -
- Under -
xPlayer.triggerEvent('esx_property:setPropertyOwned', name, false)- Add -
xPlayer.triggerEvent('esx_advancedgarage:getPropertiesC')
- Add -
Adding Categories
- Note - Make sure that the
customcategoryis set similar to how you set it up inesx_advancedvehicleshop
Step 1: Go to client/main.lua & do the following:
- Under
elseif pJob == 'civ' and vType == 'cars' then- Add -
ESX.TriggerServerCallback('esx_advancedgarage:getOwnedVehicles', function(ownedVehicles)
if #ownedVehicles > 0 then
table.insert(elements, {label = _U('customcategory'), value = 'customcategory', spawnloc = this_Garage.Spawner, spawnhead = this_Garage.Heading})
end
end, pJob, 'customcategory')
- Change -
customcategoryto whatever the Category is.- Example -
chevys
- Example -
Step 2: Go to locales/en.lua & do the following:
- Under
['vans'] = 'Vans',- Add -
['customcategory'] = 'custom category', - Change -
customcategoryto whatever the Category is.- Example -
['chevys'] = 'Chevys',
- Example -
- Add -
Step 3: Go to server/main.lua & do the following:
- Under -
elseif type == 'vans' then
local ownedVans = {}
MySQL.query('SELECT * FROM owned_vehicles WHERE owner = ? AND Type = ? AND job = ? AND category = ?', {xPlayer.identifier, 'car', 'civ', 'vans'}, function(data)
for _,v in pairs(data) do
local vehicle = json.decode(v.vehicle)
table.insert(ownedVans, {vehicle = vehicle, plate = v.plate, vehName = v.name, fuel = v.fuel, stored = v.stored})
end
cb(ownedVans)
end)
- Add -
elseif type == 'customcategory' then
local ownedCustomCategory = {}
MySQL.query('SELECT * FROM owned_vehicles WHERE owner = ? AND Type = ? AND job = ? AND category = ?', {xPlayer.identifier, 'car', 'civ', 'customcategory'}, function(data)
for _,v in pairs(data) do
local vehicle = json.decode(v.vehicle)
table.insert(ownedCustomCategory, {vehicle = vehicle, plate = v.plate, vehName = v.name, fuel = v.fuel, stored = v.stored})
end
cb(ownedCustomCategory)
end)
- Change -
customcategoryto whatever the Category is.- Example -
chevys
- Example -
- Change -
ownedCustomCategoryto whatever the Category is.- Example -
OwnedChevys
- Example -