Or you can download this one add on, and use this very simple script.
The addon link:
http://ofp.gamezone.cz/index.php?sekce=unofaddons/misc&archiv=true&page=7(Scroll down the page, you'll find it under the name of "SmokeCan - 100 color smokes".
Install the addon in your OFP/Addons folder.
Then copy my script in Your mission folder:
;Smoke.sqs
;This script is used to add smoke if an object is damaged.
;------Type in the "Init" field of the object(s):
;[This] Exec "Smoke.sqs"
;________________________________________________
;This creates a variable passed from the objects.
_Object = _This Select 0
;________________________________________________
;This is a label.
#Loop
;This checks if an object gets damaged. If there's
;no damage, the script reader is sent back to the
;"#Loop" label. If there is any damage, the script reader
;will read further down.
? ((GetDamage _Object) == 0) : GoTo "Loop"
;________________________________________________
;This creates a lit black smoke shell positioned on the destroyed object.
BangS = "SCBlack" CamCreate GetPos _Object
;________________________________________________
;Bye!
Exit