Is it possible to find entities by their gibmodel value?
The code below is the properties of a func_breakable entity in a map. I'd like to do some stuff to these entities and they all share one same property, which is the "gibmodel".
Code:
{
"model" "*1"
"rendercolor" "0 0 0"
"gibmodel" "models/metalplategibs_green.mdl"
"targetname" "targetb"
"explodemagnitude" "100"
"material" "2"
"health" "1"
"spawnflags" "1"
"classname" "func_breakable"
}
Let's say I'm trying to delete those entities and I used the code below but it return those entities as invalid
PHP Code:
while((aEnt = engfunc(EngFunc_FindEntityByString, aEnt, "gibmodel", "models/metalplategibs_green.mdl")))
{
engfunc(EngFunc_RemoveEntity, aEnt)
}