Flakscript.sqs
_man = _this select 0
_weapon = _this select 1
? _weapon == "Put" or _weapon == "throw" : exit
_ammo = _this select 4
_bullet = nearestObject [_man, _ammo]
_spd=speed _bullet
?(_spd==0):exit
_fuze=1
#flak
~_fuze - random 0.1
_pos=getpos _bullet
_px=_pos select 0
_py=_pos select 1
_pz=_pos select 2
deletevehicle _bullet
_flak="shell125" camcreate [_px,_py,_pz]
_flak1="shell125" camcreate [_px,_py,_pz]
drop ["cl_basic", "", "Billboard", 5, 5, [0, 0, 0], [0, 0, 0], 0, 1.2, 1, 0, [5,10],[[0,0,0,1],[0,0,0,0]],[0],0,0,"","",_flak]
exit
#end
In the init of the unit
this addeventhandler ["fired",{_this exec "flakscript.sqs"}]
No triggers needed.Simple as that.
Use this script only with AA units with low ROF (the SU-23 (HD) is perfect). It works with AI and player
Credits to Grendel, this is just a part of his advanced simflak script, must be somewhere in the beta script corner.