Called when a player clicks the Purchase button in a fuel station.
Used in: VCMod Main addon.
Server GM:VC_canPurchaseFuel(Entity ply, Entity ent, Integer purchased, Integer toPurchase, Integer price, String type)
1. Entity ply; Player
The rich player.
2. Entity ent; Station
The station entity that is used.
3. Integer purchased; Purchased
How much fuel is already purchased in the machine, this is before this transaction.
4. Integer toPurchase; To Purchase
How much will be purchased.
5. Integer price; Price
How much the player will pay for the toPurchase amount.
6. String type; Fuel type
What is the given fuel type.
1. Boolean If it should allow player to enter the seat.
hook.Add("VC_canPurchaseFuel", "VC_canPurchaseFuel", function(ply, ent, purchased, toPurchase, price, type) print("Player :"..ply:Nick().." is attempting to purchase "..toPurchase.." amount of "..type.." fuel. Restricting.") local canenter = false return canenter end)