you need to animate the texture. draw a couple of different flashes and load them all up. Whilst the fire button is held down, texture your plane with one of them and if a certain amount of time has passed change the image. Here is an example, assuming you loaded four different textures to animate:
..an enumeration for holding muzzle image id's
enum MUZZLE_FLASH {
MUZZLE01 = 1,
MUZZLE02,
MUZZLE03,
MUZZLE04,
MUZZLE_TOTAL
};
..constants
#define ANIMATION_DELAY 30
...globals
unsigned int unMuzzleFrame = MUZZLE01;
unsigned int unLastUpdate = 0;
...init code..
dbLoadImage("muzzle01.png", MUZZLE01);
dbLoadImage("muzzle02.png", MUZZLE02);
...
etc
..while fire button is held down
dbTextureObject(MUZZLE_PLANE, unMuzzleFrame);
if (dbTimer() - unLastUpdate > ANIMATION_DELAY) {
unMuzzleFrame++;
if (unMuzzleFrame >= MUZZLE_TOTAL) {
unMuzzleFrame = MUZZLE01;
}
}
assumes that MUZZLE_PLANE is a constant holding the ID of your plane object. All the code i just wrote off top of my head so take it with a pinch of salt, but thats one possiable way of animating a muzzle flash.