Continuing the discussion from [UTILS] vImageCreator - Vehicle Image Creator:
This is a rewrite version vImageCreator of renzu Which is save as base64 thumbnails.json. Only Support generate under 1024x768 resolution.(otherwise you will get the error message: Reliable network event size overflow) It is for developer/local only because images from 'thumbnails.json' will begin rebuild when you start/restart this script.
Github: https://github.com/negbook/vImageCreator
To Use
- Set your vehiclelist in generatelist.lua
- Start/Restart the script(before it , make sure turn your resolution to under 1024x768), type /startgen
- Open thumbnails.json in your texteditor / Copy to your other scripts directly.
To Load in Client
In example resource: 'someResource' Put these in fxmanifest.lua
files {
"somewhere/thumbnails.json"
}
local cars = json.decode(LoadResourceFile('someResource', 'somewhere/thumbnails.json') or '[]') or {}
for name, base64 in pairs(cars) do
print(name,base64)
end
To texture
Create .ytd and move those jpeg into there
exports to startgen quickly from other resources
exports["vImageCreator"]:GenVehicleImages(yourlist)