You should use gscript2 for your setimg.
setimg("buttonpressed.png");
Make sure you're standing right next to the switch when you apply the script because that's the only way you'll really be able to test it... I suggest using onWeaponFired instead of onCreated.
__________________
“Shoot for the moon. Even if you miss, you'll land among the stars.”