Ammo scripting question

How can I script my ammo to where my ammo will add to the remaining ammo like in call of duty or halo. my current script is :

var projectile : Rigidbody; 
var ammo : float = 10;
private var  maxammo : float = 10;
private var leastammo : float = 0;
var ammostored : int;
private var noammo : int = 0;
private var NoClips = false;
private var empty = false;
private var reloading = false;
var initialSpeed = 20.0; 
var pos : Vector2 = new Vector2(20,40);
var size: Vector2 = new Vector2(Screen.width / 2  ,20);
var posClips : Vector2 = new Vector2(20,40);
var sizeClips: Vector2 = new Vector2(Screen.width / 2 ,20);
var TextStyle : GUIStyle;
function OnGUI(){
			 GUI.Label(Rect(pos.x,pos.y,size.x,size.y)," " + ammo, TextStyle);
			 GUI.Label(Rect(posClips.x,posClips.y,sizeClips.x,sizeClips.y),"/" + ammostored, TextStyle);
}

function Fire () { 

var instantiatedProjectile : Rigidbody = Instantiate (projectile, transform.position, transform.rotation); 

instantiatedProjectile.velocity = transform.TransformDirection(Vector3 (0, 0, initialSpeed));



 }

 function Update ()
 {
	 if (Input.GetMouseButtonUp(0) && ammo > leastammo){
    Fire();
	ammo -= 1;
	}
	if (ammo >= maxammo){
		ammo = maxammo;
	}
	if (ammo  0){
    ammo = maxammo;
	}
	if (Input.GetMouseButtonUp(1) && empty){
	ammostored -= 10;
	empty = false;
	}
}
function LateUpdate (){
	
	if (reloading){
		ammo = maxammo;
	}
	if (NoClips){
	}
	
}
function addclipssmall (){
	ammostored += 10;
}
function addclipsmedium (){
	ammostored += 20;
}
function addclipslarge(){
	ammostored += 50;
}

this also handles some ammo pick up and fireing bullets thank you for any help
Tracey Pitloun

Here is is some sample ,which i hope be usefull for u!

static var GRENADE_AMMO = 0;

function OnControllerColliderHit(hit : ControllerColliderHit)
{
	if(hit.gameObject.tag == "crateGrenades")
	{
		//destroy the ammo box
		Destroy(hit.gameObject);
		
		//add ammo to inventory
		GRENADE_AMMO += 8;
		print("YOU NOW HAVE "+ GRENADE_AMMO +" GRENADES");
		GameObject.Find("g_Count").guiText.text = ""+GRENADE_AMMO;
	}
}

var speed = 3.0;
var grenadePrefab:Transform; 

function Update () 
{
	//find out if a fire button is pressed
	if(Input.GetButtonDown("Fire1"))
	{
		if(GRENADE_AMMO > 0)
		{
			//create the prefab
			var grenade = Instantiate(grenadePrefab, transform.position, Quaternion.identity);
		
			//add force to the prefab
			grenade.rigidbody.AddForce(transform.forward * 2000);
			
			Collisions.GRENADE_AMMO --;
			GameObject.Find("g_Count").guiText.text = ""+GRENADE_AMMO;
			print("YOU NOW HAVE "+ GRENADE_AMMO +" GRENADES");
		}
	}
}

Use OnTriggerEnter() and call whichever addClip function you want from within it.