John Hinckley, who shot President Reagan in 1981, has agreed to pay up to $2.9 million in potential book and movie profits to three others injured in the attack. Lawyers involved in the agreement told the Associated Press today that Hinckley, 39, signed off on the deal from the mental hospital where he has been confined since he was found innocent by reason of insanity. A movie or book deal may come next: Hinckley has said he wanted to kill the president in order to draw attention to his love for actress Jodie Foster. Lawyers said Hinkley would still get up to $3,000 a year of the profits for his personal use, $12,000 if he is ever released from the hospital. The rest would go to Reagan press secretary James Brady, who was permanently disabled in the shooting; and former Secret Service agent Timothy McCarthy and ex-cop Thomas Delahanty, each of whom suffered less serious injuries. The deal caps off a longtime legal battle initiated by the three victims.