HumanTree92 / VENT_ESX_Scripts

FiveM ESX Scripts
http://velocitientertainment.com/
GNU General Public License v3.0
64 stars 75 forks source link

Addon cars aren't appearing on category screen #10

Closed Rubinius1 closed 2 years ago

Rubinius1 commented 2 years ago

Questions Which Script are you having Issues with?: esx_advancedgarage Have you made changes to anything besides the config.lua?: Nope Have you looked through the Closed Topics?: Yes Have you looked through the Wiki?: Yes Are you using a Pre-Installed ESX? If Yes who?: Just using ESX_Legacy Are you using ESX Legacy V1.3 Final?: Yes Are you using OneSync?: OneSync Legacy Linux or Windows?: Linux

Describe the Bug | A Clear & Concise Description of the Bug

I have some addon cars on my server and i bought one (via esx_advancedvehicleshop). Then i parked the car but it didn't appear on the category screen?

HumanTree92 commented 2 years ago

Questions:

  1. Have you figured this out yet?
  2. Are you using Custom Vehicle Categories from esx_advancedvehicleshop?
FearlessFizzy commented 2 years ago

Its easy after u find out tbh. i'll shall explain the things what u need to do because i had this problem as wel. @RubiniusLP

PUT THIS IN SERVER FILE BELOW THE OTHERS change all 'griprenault' whatever u want. 'example'. ownedGriprenault change after owned dont forget capital letter ownedExample. just in case do ctrl F to see all what need to be changed

elseif type == 'griprenault' then
local ownedGriprenault = {} MySQL.Async.fetchAll('SELECT * FROM ownedvehicles WHERE owner = @owner AND Type = @Type AND job = @job AND category = @category', { ['@owner'] = xPlayer.identifier, ['@Type'] = 'car', ['@job'] = 'civ', ['@category'] = 'griprenault' }, function(data) for ,v in pairs(data) do local vehicle = json.decode(v.vehicle) table.insert(ownedGriprenault, {vehicle = vehicle, plate = v.plate, vehName = v.name, fuel = v.fuel, stored = v.stored}) end cb(ownedGriprenault) end)

PUT THIS IN CLIENT FILE ----------- press ctrl F and search for griprenault and give it the same name what i explained above 'griprenault' 'example'

    ESX.TriggerServerCallback('esx_advancedgarage:getOwnedVehicles', function(ownedVehicles)
    if #ownedVehicles > 0 then
        table.insert(elements, {label = _U('griprenault'), value = 'griprenault', spawnloc = this_Garage.Spawner, spawnhead = this_Garage.Heading})
    end
end, pJob, 'griprenault')

----- LAST PART PUT THIS IN LOCALES EN, or whatever language -----

------ ['griprenault'] = 'Griprenault', ------make it the same name what u used above also dont forget the capital letter. ['example'] = 'Example',

after this u need to make the category in the advanced vehicle shop as the name u made in all of this. then when u car has the category name what u made it should be showing up in the garage.

use this example save it anywhere so u can add easy other categorys for addon cars.

HumanTree92 commented 2 years ago

I don't offer support for editing anything besides the config.lua