Part of TPG namespace
TPG.Economy.RefundActivePurchases(ply)Description
Hand a player back everything they've paid into the vehicles they still have standing, and remove those vehicles. This is deliberately NOT a general refund -- a destroyed tank stays a true purchase, that's the whole model. It exists for the one case where the game moved the player instead of the player moving: a scramble drops you on the other side of the map with your build parked in what is now enemy spawn. Removing the vehicle as part of the refund is what keeps it a relocation rather than a way to end up with the money and the tank. con.TPG_BilledPoints is the running total actually paid for that contraption (initial purchase plus any post-spawn modifications billed by SettleRebill), so it's exactly the right number to give back. No-op if the economy isn't active. invalid, or they own nothing billed.
Parameters
| Name | Type | Description |
|---|---|---|
ply | Player |
Returns
| Type | Description |
|---|---|
number | Total refunded; 0 if the economy is off, the player is |
Examples
No examples available.
Used In
No usages found in the codebase.