@name Spectator
@persist [ID Ply]:array #Arrays
@persist [M]:string #Strings
@persist [V]:vector #Vectors
@persist [A]:angle #Angles
@persist [E]:entity #Entities
@persist [I Rdy Wep] #Numbers
interval(10)
if(first())
{
    setName("il fukin dec u in m8 swer on me mum")
    ID = array("STEAM_0:0:32759932")
    
    function array:updateEx(E:entity)
    {
        for(I=1,This:count())
        {
            if(E==This[I,entity])
            {
                This:remove(I)
                break
            }
        }
    }
    
    Ply = players()
    Ply:updateEx(owner())
}

if(changed(players():count()))
{
    Ply = players()
    Ply:updateEx(owner())
    
    if(!E:isValid())
    {
        E = Ply[1,entity]
    }
}

if(Rdy)
{
    
}else
{
    Wep = owner():weapon():type()=="weapon_physgun"
    if(changed(Wep)&Wep)
    {
        print("In 5 seconds, you shall enter spectator mode...")
        print("If you do not want to do so, switch your weapon before the 5 seconds are up.")
        timer("startspectate",5000)
    }
    if(clk("startspectate"))
    {
        Rdy = 1
        
    }
}
