################
# > Anti-Explosives: Hints the model and owner of the nearest explosive prop.
# > How to use: Spawn it and when the nearest explosive changes, it will tell you.
################

@name Anti Explosives
@persist Blacklisted:array Prop:entity Model:string Owner:entity
@persist I

interval(10)

Blacklisted=array(
"models/props_phx/amraam.mdl",
"models/props_phx/mk-82.mdl",
"models/props_phx/oildrum001_explosive.mdl",
"models/props_phx/torpedo.mdl",
"models/props_phx/ww2bomb.mdl",
"models/props_phx/flakshell_big")
findByClass("prop_physics")
findToArray()
Prop = findClosest(owner():pos())
Model = Prop:model()
Owner = Prop:owner()

if ((changed(Model))|(changed(Owner))) {
    for (I=1,Blacklisted:count()) {
        if (Model == Blacklisted[I,string]) {
            hint("!!! "+Owner:name()+": "+Model,8)
        }
    }
}
