After another post about proxy caching, I release a script i’ve made for my server.
This resource allows you to download all the vehicles from your database as soon as your players connect.
This allows all of your vehicles to be loaded into client game memory.
Also, when you use a caching server, it allows you to upload all your vehicles to the caching proxy server (clear your game cache if you already have them in your game).
The main thing is that small connections will end up seeing all your vehicles, no matter how small (and not players floating through the ground when the import vehicles are not yet loaded…).
Finally, no more waiting when you have to make a vehicle appear, it appears instantly (or almost depending on your computer ^^), even if you haven’t made it appear for a long time!
LUA resource, see files server and client for more details, the code is simple and commented.
Downloadable for free on my tebex.
You can set in config.lua:
-Enabling or not loading prompt (at screen bottom right) : enableLoadingPrompt = true
-Mysql vehicles table: tableVehicle = “vehicles”
-Mysql column with the model name in your vehicle table: tableModelColumn = “model”
-Mysql column with display name for vehicles from your vehicle table (leave blank to use model name) : tableNameColumn = “name”
If you need help to adapt it to your database, tell me, or here !
Original source: https://forum.cfx.re/t/release-vehicles-downloader-after-connect-to-proxy-free/2002104