I have been playing guitar for almost 4 years but I still have trouble with those really quick hammeron and pulloffs in fast solos. I see some people play and their amp and guitar clearly play all notes so clearly and yet when I do a long string of hammerons and pulloffs, the sound of the notes dies after only a few notes.

Any suggestions on how I can sustain the notes more? I find it especially hard when the hammerons and pulloffs continue on to other strings. =/
Hammer-ons: Work on hammering harder, just like you would if you were just tapping, it will re-resonate the string a little bit.
Pull-offs: Self-explanatory. You're gonna "pull off" instead of just taking your finger off of the string quickly. You're gonna pull your finger downwards (towards the ground) as if you're "picking" the string with that finger. This will also re-resonate the string a little bit, giving you (when done right) infinite sustain.
Only play what you hear. If you don’t hear anything, don’t play anything.
-Chick Corea