@adrillex
was curious myself, seems like onesync can have issues with spawning NPCs…
and OneSync 'Infinity': how to use it - #12 by d0p3t
Guess try doing +set onesync or +set onesync_enableInfinity 1
on the command line, not in the cfg was recommended, try either one. Other than and my post above Im out of ideas, since I dont use OneSync. Also, not sure if onesync breaks old code that was standard before, that would suck if it did, but it shouldnt.
Also, I would put print statements in various points in SpawnPed and SpawnRandomPed to see that the events are being called from mt:startnextmission and a print statement around the CreatePed native call, to see if that code is being called as well.
Good luck and let me know if you get it working.