Reciting another artist’s lyrics verbatim is the most direct way to show love to your mentors. From Drake rapping Ma$e’s “Who’s hot, who’s not” verse in “Worst Behavior” to J. Cole citing 50 Cent’s “I love you like a fat kid loves cake” line in “Sparks Will Fly,” the references are everywhere. But they can go over listeners' heads if the source material isn't made clear.
It’s a very fine line for an artist to walk, and a lot of people might criticize the decision. Lots of artists can successfully get away with taking old lines from hip-hop archives, slightly rewording them, and passing it off as “paying tribute” to their fanbase. The more well known the line is, the more likely people will believe that an artist is genuinely trying to pay tribute rather than surreptitiously trying to bite. If you want to pay tribute to Eazy-E, for example, you’d be better off with, “Cruisin down the street in my 6-4” than any other line.
However, if you happen to have some kind of personal relationship with the artist you're referencing, there's a certain level of protection. A good example: Jay Z opening "A Dream" with, “It was all a dream.” Biggie was his mentor, the two were personally close, and the original line is so famous that it has basically become ubiquitous in popular culture and the hip-hop vernacular—no casual fan is going to hear that opening line and not immediately associate it with Biggie. As a general rule, the less well known the line and the less obvious the origin, the more likely a rapper is trying to pass it off as their own without credit.