Tilak Varma hit his first hundred for India in the third T20 international against South Africa at Centurion.