i wouldnt do it quite as you stated.
i wouldnt specify the gun, (if he only has one, this is a moot point), i would just offer to loan "x" amount, and use the gun as collateral, with the understanding that if he later doesnt want it back, or still cant pay you back, there is no hard feelings on your part.
if your in a position to do so, i would gift it back on a birthday or christmas, however, you may not be in a position to do this.
also, keep something in mind, never ever loan money expecting it back. call it a loan to the other person if you wish, but to yourself consider it a gift. and make sure your comfortable with that. if they pay it back, great, they gave you "x" amount of money. if not, no big deal.
i loaned money a couple times before following this rule, back in high school and right after. one i got back, one i didnt. trust me, if you think of it as a loan, it will come between you two eventually.
when i broke my leg and ankle and was unable to walk or work for 6 months, a close friend loaned me $800. after a couple months, i felt something between us, didnt like it, but had no way to pay the loan back. christmas time came, i decided to get him something small with what money i had, then thought, what if it upsets him? i have money for a gift but not to pay back part of my loan? started dreaming about it. the day the doctor told me i could start walking on it with the assistance of a cast and crutches, he told me not to worry about the loan, that my door always being open to him, and my ears always willing to listen was payment enough. when i started working, i still tried to pay him back, he refused. no more issues between us.
i tell you that story so you understand what your getting into, from his point of view as well.