If you paid for something on a credit card, that's a credit to Liabilities:Credit Card, which means you will have to debit Expenses:Others. That's what you'd do if you bought something for yourself, for example if you bought an airline ticket:
Dr Cr
Expenses:Travel $400
Liabilities:Credit Card $400
But that's not what you want in this case because you didn't incur any expense. Your friend's expense is not your expense. You don't want to debit any expense account at this point. Your friend owes you money: that's an asset to you, not an expense.
Instead, you could make an "accounts receivable" asset account, representing money you are owed. Then, buying an airline ticket for a friend on your credit card looks like this:
Dr Cr
Assets:Accounts Receivable $400
Liabilities:Credit Card $400
Since you have increased your assets and your liabilities by the same amount your net worth has not changed, which is what you'd expect.
When your friend reimburses you with cash:
Dr Cr
Expenses:Cash $400
Assets:Accounts Receivable $400
it should appear as a rebate in both accounts, which it doesn't
Not so!
When you receive the cash, you've "spent" it, and your net worth decreases by $400. This seems counterintuitive, but it's consistent with your system where you consider cash spent when you get it. (I use the same system BTW, and it's a fine simplification if you don't need that level of detail.) The nice thing about double-entry accounting is it forces you to acknowledge an expense regardless of how you paid for it.
If it doesn't make sense, consider an alternative where your friend buys you an airline ticket instead of reimbursing you in cash. You've spent (indirectly) your money on an airline ticket: that's a debit to an expense account, even though you didn't directly pay for it. You "paid" by reducing the amount your friend owes you, which is an asset.
If you were to deposit this cash in your checking account:
Dr Cr
Assets:Checking $400
Expenses:Cash $400
Now you've "unspent" the cash with the credit to Expenses:Cash, and presumably you'll later use your checking account to pay the credit card bill. Your assets (checking) and liabilities (credit card) have increased by equal amounts, and you're back to a net zero change in net worth.