I'm trying to find all the light entities in the map. I decompiled the maps I tested and I can see int the entity report of Hammer that they have several light entities with the classname "light". This is how I'm trying to detect light entities:
PHP Code:
new g_max_clients = global_get(glb_maxClients)
new entitiesnum = global_get(glb_maxEntities)
new classname[33]
for(new i = g_max_clients + 1; i < entitiesnum ; i++)
{
if (!pev_valid(i))
{
}
else
{
pev(i, pev_classname, classname, 32)
log_amx("Entity %d: %s", i, classname)
}
}
However I can't see any entities with the classname "light". I also tried several entity related plugins here none of them could find the light entities. Is it possible that you can only detect lights which have actual switches in the map for them? If so, is there any other way I can detect the ones that don't? Any comment would be appreciated.