Be very cautious about the people that you associate with. Do not allow yourself to get into any situations that could bring this about for you. Surround yourself with good people. If the worst happens, talk to an authority figure that you trust.
If you are honest and have integraty in everything you do than when false allegation come up they will not fit who you are. If you stup to the level of those who are tring to set you up you are no better and deserve your fate, the better pla<x>yer will win. But no one can take away an honest person honesty or a persons integraty they are built and soild. Many people have tried to bring these individuals down usally to their own demise. Guard yourself with these things and the others will not harm you.
Video camera phone. Keep notes of conversations that you have with people who is suspect. Tell no one about the notes that you keep. Make sure notes are accurate especially with dates and times, and trust only yourself.
Surround yourself with positive people..
Find leverage. If your being set up by someone then you should try and get some leverage to use against them. Anything that could put them on the spot for something they have done or something they are doing that they do not want out in the open. Find factual evidence to support your side of the story. If they set you up to take the fall for their mess then find solid evidence to debunk everything they are claiming. And deny everything, if you have an alibi, and you know your innocent then just keep the faith, your innocent until proven guilty.