That’s the easy stuff. Earlier in this was discussed that someone living outside California could gift an off roster handgun to immediate family. The problem is, buying a firearm for someone else is a “strawman sale” and a violation of federal law. Yes, you can buy a firearm to gift to someone. You cannot buy a firearm FOR someone else.
For example, if a Californian calls Grandpa in Arizona and says “I’ll send you money to buy me an off roster Glock and send it to my local gunshop”, it could open Grandpa up to being prosecuted by the BATF for a strawman sale. There was a case some years ago where a civilian got a LEO friend to buy a Blue Lable Glock (special pricing available only to law enforcement) and send it to a local gunshop to be transferred on a Form 4473. BATFE prosecuted both for committing a strawman sale.