Called before money is checked in a players wallet. This is mostly for custom gamemode compatibility.
Used in: VCMod Main, VCMod ELS addons.
Shared GM:VC_canAfford(Entity ply, Integer amount)
1. Entity ply; Player
Player who is doing it.
2. Integer amount; Amount
The amount of money.
1. Boolean Returning true will mean that he has enough money for purchase, false that he does not. Don't return anything to just check.
hook.Add("VC_canAfford", "customMoneyz_Has", function(ply, amount) print("Player :"..ply:Nick().." is checking if he has "..amount.." amount of money.") // Lets call our custom gamemode function disAwesomeGamemode.hasMoney(ply, amount) local can = false return can end)