Should be..
Make an array of the silenced ammo or weapon names, you can find them
here, and check whether the used ammo/weapon is in the array
Ammo (if ammo used is not SD ammo)
this addEventHandler ["fired",{if (!(_this select 4 in ["B_556x45_SD","B_556x45_SD"]) && !myvar_akFired) then {myvar_akFired=true; _this exec "script.sqs"}]
Weapon (if weapon used not silenced)
this addEventHandler ["fired",{if (!(_this select 2 in ["M4A1SD","MP5SD"]) && !myvar_akFired) then {myvar_akFired=true; _this exec "script.sqs"}]
The ammo thing is not very usefull because in ArmA you can use SD and non-SD ammo in silenced weapons and they are still silenced so you can't tell whether the weapon used was silenced with just the ammo..
I just thought I'd post it as an example, it might very well fit some other situation..
Oh, and that myvar_akfired is just an example of a variable name