Being disciplined, having self-control, and knowing the art of politely saying no is all you need here. There will always be peer pressure to break your diet or so. It's you who has to stay strong and fight such situations also including urges that come from within you.