Ok, I ffigured it out. You both fata error and TZapp have been very helpful, so here is the script : (It's the one that TZapp suggested, but this one has a line from original switch.fpi, so the switch won't reset.)
;Artificial Intelligence Script
;Header
desc = Switch Activate And Deactivate Within 10 Seconds (toggle on and off)
;Triggers
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecoretextpressentertouse.tga,hudname=useswitchprompt,hudhide=1,hudmake=display,state=10
:plrdistwithin=50:hudshow=useswitchprompt,hudfadeout=useswitchprompt
:state=10,plrdistwithin=50,plrusingaction=1:state=1,plrsound=$0,activateifused=1,alttexture=1
:state=1,plrusingaction=0:timerstart,state=2
:state=2,timergreater=10000:state=3,plrsound=$1,activateifused=0,alttexture=0
:state=3,plrusingaction=0:state=10
;End of Script
Thanks again for your help!