I'm not sure if I'm following the correct path. I think I can use the set_pdata_int function along with this information about light entities:
http://wiki.amxmodx.org/CLight_%28CS%29
I'm trying to find if an entity is a light entity using this:
PHP Code:
new light_count = 0
new ent = engfunc( EngFunc_FindEntityByString, -1, "classname", "light" );
while(ent)
{
light_count += 1
ent = engfunc( EngFunc_FindEntityByString, ent, "classname", "light" );
}
But when I print the light_count variable I get 0. Is it not ok to search for "light" as a class name?