entity_count() gives the number of entities in the server, not max entities.
Instead, you should use global_get(glb_maxEntities) and loop like you would for max players, except checking if entities are valid.
But doesn't the number of entities reflect indexes also? I don't think you can have an entity id above entity_count()
__________________
PM me if you're interested in buying the Credits addition for Base Builder Battlefield Rebirth [66% done] Call of Duty: MW2 [100% done] Base Builder [100% done]