
945 N.E.2d 1239 (2011)
The PEOPLE of the State of Illinois, Plaintiff-Appellee,
v.
Spencer MARTIN, Defendant-Appellant.
No. 1-08-3588.
Appellate Court of Illinois, First District, Third Division.
March 23, 2011.
*1240 Michael J. Pelletier, Deputy Defender, Office of the State Appehate Defender (Brian E. Koch, of counsel), for Defendant-Appellant.
Anita Alvarez, State's Attorney, State's Attorney of Cook County (Alan J. Spellberg, Peter D. Fischer, Marl R. Hatzenbuehler, of counsel), for Plaintiff-Appellee.

OPINION
Justice NEVILLE delivered the judgment of the court, with opinion.
After a bench trial, the trial court found the defendant, Spencer Martin, guilty of *1241 the attempted murder and the attempted armed robbery of Erlin Pinnix. On appeal, Martin argues the court should not have allowed the State to present evidence that he shot someone else a month before the attempted murder of Pinnix. Martin also contends that the court committed plain error when it admitted evidence (1) that Pinnix's cousin told Pinnix that Martin offered to pay Pinnix not to testify; (2) that Pinnix discussed the offer with someone else; and (3) that Martin met Pinnix and offered Pinnix cash not to testify. Because defense counsel failed to object to these three pieces of evidence, Martin argues that he received ineffective assistance of counsel.
We find that evidence that the prior shooting involved the same gun justified the court's decision to permit the evidence of the other crime to bolster the identification of Martin as the offender here. The record does not show that the trial court made any inappropriate use of the evidence of what Pinnix's cousin told Pinnix or of Pinnix's discussion of the offer with another man. Because Pinnix acted as an agent of the State, trying to elicit incriminating evidence when he met with Martin, Martin's counsel should have objected to the evidence of what Martin said to Pinnix in that meeting and the trial court should have excluded that evidence. However, we find no reversible error because the admissible evidence overwhelmingly proved Martin guilty.

BACKGROUND
In the early morning hours of February 4, 2006, Pinnix drove to a gas station on the north side of Chicago to buy some food. As he paid for the food, a man walked up next to him and put a gun to his head. The man said, "Gimme what you got." Pinnix reached into his pocket. When the man looked away, Pinnix grabbed the gun. The men struggled for control of the gun. During the struggle, the gun discharged and injured Pinnix. The man walked away, then returned a few seconds later, aimed the gun at Pinnix and pulled the trigger. The gun jammed. The man walked away again, and again he turned around, approached Pinnix, aimed the gun and pulled the trigger. Again the gun jammed. The gunman left the scene in a van. Pinnix drove himself to the hospital.
Police officers who investigated the incident watched a video recording from the gas station's security camera. The man who shot the gun appeared to have braided hair. The officers showed Pinnix an array of six photographs, of which two depicted men with braided hair. Pinnix chose one of those photographs, the picture of Martin, as a photograph of the man who shot him. In a lineup at the police station, Pinnix identified Martin again as the shooter.
Investigators conducted ballistic tests on the shell casings found at the gas station and discovered that the bullets came from the same gun that someone had used to shoot Johnnie Williams and another man at a restaurant on January 14, 2006. Police showed Williams an array of photographs, and he chose the picture of Martin as the picture of the man who shot him. Williams identified Martin again in a lineup at the police station.
In March 2006, a grand jury indicted Martin for the attempted first degree murder and the attempted armed robbery of Pinnix.
On August 19, 2006, Pinnix went to the jail to visit his cousin, Ivan Byers. Martin came to the same visiting room at the same time, because his girlfriend came to the jail to visit him. Martin talked to Byers in jail, and later Pinnix came to the jail to talk to Martin. Pinnix wore an *1242 audio transmission device so that police could listen to his conversation with Martin.
Before trial, the State moved for permission to introduce evidence that Martin shot Williams and that Martin sought to bribe Pinnix. The trial court granted the motion.
At the bench trial, Pinnix again identified Martin as the man who shot him. He added that he recognized Martin from the neighborhood, but he had never spoken to Martin, whom he knew only as Spencer. The State played the video recording of the incident at trial, and the unclear video showed a flash, which Pinnix identified as the gunshot which occurred during the struggle, at a point just out of the camera's range. A man who looked like Martin then appeared on screen, aiming a gun, walking away, and returning and aiming the gun again, before he left the scene in a van.
On cross-examination, Pinnix testified that he had drunk one beer on the night of February 3 to the morning of February 4. The State stipulated that tests at the hospital showed that Pinnix had a blood alcohol level of .17 and that he also tested positive for cannabinoids.
Johnnie Williams testified that on January 14, 2006, he and three other men went to a restaurant on the south side of Chicago. They bumped into two men walking in the other direction on the sidewalk. The six men started arguing and then fighting. One of the two unfamiliar men started shooting. The bullets struck Williams and one of his friends. Williams and his friends went to the hospital. He identified Martin in court as the man who shot him. The parties stipulated that tests showed that bullets found near the restaurant on the night of the shooting came from the same gun as the one used to shoot Pinnix.
Byers testified that when Pinnix entered the visiting room at the jail on August 19, 2006, he and Martin looked at each other and Pinnix said, "[Y]ou shot me." Martin answered, "Be cool, just be cool." Two weeks later Martin asked Byers if Pinnix would take money and weed not to come to court to testify against him. Byers answered that he would discuss it with Pinnix. Defense counsel did not object to Byers's testimony that he called Pinnix to tell him about Martin's offer, and he later told Martin Pinnix would accept the deal. Martin confessed to Byers that he shot Pinnix because he thought Pinnix had some money.
Pinnix added more detail about his trip to the jail to visit Martin. He testified that he learned that Martin had offered to pay him to stay out of court. Defense counsel objected, and the court allowed the testimony not as evidence that Martin made such an offer, but only to explain why Pinnix went to meet Martin in the jail. Pinnix testified that he told police what he had heard, and he agreed to wear a wire when he went to the jail. After the court heard the recording of the conversation, which required some translation from the vernacular, Pinnix explained that in that conversation Martin offered Pinnix $3,000 not to come to court. Pinnix testified that he was "supposed to receive payment from some people of Spencer Martin." Pinnix testified that he later discussed the payments with Robert Hammond. The prosecutor asked, "To your knowledge was Robert in contact with Spencer Martin?" The court sustained defense counsel's prompt objection to the hearsay. Martin never paid Pinnix not to testify.
The trial court found Pinnix's identification of Martin as the shooter very credible and well corroborated by the video recording, and supported by Williams's testimony about the earlier shooting and Byers's testimony *1243 about the bribe. The court found Martin guilty of attempted murder and attempted armed robbery.
The court denied Martin's posttrial motion. At the sentencing hearing, the court expressly found, in light of Martin's extensive criminal history, that society needed protection from Martin. The court sentenced Martin to 18 years in prison for the attempted murder and to 6 years in prison for the armed robbery, with Martin to serve the sentences consecutively. Martin now appeals.

