MaxAmountPerWallet?

Hello everyone,
I wanna add one last function inside my BEP20 project and that is the max amount an wallet can hold.
I wanna set it to 2.5B. It looks like a job of 3 lines but a cant really find the solution.
If you can help me out i will be gratefull.
Regards,

Assuming the only way to get more tokens is by transferring from other addresses, at the end of your transfer function add this:

require(balances[recipient] <= 2500000000 * 10 ** decimals(), "token balance exceeds 2.5 bil");

Replace balances and recipient with the respective names in your contract.