@name BlankSpace Lister
@persist File:string People:array Players:array BlankSpace:array
@persist Broadcast:string CurB BlankG:gtable CurS Done CurO
@inputs Scr:wirelink
@trigger all
Players=players()
if (first()) {
print(Players:count()+" people online")
}
interval(100)
if (fileCanLoad() & People:count()==0) {
fileLoad("blankmembers.txt")
}
if (fileLoaded()) {
    File=fileRead()
    People=File:explode("
")
if (first()) {
print("File loaded. BlankMembers: "+People:count())
print("ID 5: "+People[5,string])
}
if (changed(Players:count())) {
    BlankSpace:clear()
    BlankG:clear()
    CurS=0
    Done=0
    timer("CurS",250)
}
if (clk("CurS")) {
    CurS+=1
    #Scr:egpClear()
    #BlankSpace:clear()
    #BlankG:clear()

        for (I2=1, People:count()) {
            if (Players[CurS,entity]:steamID()==People[I2,string] & BlankSpace[BlankSpace:count(),entity]!=Players[CurS,entity] ) {
                #print("Added member "+Players[CurS,entity]:name(),"Current: "+BlankSpace:count()+1)
                BlankSpace[BlankSpace:count()+1,entity]=Players[CurS,entity]
                BlankG[BlankG:count()+1,entity]=Players[CurS,entity]

            }
        }
    #print(BlankSpace:count()+" BlankSpace members online")

    if (CurS<Players:count()) {
        timer("CurS",50)
        print(_HUD_PRINTCENTER,CurS:toString())
        
    } else {Done=1}
}
}
if (Done) {
        Scr:egpClear()
        Scr:egpText(1,"BlankSpace",vec2(256,0))
        Scr:egpAlign(1,1,0)
        Scr:egpSize(1,50)
        print(BlankSpace:count():toString()+" BlankSpace members online")
        for (I=1, BlankSpace:count()) {
            Scr:egpText(1+I,BlankSpace[I,entity]:name(),vec2(0,20*(I-1)+100))

    }
    Done=0
}
if (1) {
if (owner():keyUse() & owner():aimEntity():isPlayer()) {
    Yes=0
    for (I=1, BlankSpace:count()) {
        if (owner():aimEntity()==BlankSpace[I,entity]) {Yes=1}
    }
    if (Yes) {
        print(_HUD_PRINTCENTER,"Ally")
    } else {
        print(_HUD_PRINTCENTER,"NOT ALLY")
}
}
runOnChat(1)
if (chatClk(owner()) & owner():lastSaid():sub(1,3)=="-bc") {
    hideChat(1)
    CurB=0
    Broadcast=owner():lastSaid():sub(4)
    print("Broadcasting "+Broadcast+" to "+BlankSpace:count()+" members")
    timer("Broadcast",1250)
}
if (clk("Broadcast")) {
    CurB++
    print("Broadcast to "+BlankSpace[CurB,entity]:name())
    concmd("say /pm "+BlankSpace[CurB,entity]:name():explode(" ")[1,string]+" "+Broadcast)
    if (CurB!=BlankSpace:count()) {timer("Broadcast",750)}
}
if (CurB==BlankSpace:count()) {Broadcast=""}
}
if (owner():lastSaid()=="-coown") {
    hideChat(1)
    CurO=0
    timer("coown",800)
}
if (clk("coown")) {
    CurO++
    concmd("say /addowner "+BlankSpace[CurO,entity]:name())
    if (CurO!=BlankSpace:count()) {timer("coown",800)}
}
entity():setAlpha(0)