ANALYSIS
Martin objects to four separate parts of the evidence against him. He acknowledges that his trial counsel did not preserve for review the issues of whether the court should have permitted (1) Byers to testify about what he said to Pinnix and to Martin; (2) Pinnix to testify about his discussion with Hammond; and (3) the State to present evidence about Pinnix's discussions with Martin in prison, after Pinnix agreed to wear a wire and to try to elicit incriminating statements from Martin. Trial counsel preserved only one issue Martin asks us to address, and that is the issue of whether the court should have allowed Williams to testify about the shooting on January 14, 2006.

Evidence That Martin Shot Williams
The trial court should not admit evidence of other crimes to show the defendant's propensity to commit crimes, but the court may admit such evidence for other purposes, such as when it helps establish the identity of the perpetrator of the crime. People v. McKibbins, 96 Ill.2d 176, 182, 70 Ill.Dec. 474, 449 N.E.2d 821 (1983). Some similarity must tie the two crimes together to make the identification of the defendant as the perpetrator of a different offense useful as evidence that he committed the offense at issue. People v. Quintero, 394 Ill.App.3d 716, 725, 333 Ill Dec. 655, 915 N.E.2d 461 (2009). For example, in People v. Walls, 33 Ill.2d 394, 398, 211 N.E.2d 699 (1965), the trial court properly admitted evidence that the defendant and his friends stole the car in which the rape at issue occurred, because that evidence helped establish the defendant's proximity in time and place to the crime, and it corroborated part of the victim's testimony about her ordeal.
Here, the gun tied the crime against Williams to the crime against Pinnix. The two crimes occurred in Chicago less than three weeks apart. The crimes otherwise had little in common: one occurred on the north side as part of an armed robbery, while the other occurred on the south side when a man on the street took offense to a bump. One crime involved one man directly confronting his victim, while the other involved a group of men quarreling and fighting. However, we find that the connection between the gun used against Williams and the gun used against Pinnix, together with the temporal proximity of the crimes, suffices to make the identification of Martin as the man who shot Williams useful as evidence that Martin also shot Pinnix. See People v. Coleman, 158 Ill.2d 319, 333-35, 198 Ill.Dec. 813, 633 N.E.2d 654 (1994) (where forensic analysis showed that the gun used for a murder was the same gun used in a separate shooting a few days later, identification of the defendant as the shooter in the second shooting was admissible as evidence that he committed the earlier murder). Therefore, we hold that the trial court did not abuse its discretion when it permitted Williams to testify that Martin shot him.

