You can place flag jpegs (or any other image for that matter) on certain objects (civ truck being one of them) by using the "setobjecttexture" command. From ComRef:
object setObjectTexture texture
Operand types:
object: Object
texture: Array
Compatibility:
Version 1.75 required.
Type of returned value:
Nothing
Description:
Null
This will make the image appear on the canvas cover on the side of a truck for example. If you have a flag carrier get in a vehicle, the flag is placed on the front fender on a short pole. Once the flag carrier leaves the vehicle, the flag will once again appear on his back. I know this happens for a civ truck, but I do not know what happens if the flag carrier enters a tank or apc or plane. See for yourself! I wanted to have a flag on a truck or jeep like a staff car for an officer and it worked until the flag carrier left the vehicle.