Hooks/Server/canTax

From DarkRP
Hook
Hook name canTax(Player ply, number tax)
Description:
Called before a player pays taxes. This hook differs from onPaidTax in that this hook can prevent the taxing and change the tax amount.
Returns: boolean shouldTax, number tax
Realm:
BBCode Link: [b][url=http://wiki.darkrp.com/index.php?title=Hooks/Server/canTax]canTax hook[/url][/b]

Parameters[edit]

  1. ply (Player)
  2. The player who was taxed.

  3. tax (number)
  4. The amount of money that is about to be taxed from the player.

Return values[edit]

  1. shouldTax (boolean)
  2. Whether the player is to be taxed. Return false here to prevent the player from being taxed.

  3. tax (number)
  4. Overrides the amount of money that is taxed.