Evidence That Pinnix Spoke With Hammond
Pinnix testified, without objection, that after Martin promised to pay him to *1244 stay out of court, Pinnix discussed the payments with Hammond. Martin now argues both that the court committed plain error by allowing the testimony and that defense counsel provided ineffective assistance by failing to object. We cannot find ineffective assistance unless counsel's errors had a prejudicial effect. See People v. Peeples, 205 Ill.2d 480, 512, 275 Ill.Dec. 870, 793 N.E.2d 641 (2002). Before we can find plain error, we must first find that the trial court erred. See People v. Harris, 225 Ill.2d 1, 24, 310 Ill.Dec. 351, 866 N.E.2d 162 (2007).
Defense counsel objected when the prosecutor sought to connect Martin to the conversations between Pinnix and Hammond. The court sustained counsel's objection to the question, "To your knowledge was Robert in contact with Spencer Martin?" The trial judge, in this bench trial, showed that he understood that the prosecutor had failed to show any connection between Martin and the conversations between Pinnix and Hammond. We presume that the trial court made no inappropriate use of the irrelevant testimony about conversations with Hammond. See People v. Kerwin, 159 Ill.2d 436, 446, 203 Ill.Dec. 219, 639 N.E.2d 539 (1994).
Because Martin cannot show that the trial court used the testimony about Pinnix's conversations with Hammond as evidence against Martin, we cannot find that the failure to object had the prejudicial effect needed to show ineffective assistance of counsel. See Peeples, 205 Ill.2d at 512, 275 Ill.Dec. 870, 793 N.E.2d 641. In addition, because the court sustained the objection to the attempt to tie Martin to the conversations, we cannot say that the court committed any error, let alone plain error. See Harris, 225 Ill.2d at 24, 310 Ill.Dec. 351, 866 N.E.2d 162.

Evidence of What Byers Told Pinnix
Byers testified, without objection, that he called Pinnix from the jail and told Pinnix that Martin offered to pay him not to testify. Byers added, again without objection, that he told Martin that Pinnix accepted the deal. Again, Martin argues that the admission of the evidence, and the failure to object, shows both plain error and ineffective assistance of counsel. Defense counsel objected to Pinnix's related testimony that he heard that Martin offered to pay him not to testify. The court overruled the objection, noting that the testimony could explain why Pinnix went to see Martin in jail, although the court would not allow the testimony as evidence that Martin offered to pay Pinnix not to come to court. Again, we must presume that the trial court made no improper use of Byers's testimony about what he told Pinnix and Martin. See Kerwin, 159 Ill.2d at 446, 203 Ill.Dec. 219, 639 N.E.2d 539. The trial court should not have used the testimony for the hearsay purpose of proving the offer and its acceptance, but the court could use the testimony for the nonhearsay purpose of explaining why Pinnix and Martin agreed to meet in the jail. Because Martin cannot show that the trial court misused the hearsay testimony as evidence, we can find no prejudice and therefore no showing of ineffective assistance of counsel. See Peeples, 205 Ill.2d at 512, 275 Ill.Dec. 870, 793 N.E.2d 641. Accordingly, we cannot find that the court committed any error, let alone plain error. See Harris, 225 Ill.2d at 24, 310 Ill.Dec. 351, 866 N.E.2d 162.

