The check must be on all the functions where it contains checks for armoury_entity or weaponbox
Code:
if(equali(classname,"weaponbox") && get_pdata_int(ent, 105, 4))
if(get_pcvar_num(toggle_pcvar) && pev_valid(weaponbox) && get_pdata_int(weaponbox, 105, 4))
if(containi(classname,"armoury")!=-1 || containi(classname,"weaponbox")!=-1 && get_pdata_int(ent, 105, 4))
if(containi(classname,"armoury")!=-1 && get_pdata_int(ent, 105, 4))