People who act cocky when they're with their friends are annoying.
ご質問について、以下の表現が使えます:
People who act cocky when they're with their friends are annoying. 『仲間がいると気が大きくなって図に乗るタイプはウザい。』
実際に使うシンプルな例文としては、 He's quiet when he's alone, but gets cocky with his friends. It's annoying. 『一人だとおとなしいのに、仲間がいると図に乗る。ウザい。』