@name Croco's E2 Door
@persist Array:array Distance Result:string Times Damage HoloDist Circle X Y

if(first()){
Ent = propSpawn("models/props_c17/door01_left.mdl",200)
Ent:setPos( entity():pos()+vec(0,0,55))
}


interval(1)
timer("check",160)
Distance = 400
Result = ""
Times = 100
Damage = 20
interval(2000)
if (clk("check")) {
    findInSphere(entity():pos(), Distance)
    Array = findToArray()
    for(I=1,Array:count()) {
        if(Array[I,entity]:isPlayer()) {
            if(Array[I,entity]:isAlive()) {
                if (Result != "whip") {   
                    
                        P = findClosest(entity():pos())
    Use = P:keyUse()
    Name=P:name()
    if(Use==1){               

Ent:setAng(ang(0,90,90))
Ent:setPos( entity():pos()+vec(0,0,70))
}}}}}}
