Ran into a weird issue where DrawSphere renders only one sphere per frame (whichever is the latest function call), tested similar function DrawBox and it rendered all boxes correctly.
Checked LCPDFR (uses RAGE hook) and they can render multiple spheres at once no problem. Seems like fivem exclusive issue.
This is how the native is designed by R*.
I presume RPH’s Debug class (which emulates many of the nop’d Debug natives) simply enqueues a draw command. Probably similar to how Disquse implemented the DRAW_* natives for RedM.
May want to consider moving this to Feature Requests.
It’s more likely the case that _DRAW_SPHERE is improperly named.
The name of the native is comes after DRAW_MARKER and before DRAW_POLY, has its draw command queued in the same subroutine as _HIGHLIGHT_PLACEMENT_COORDS, and relates to the SC_VSP = "Land Vehicle Spawn Points" and FMMC_RSD_PSEC = "Pit Stop Entry Marker" text labels.
I suspect it’s the case of wrong naming. As mentioned on github doc page, if _DRAW_SPHERE comes from the “GTA:O Panned In Event” event which spaces out few sphere across the map with significant gaps, then I suspect It would of made sense to have just one (closest) sphere rendered.
Maybe it should be renambed to something like _DRAW_EVENT_SPHERE. I’ll look around, maybe there is another unamed native for generating a normal sphere.