@name Complex Security E2
@inputs List:wirelink Info:wirelink Compass:wirelink Up Down 
@outputs 
@persist Index
@trigger 
if(first()){List:egpClear(),Info:egpClear(),Compass:egpClear()}
interval(600)
#List
Players = players()
for(I=1, Players:count()){
    List:egpText(I,Players[I, entity]:name(),vec2(30,15*I))
    }
if(Up & ~Up){Index--}
if(Down & ~Down){Index++}
if(Index < 1){Index = Players:count()}
if(Index > Players:count()){Index = 1}
List:egpBox(Players:count()+1, vec2(10,(15.2*Index)+5),vec2(10,4))
List:egpColor(Players:count()+1, vec(255,255,0))

Ply = Players[Index, entity]
#Info

Info:egpText(1, "Name: " + Ply:name(),vec2(10,20))
Info:egpText(2, "Distance: " + round(Ply:pos():distance(entity():pos())),vec2(10,40))
Info:egpText(3, "Steam_ID: " + Ply:steamID(), vec2(10,60))
Info:egpText(4, "Model: " + Ply:model(), vec2(10, 80))
#compass

Pos = entity():pos()
PPos = Ply:pos()
Dist = Pos:distance(PPos)

Compass:egpBox(1, vec2(250, 150),vec2(100,60))

Yaw = entity():bearing(Ply:pos() + Ply:boxCenter())
#Info:egpText(4, "Yaw: " + Yaw,vec2(10,80))
Compass:egpAngle(1, -Yaw)



