For a good bug report you should probably include:
Client (production/canary) and FXServer version
Client: Canary / Production
DLC Version: 2802 (also tested on 2189)
FXServer: 6497/5848 (vanilla server with vMenu)
What you expected to happen
Be able to spawn certain objects at high altitudes and/or have native IsModelValid return true
What actually happens
When attempting to spawn some objects (eg: vanilla prop v_res_tre_storagebox) on top of mount chilliad. Native IsModelValid returns false and HasModelLoaded never returns true after RequestModel. Object can only be spawned if the model is already loaded
Category of bug
objects
native
Reproducible steps, preferably with example script(s)
Add the following command to any script
Only models defined in archetype files that are declared as PERMANENT_ITYP_FILE or DLC_ITYP_REQUEST are always available - any other models are subject to dynamic loading and are technically not intended to be used from script.
In your case, v_res_tre_storagebox is defined in platform:/levels/gta5/interiors/int_props/int_residential.rpf:int_residential.#typ, which is not such a permanently-loaded file.
The reason it works when you’re in some locations is because at such locations, you’re within the streaming bounds of a .#map file which has a dependency on this .#typ file.
As to a solution, at this time there’s no function to manually request a .#typ file to be loaded from script. You could technically define it as a DLC_ITYP_REQUEST, but this’d have other side effects (getting closer to hitting the 65k archetype limit as described in Too many archetypes leading to LOD/SLODs displaying - #3 by d-bubble), or you could duplicate both the model and the archetype definition into your own resource (with a different name, or you’d hit the duplicate archetype issue as described in LOD / SLOD Texture issues - #59 by lugubrious_loompa), so this is very easy to get wrong and the side effects of getting it wrong tend to suck.
Since this is intended base GTA behavior and not a bug, this topic has been moved out of Bug reports and into Discussion.
Ah, that explains it thank you, found it weird to happen to some props and not to others. Was gonna say it can be closed but since you have moved the thread to discussions I guess it can stay open (?)