iPhone button programming

I'm trying to run the FPS tutorial on my iPad with 3rd person controls, so I need to attach a button that replaces left mouse button to shoot.

if (Input.GetButton ("Fire1")) BroadcastMessage("Fire");

does anyone kwow how to make machine gun fire with touching button on screen?

you can make this by a GUI.Button and hit it, also you can use clicking in the object you want to shoot, this last way you'll need to use Raycast, if you are not used to raycast this is a easyway

Ray ray = Camera.main.ScreenPointToRay(touch.position);
RaycastHit hit;
if(Physics.Raycast(ray,out hit))
//by this if you hit a collider of some Gameobject it will detect the collision

hope this helps you