@name Admin_E2
@inputs EGP:wirelink
@outputs EGP512
@persist Lock1 Lock T Lock2 B:entity Timer Admin:string Ref
interval(100)
runOnChat(1)
T++
Timer++
EGP512 = 512
#Simple but effective quickjailer
A = owner():aimEntity()
if(owner():keyReload() & owner():keyAttack2() & Lock1 == 0){
    if(A:isPlayer()){
        concmd("ulx jail \""+A:name()+"\"")
        Lock1 = 1
    } elseif(A==noentity()){}
    else{concmd("ulx jail \""+A:owner():name()+"\"")
    Lock1 = 1
    }
}
if(owner():keyReload() & owner():keyAttack2()){}else{Lock1 = 0}
#/end quickjailer

#Blocked wire models finder
if(T < 5 &!Lock2){
    findByClass("gmod_wire_detcord")
}
if(T > 5 & T < 10 &!Lock2){
    findByClass("gmod_wire_field_device")
}
if(T > 10 & T < 15 &!Lock2){
    findByClass("gmod_wire_explosive")
}
if(T > 15 & T < 20 &!Lock2){
    findByClass("gmod_wire_simple_explosive")
}
if(T > 20){
    T = 0
}
B = find()
C = B:owner():name()
if(B == noentity()){Lock2 = 0}
elseif(!Lock2){
    concmd("ulx tsay [Admin E2] "+C+" is using "+B:toString()+" ; ulx slap \""+C+"\"")
    Lock2 = 1
}

#/end blocked models

#EGP HUD
if(Lock2 == 0){
    if(Timer < 100){
        EGP:egpBox(1, vec2(475,20),vec2(50,25))
        EGP:egpColor(1, vec(0,100,255))
        
        EGP:egpBoxOutline(2, vec2(475,20),vec2(50,25))
        EGP:egpSize(2,2)
        EGP:egpColor(2, vec(0,0,0))
        
        EGP:egpText(3, "Clear.", vec2(460,15))
    }
}
if(Lock2 == 1){
    if(Timer < 100){
        EGP:egpBox(1, vec2(435,125),vec2(150,125))
        EGP:egpColor(1, vec(0,150,255))
        
        EGP:egpBoxOutline(2, vec2(435,125),vec2(150,125))
        EGP:egpSize(2,2)
        EGP:egpColor(2, vec(0,0,0))
    }
    EGP:egpText(3, "Name: "+C,vec2(365,70))
    EGP:egpText(5, "SteamID: "+B:owner():steamID(),vec2(365,80))
    
    EGP:egpText(8, "Team: "+B:owner():team():teamName(),vec2(365,100))
#[]#EGP:egpColor(8,teamColor(B:owner():team()))
    EGP:egpText(10,"Is Admin: "+Admin,vec2(365,110))
    EGP:egpText(6, "Frags: "+B:owner():frags(),vec2(365,120))
    EGP:egpText(7, "Deaths: "+B:owner():deaths(),vec2(365,130))
    

    EGP:egpText(4, "Prop: ",vec2(365,150))
    EGP:egpText(9,B:toString(),vec2(365,160))
}
if(B:owner():isAdmin() | B:owner():isSuperAdmin()){
    Admin = "Yes"
    }else{Admin = "no"}

#Refresher
if(!Lock2 & !Ref){
    Ref = 1
    Timer = 0
    EGP:egpClear()
}
if(Lock2 == 1 & Ref == 1){
    Ref = 0
    Timer = 0
    EGP:egpClear()
}
