Shows this is your first post, so I suppose we cant expect you to know this. But see that magnifying glass in the top right corner? Click it and search.
https://forum.cfx.re/search?q=remove%20ai
There’s that for vehicles and planes
There’s also a native to get rid of AI on the streets
SET_PED_DENSITY_MULTIPLIER_THIS_FRAME(float multiplier);
--SetPedDensityMultiplierThisFrame(0.0)