Be dependable. Being dependable is one of the most important aspects of being a good friend. Your friend will need you for support, especially in hard times. Nobody likes a fake, and nobody wants one for a close friend. It's hard to rely on a person who doesn't behave in a consistent and trustworthy way. We all know well-intentioned but flaky people who say, "Okay, I will..." but never follow through. If that's you, know that you're eroding your friends' trust; eventually they'll stop believing what you say.
If you're not sure you can do something, don't agree to do it and flake out later. Instead, be honest about the fact that you're not sure if you can make it.
Your friends should always feel like they can count on you, even when the going gets tough. If you're only there for the fun times, you'll be no more than a fair-weather friend.