Please read this thread about how to post code on the forums: Using code tags properly
With regard to multiple jumps, that is a common question. Did you try to search for an answer?
You must know when you are grounded or not, to determine if you can jump. I find that using a raycast is the best solution for this; cast down a short distance and if you make contact, you assume you’re on the ground (I would skip casting onto triggers*).
- You can try to examine the code in the standard assets third person controller, for a more detailed example, if you’d like.
As for your camera, that can be solved by using the camera’s forward as your movement direction. This however may not work directly, if your camera can move in other directions, too.
One option can be that you rotate your player to face the direction the camera is pointing (on the Y-axis). From there, you can use your own transform.forward (which is the same as the camera)…
Hope that helps.