Try the attached script. It creates a barrage of three flares 120m up, 200m from your position in the direction you are facing. You can edit it to your heart's content to get it down to one flare, no custom ounds etc.
I use this as an addaction but you could trigger it via an event handler. Put the following in the player's Init field -
this addEventHandler ["fired", "this exec {callArtilleryFlare200.sqs}"]Now while you're editing the script to make it to your liking (see above) simply add a line to check the type of weapon fired. If it's a rifle grenade (or whatever weapon you've chosen to be your flare gun) then run the script, otherwise exit.
Note that this won't be perfect as you could point your weapon at the ground and still create the flare 120m up, but it's a fair approximation until someone works out how to get the payer's angle of elevation from the game.
Cheers
roni