[ESX] How can i make my vehicle appear in my garage after every server restart?

Hey everyone. Maybe any of you know how can i return the state of every owned_vehicle in database to 1 instead of 0 (meaning its in a garage, not in impound) after every single restart? Right now im running esx_eden_garage and it seems to save the owned_vehicle state. Thank you!

I’m config is there an option like store cars on restart =true/false?

nop, no store cars on restart.

Sure, add these lines on the server side script

MySQL.ready(function()
	MySQL.Async.execute("UPDATE owned_vehicles SET stored=true WHERE stored=false")
end)

Basically MySQL.Ready() will be executed whenever the script start/restart

2 Likes

thank u man!

1 Like

No problem man, happy coding :yum:

so sorry relativly new to this…where exactly to i add that line? I am having the same issue