No. That should be state two shouldn't it? It directs it to that state. If you moved in the area, it goes to state two, and because you changed it back to state one it would never be dirtected back to state one right? Should it not go like this:
;Artificial Intelligence Script
;Header
desc = Weapon Slot 2
;Triggers
:state=0:hudreset,hudx=50,hudy=90,hudsize=30,hudtext='F' Switch Weapon,hudname=slottwo,hudhide=1,hudmake=display,state=1
:state=1,plrdistwithin=40:hudshow=slottwo,state=2
:state=2,plrdistfurther=40:hudunshow=slottwo,state=1
:state=2,scancodekeypressed=33:state=4
:state=4:removeweap=2,hudunshow=slottwo,playertake,coloff,rundecal=-1,plrsound=audiobankitemspickupweapon.wav,state=5
:state=5:runfpi=weapon.fpi,state=6
;End of Script
Also i reliesed the colon error before the state 4 and 5 and fixed it. I never got what colons did till now. If a colon is at the start of the state does that mean it will do everything on that line? Im a newbee to scripting