If your friend is flaky, do not take it personally. Accept it and use strategies to cope up with their flakiness. For example, invite those who do not flake on plans along with your flaky friend. If the flaky friend comes, it will be nice. But if they do not come, it will not make much difference to you.