Newmodels v6 (codename Red 🍒)
Main changes:
- Updated documentation markdown files
Multiple README's have been updated, including a brand new Migration guide to migrate from previous versions to Newmodels v6.
- Added
mod_listway of loading new models (inspired by how it worked in newmodels v3)
Your
mod_list.luafrom newmodels v3 will work and will load your files without change (except maybe update the paths of the files)!
- Added server-side functions
addExternalModelsandremoveExternalModels(exported) for loading new models from external resources (inspired by how it worked in newmodels v3)
Resources like
sampobj_reloaded(which has been rewritten and renamed tosampobj_red) will be able to add new models from their own resource!
- Added feature that uses
downloadFileto download model files only when they are needed, instead of on resource start
This existed on newmodels v3 to download model files just before applying them, so they are not included in the initial server download for the player. This is very useful for SA-MP objects, which now won't occupy megabytes of the DL size, and will only download on demand!
- Added dev command
checkmodelid
Runs only on server console. Useful for checking if a model ID is a default GTA ID or a custom model, and what it's registered as.
- Added custom event
"newmodels_red:preDownloadNewModels"for developers to pre-download a list of model files.
Developers may want to decide when files should be downloaded to later speed up loading of new models. Usage:
triggerEvent("newmodels_red:preDownloadNewModels", localPlayer, { <customModelId1>, <customModelId2>, ... })
Conclusion:
These main new features make it possible to now easily migrate from newmodels v3, because we've achieved feature parity with that version. I'm sorry for having removed these features in newmodels v4 and v5 with the simplified file-based loading method (still available).
Documentation is available!
Don't forget the main README file which contains all you need to know!