A man has been warned he is facing a “substantial” jail sentence after he admitted killing another man.