I like the idea of your resource! It acts as a scripting backend, hence the suffix "(library)", which allocates new real model IDs for your own virtual set of model IDs. There appears to be a requirement to a fixed set of models into the resource so that it can sync them to players.
Found issues in version 1.1.0
if there are two peds synced for the player and both have the same custom model assigned to them, then if one of them streams out your syncer attempts to release the custom model for both of the ped elements, especially the one already streamed in. While the documentation of engineFreeModel does not mention what happens in this case, I assume that the request fails. This scenario is a potential model ID leak (the client will run out of available real model IDs at some point). Even worse: the client could run out of RAM very quickly.
Here are my suggestions
add a custom model cache based on usage frequency, API hinting (setCustomModelAlwaysLoaded) or database flag so that MTA does not have to perform the expensive disk loading of model data as frequently (improves FPS)
add a way to register custom models from other storage resources. This way custom models could potentially be downloaded from the server on-demand by a second resource and - after finishing the download - be registered as custom model inside of your own resource. Could be really fun!
add statistics API about the number of custom models loaded, their usage details (frequency, number of elements with the model, etc) and the general performance of the resource. You could even add a debug dashboard using some hidden key combination (very important to build user-trust into your resource workings)
One issue and suggestions · Issue #1 · Fernando-A-Rocha/mta-add-models (github.com)
Nice work so far! Keep it up.