Wikipedia says
"The film's plot was loosely styled after Akira Kurosawa's 1954 samurai cinema film, Seven Samurai.
Sholay is a defining example of the Dacoit Western film, combining the conventions of Indian dacoit films, especially Mehboob Khan's Mother India (1957) and the Dilip Kumar and Nitin Bose film Gunga Jumna (1961), with that of Westerns, especially Sergio Leone's Spaghetti Westerns such as Once Upon a Time in the West (1968) as well as The Magnificent Seven (1960). It also has some plot elements borrowed from the Indian films Mera Gaon Mera Desh (1971) and Khote Sikkay (1973).
A scene depicting an attempted train robbery was inspired by a similar scene in Gunga Jumna (1961), and has also been compared to a similar scene in North West Frontier (1959). A scene showing the massacre of Thakur's family has been compared with the massacre of the McBain family in Once Upon a Time in the West. Sholay may have also been influenced by Sam Peckinpah's Westerns, such as The Wild Bunch (1969) and Pat Garrett and Billy the Kid (1973), and George Roy Hill's Butch Cassidy and the Sundance Kid (1969)."
Even A fistful of dollars was an unofficial and unlicensed remake of Akira Kurosawa's 1961 film Yojimbo;, Krosawa insisted that Leone had made "a fine movie, but it was my movie." This led to a lawsuit from Toho, Yojimbo's production company. Leone ignored the resulting lawsuit, but eventually settled out of court, reportedly for 15% of the worldwide receipts of A Fistful of Dollars and over $100,000.
2