If you no longer are employed by the company you can not take out a "LOAN" on your 401K
Loans made agaisnt 401K plans are repaid over time through payroll deductions. In fact, if you take out a loan on your 401 while employed , then quit the job the loan becomes due and paybale by you in full.
You may be able to do a "WITHDRAWL" from your 401 to buy a home, but before you do talk to your tax professional to make sure you do not run into trouble.
Best of Luck!
Kawain Payne, Realtor