Evidence of What Martin Said to Pinnix
Finally, defense counsel failed to object to the recording of the conversation between Pinnix and Martin in the jail. Martin now contends that the conversation violated his right to counsel protected by *1245 the sixth amendment to the United States Constitution. According to Martin, the court committed plain error by admitting the conversation into evidence, and trial counsel provided ineffective assistance by failing to object.
In Maine v. Moulton, 474 U.S. 159, 176, 106 S.Ct. 477, 88 L.Ed.2d 481 (1985), the United States Supreme Court restated the applicable principles as follows:
"The Sixth Amendment guarantees the accused, at least after the initiation of formal charges, the right to rely on counsel as a `medium' between him and the State. As noted above, this guarantee includes the State's affirmative obligation not to act in a manner that circumvents the protections accorded the accused by invoking this right. * * * [K]nowing exploitation by the State of an opportunity to confront the accused without counsel being present is as much a breach of the State's obligation not to circumvent the right to the assistance of counsel as is the intentional creation of such an opportunity. Accordingly, the Sixth Amendment is violated when the State obtains incriminating statements by knowingly circumventing the accused's right to have counsel present in a confrontation between the accused and a state agent."
The State formally charged Martin with the attempted murder of Pinnix at the latest by March 2006, when the grand jury indicted Martin for the crime. See Kirby v. Illinois, 406 U.S. 682, 688-89, 92 S.Ct. 1877, 32 L.Ed.2d 411 (1972). Thus, Martin had a right to counsel for all encounters with State agents after that date. See Moulton, 474 U.S. at 176, 106 S.Ct. 477. Pinnix became a state agent when he agreed to wear a wire while he talked with Martin. See Massiah v. United States, 377 U.S. 201, 84 S.Ct. 1199, 12 L.Ed.2d 246 (1964) (a codefendant became a government agent when he agreed to wear a wire for discussions with the defendant).
The State answers that Martin and Pinnix did not discuss the substance of the testimony Martin hoped to prevent the court from hearing. However, the rule of Moulton precludes any use by the State of the conversation between Pinnix and Martin in court proceedings to determine Martin's guilt of any crime for which the State had formally charged him. Moulton, 474 U.S. at 176, 106 S.Ct. 477; see also People v. Brown, 358 Ill.App.3d 580, 591-93, 294 Ill.Dec. 788, 831 N.E.2d 1113 (2005).
Therefore, we find that defense counsel should have objected to evidence of the conversation between Pinnix and Martin for which Pinnix agreed to wear a wire. We also find that if counsel had objected, the trial court should have found the evidence inadmissible. See Moulton, 474 U.S. at 176, 106 S.Ct. 477; Brown, 358 Ill.App.3d at 593, 294 Ill.Dec. 788, 831 N.E.2d 1113. But we find that Martin cannot meet his burden of showing that he would have achieved a better result but for counsel's error. While the State introduced inadmissible evidence of Pinnix's recorded conversation with Martin, the State also introduced admissible evidence that Pinnix, who recognized Martin from the neighborhood, identified Martin as the man who shot him after a struggle in which Pinnix had an excellent opportunity to view his assailant, and a video recording of the shooting which corroborated Pinnix's account and showed a man who looked like Martin pointing a gun. Ballistics tests also showed that the gun that shot a bullet into Pinnix also shot a bullet into Williams about three weeks before the shooting of Pinnix, and Williams identified Martin as the man who shot him. The State also presented Byers's testimony that Martin offered to give Pinnix money *1246 and marijuana if he would refuse to testify against Martin. Most significantly, Byers testified that Martin confessed to Byers that Martin shot Pinnix after trying to rob him. The aforementioned admissible evidence overwhelmingly shows that Martin attempted to commit both armed robbery and first degree murder on February 4, 2006. Because Martin has not established a reasonable probability that he would have achieved a better result if defense counsel had not erred, Martin has not shown that he received ineffective assistance of counsel.
Neither can we find that plain error analysis warrants reversal. To find plain error, we must find either that the error could have changed the outcome of a case with closely balanced evidence, or it "affected the fairness of the defendant's trial and challenged the integrity of the judicial process." People v. Herron, 215 Ill.2d 167, 187, 294 Ill.Dec. 55, 830 N.E.2d 467 (2005). Martin does not argue that the error here challenged the integrity of the judicial process. Instead, he argues that the evidence that he committed the offenses balanced closely against the evidence that Pinnix misidentified him as the offender, stressing that marijuana and alcohol severely affected Pinnix's perception at the time of the fight, and he lied under oath about that influence, and police used a suggestive photo array to induce Pinnix and Williams to identify Martin as the man who shot them. The trial court found Pinnix's identification of Martin credible because he had no motive to lie, and the court found the photo array not impermissibly suggestive. We agree. We find the admissible evidence against Martin overwhelming, and therefore we find no plain error. See Herron, 215 Ill.2d at 187, 294 Ill.Dec. 55, 830 N.E.2d 467.

CONCLUSION
The trial court properly allowed Williams to testify that Martin shot him on January 14, 2006, because that testimony, with evidence that the gun used against Williams also shot the bullet that hit Pinnix, helped identify Martin as the perpetrator of the offense against Pinnix. The record shows no inappropriate use of Byers's testimony that he told Pinnix about Martin's offer, or that he told Martin that Pinnix accepted. The trial court also made no inappropriate use of evidence that Pinnix spoke with Hammond about Martin's offer. Finally, the State violated Martin's right to counsel when it used its agent, Pinnix, to elicit incriminating statements from Martin. However, we find that the evidence the State obtained did not affect the result here because the admissible evidence overwhelmingly proved Martin's guilt. Therefore, we affirm the trial court's judgment.
Affirmed.
Presiding Justice QUINN and Justice STEELE concurred in the judgment and opinion.
