@name Bot Weapon Changer
@inputs 
@outputs [Wep PWep]:string [Player Play]:array
@persist [Wep PWep]:string
@trigger 

O=owner()
interval(200)

PWep=Wep
Wep=O:weapon():type()


Player=players()
Play=array()
for(C=1,Player:count()){
    
    if(Player[C,entity]:name():find("Bot")){Play:pushEntity(Player[C,entity])}
}

if(PWep!=Wep){
    for(C=1,Play:count()){
        Play[C,entity]:stripWeapons()
        #printTable(Play)
    }
    for(C=1,Play:count()){
        entSpawn(O:weapon():type(),Play[C,entity]:pos())
    }
}





#[
    A new preprocessor command, @autoupdate has been added.
    See the wiki for more info.

    Documentation and examples are available at:
    http://wiki.wiremod.com/wiki/Expression_2
    The community is available at http://www.wiremod.com
]#
