Spawning Indoors(and underground), have invisible Peds (NPCs)

Ok, its usually when they spawn inside/underground and are more than around 50m away from the player. I even tried spawning them outside, like z=1000 and moving them to the indoor location, but that did not work either.
I ended up redoing some of the spawn code, to dynamically check if the player is around 30m or less away and spawn the NPCs in dynamically. Its a pain, since I need to call the server to tell all other clients that that spawn location has been used, but it seems to work so far that way. I noticed when I moved this check to be around 50m, the NPCs would begin to ‘phase out’ a bit. There definitely seems to be something with GTA/GTAO/Fivem (?) that causes desync with Peds spawning indoors/underground, rather than outside.
Its very weird.

2 Likes