@name Array Testing
@inputs 
@outputs 
@persist Whitelist:array Distances:array Index
@trigger 

runOnChat(1)
runOnTick(1)

Chat = owner():lastSaid():explode(" ")

if(first() || duped()){
    Whitelist:clear()
    Index = 1
    }
if(chatClk(owner())){
if(Chat:string(1)=="+"){
    hideChat(1)
    Name = owner():lastSaid():sub(3)
    Ply = findPlayerByName(Name)
    if(Ply:isPlayer()){
        Whitelist:pushEntity(Ply)
        }
    Distances[Index, vector] = Whitelist[Index, entity]:pos() - entity():pos()
    Index++
    
    }
if(Chat:string(1)=="-"){
    hideChat(1)
    Name = owner():lastSaid():sub(3)
    Ply = findPlayerByName(Name)
    for(I=1, Whitelist:count()){
        if(Whitelist[I, entity] == Ply){
            Whitelist:remove(I)
            }
        }
    }


}



