Getting npcs spawned by map without using ents.GetAll()

I am trying to get ents that are spawned by my map as they spawn, sort of like http://wiki.garrysmod.com/page/SANDBOX/PlayerSpawnedNPC. Been backwards and forward through the wiki and cant seem to find anything. Anyone have a suggestion?

The hook you want is

GM:OnEntityCreated where you can use

Entity:IsNPC, but I’m not sure how you can tell whether it was created by the map.

Edit: oh.

Entity:CreatedByMap

Awesome, thanks a bunch