how would i make my gun shake when i shoot sort of like a recoil effect also how do u add a bullet tracer effect
You could potentially use one of these functions:
To return a random point within an area, and then adjust your weapons position.
Alternatively you could animate a small movement in your 3D app of choice, or inside Unity in the Animation Editor, and then play that animation when firing. I haven't done this myself, so these are untested methods.
In regards to tracers I would suggest using a particle system. There are two methods to do this:
A) Using the Stretched particles drawmode, where you can enter values that will stretch your particles based on speed, this seems like a more generic system where you can use it for most weapon types regardless of bullet speed, however it's slightly more expensive than option B. NOTE the texture needs to be rotated so the line is horizontal, in order to match the movement direction of the particles.
B) Using the standard Billboard view mode, and just having a particle material that uses a texture of a long thing line.
Essentially whichever you choose, you wire this into your firing code and you emit particles when you shoot, and use ParticleEmiter.velocity to give them a movement direction, ensure that Damping is set to be ineffective unless you want your tracers to slow down.
You could just animate it and have the animation play when the user presses a key.