No, you can't win achievements or trophies in GTA 5 by utilizing cheat codes. When you use a cheat code, the achievements are disabled. In addition, if you use a cheat code, you will not be able to obtain any higher than bronze ratings in any of the missions. If you're utilizing cheat codes to restart from a checkpoint, you'll need to save the game.