I don't really know how others would build it up, but I'll try to explain how I usually do.
Do you want to put ammo limit too ? I will consider that you don't for this simple explanation.
So you need a variable for this. For example lets use a number variable called "ammo" wich is
supposed to be the number of bullets in your gun, and that your gun is a classic
pistol with 15 bullets in a loader. For example :
IF player press SPACE
IF "ammo" is greater than 0 Spawn Bullet
Play sound "GunFire.ogg"
Add to "ammo" -1
IF "ammo" is equal to 0 Hero animation "Reloading"
Play sound "GunReload.ogg"
Wait 0.5 seconds
Set "ammo" to 15.
This makes your player reload if he press Space and that the loader is empty. The 0.5 wait command is
the time needed to reload your gun.
Please tell me if you don't understand what I mean, I think others might have a better way to do it.