[Release] Los Santos Customs by Arturs

nice that what i was looking for :slight_smile: thx for info

Keep in mind that only PURCHASED cars will have their modifications saved. Random Joes stolen vehicle will not save.

:slight_smile: now we need just a mod where we can mod weapons and its amlost like gta:o ^^ great work

Thank you! It took a lot of effort to do.

And a lot of “WHY WON’T THIS WORK… oh”

1 Like

u know how i add more garage location?

sup guys

made a heli/plane Garages if someone want
its works well wiht MrArca9 modded version have fun gonna do boat later :slight_smile:

btw heli/plane prices are not ok yet just edit yourself in vehshopheli.lua serach for heli or plane
install as always also run the sql -.-

just found a bug some heli dont load gonna fix it give me few mins ^^

fixed version :slight_smile: helistore.rar (26.8 KB)

found out u cant store heli/planes or cop cars ,so u only can take em out still fine imo
also cant sell em same as above

here why heli planes and cop cars dont work wiht GetClosestVehicle sry about that if one has a fix tell me

ok fixed it now can sell store plane/heli :slight_smile:helistore.rar (22.1 KB)

is there an update with the new garage update ?

I made my own save customization as well. It wasn’t that easy but it works fine :slight_smile:
The only problem is to be able to pay for the mods…

did you made it element by element or all in one time ?

I merged the garage plugin and the lscustoms… Explanations below :slight_smile:

  1. I created a database with every possible modications with all the default values.
  2. When the player take the car out of the garage, i load everything that is in the database and apply it one by one to the car.
  3. when he goes to the ls customs, I created an array with every possible modification set to nil. Everytime he changes something, i insert the value in the array for this specific modification. Finally, when the DriveOutOfGarage is called, i send the array to the server and apply the changes in values on modifications that aren’t nil.
    Job done :smiley:

So to answer… you can do it by creating an array of mods but you will need to do it at least once or twice element by element (insert in the array for exemple).

1 Like

any chance to share it ? people can see you as a god here if u do that :stuck_out_tongue:

The code is a real mess xD and I did it 2 weeks ago… so I might possibly forget some code lines :confused: due to the fact I adapted it to the gang plugin I made with a friend for our server…

Most of scripts are real mess, but if it’s working, it’s good. It’s the only thing we ask :stuck_out_tongue:

Has any of you implemented lscustoms with garages using MySQL Async? I’m having trouble spawning the car so I think my mods array isn’t being populated or something. Spent the last 2.5 hours trying to get the MySQL logic correct, which I got now. Would appreciate an example for MySQL Async.

Edit: Problem solved. I don’t know if this is the best way to do it, but if you want to implement MySQL Async here is the spawning of the vehicle for garages.

  • Add this in file garages/server.lua
AddEventHandler('garages:CheckForSpawnVeh', function(veh_id)
  TriggerEvent('es:getPlayerFromId', source, function(user)
    local veh_id = veh_id
    local user = user.identifier
    MySQL.Async.fetchAll("SELECT * FROM user_vehicle WHERE identifier = @identifier AND id = @id",{['@identifier'] = user, ['@id'] = veh_id}, function(data)
      MySQL.Async.fetchAll("SELECT * FROM user_vehmods WHERE plate = @platenumber",{['@platenumber'] = data[1].vehicle_plate }, function(result)
        local tyrecolor = nil
        local mods = {}
        if(result)then
          for k,v in ipairs(result)do
            table.insert(mods, result[1].mod0)
            table.insert(mods, result[1].mod1)
            table.insert(mods, result[1].mod2)
            table.insert(mods, result[1].mod3)
            table.insert(mods, result[1].mod4)
            table.insert(mods, result[1].mod5)
            table.insert(mods, result[1].mod6)
            table.insert(mods, result[1].mod7)
            table.insert(mods, result[1].mod8)
            table.insert(mods, result[1].mod9)
            table.insert(mods, result[1].mod10)
            table.insert(mods, result[1].mod11)
            table.insert(mods, result[1].mod12)
            table.insert(mods, result[1].mod13)
            table.insert(mods, result[1].mod14)
            table.insert(mods, result[1].mod15)
            table.insert(mods, result[1].mod16)
            table.insert(mods, result[1].mod17)
            table.insert(mods, result[1].mod18)
            table.insert(mods, result[1].mod19)
            table.insert(mods, result[1].mod20)
            table.insert(mods, result[1].mod21)
            table.insert(mods, result[1].mod22)
            table.insert(mods, result[1].mod23)
            table.insert(mods, result[1].mod24)
            tyrecolor = result[1].tyresmoke
          end
        end
        TriggerClientEvent('garages:SpawnVehicle', source, data[1].vehicle_model, data[1].vehicle_plate, data[1].vehicle_state, data[1].vehicle_colorprimary, data[1].vehicle_colorsecondary, data[1].vehicle_pearlescentcolor, data[1].vehicle_wheelcolor, tyrecolor, mods)
      end)
    end)
  end)
end)

Hi, but I have a little concern, the modifications of the vehicle can not be saved in the database: user_vehmods

I think the error comes from the Updateveh in the server.lua of the garage. But I do not know or. I did exactly what it says but no, the vehicle does not save the mods in the DB. A solution ?

1 Like

Someone has any idea how to make a cost for every boost?

1 Like

i dont think thers a way yet.

did u figure out how to charge money for ls customs upgrades?

No i never looked into it.