Are we allowed to lie if the other person is trying to take advantage of us?

If you are sure that the other person is lying to take advantage, and you are able to get rid of him without lying, then lying is not allowed.
For example, if some one asks for financial help, you can tell him (I do not have this amount) and you make the intention that you do not have it in your pocket.