HUD
Functions

GM: can Afford

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)

Arguments

1. Entity ply; Player
Player who is doing it.

2. Integer amount; Amount
The amount of money.

Returns

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.

Example

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)
Page modified:
...2018-11-02 09:24:34