@name Weapon Printer
@inputs Scr:wirelink Attacker:entity Shots
@persist [Type Icon Name]:array
@trigger Shots
if (first()) {
    fileLoad("weaponinfo.txt")
    Scr:egpClear()
    Scr:egpBox(3,vec2(256,256),vec2(512,512))
    Scr:egpMaterial(3,"skybox/sky_halloweendn")
}
runOnFile(1)
if (fileClk("weaponinfo.txt")) {
    Items=fileRead():explode("
")
    Type=array() #1
    Icon=array() #4
    Name=array() #2
    for (I=1, Items:count()) {
        Info=Items[I,string]:explode(";;;")
        Index=Type:count()+1
        Type[Index,string]=Info[1,string]
        Icon[Index,string]=Info[4,string]
        Name[Index,string]=Info[2,string]
    }
}
Wep=Attacker:weapon():type()
for (I=1, Type:count()) {
    if (Wep==Type[I,string]) {
        ID=I
        break
    }
}
Scr:egpBox(1,vec2(256,256),vec2(256,256))
if (ID) {
    Scr:egpMaterial(1,Icon[ID,string])
    Scr:egpText(2,Name[ID,string],vec2(256,400))
} else {
    Scr:egpMaterial(1,"weapons/weapon_mad_admin")
    Scr:egpText(2,"idk lol",vec2(256,400))

}

Scr:egpAlign(2,1,1)
Scr:egpSize(2,40)
