To make things more complicated; here are a few more methods.
This finds the damage-causing entity by classname then removes it.
PHP Code:
new iEntity = find_ent_by_class(-1,"game_player_hurt")
if(is_valid_ent(iEntity)) remove_entity(iEntity)
This one finds the same entity from above but this time finds its location & kicks the crap out of it, lowering its damage to zero, rendering it harmless.
PHP Code:
new iEntity=find_ent_in_sphere(-1,Float:{0.0,400.0,384.0},1.0)
if(is_valid_ent(iEntity)) DispatchKeyValue(iEntity,"dmg","0")
Finally, this scopes out its puny foot soldiers one by one, identifying them by their model, then choking them out.
PHP Code:
new iEntity
for(new iNum=49; iNum<=72; iNum++) {
static szModel[4]
static szNum[3]
num_to_str(iNum,szNum,2)
szModel[0]='^0'
strcat(szModel,"*",1)
strcat(szModel,szNum,3)
iEntity=find_ent_by_model(-1,"trigger_multiple",szModel)
if(is_valid_ent(iEntity)) remove_entity(iEntity)
}
__________________