Edit a light mission with some cars or others things and preview it.
Escape and go to debug console. write: 0= [] spawn {while {true} do {hintsilent format ["damage: %1", damage cursorTarget]; sleep 0.1 }}
Return to preview and open fire. Damage hinted in pop-up text is the damage value for the aimed target.
Note that cars can be almost destroyed and unusable, and return no global damage due to bullets (7.62 cal. for example).
Example: Fire with a .50 cal. (HMG). Destroy an offroad. You can see damage ratio dropping as you fire. Aim a hunter. Damage ratio stays at 0 until destruction.
Grenades are a little bit more taken into account by this function, and of course, heavier explosives or armament.