power UP

how do i create a power up thats a fire ball feature like Mario? where you get a flower in mario and he can throw fireballs, how do i do that? and how do i put it in the power up box? If you dont know thats ok, but i would like to know.lol 

if (flowerPower = 0)
{
destroy actor(event actor);
}