From Official DarkRP Wiki
Revision as of 14:52, 31 October 2015 by DarkRPBot (talk | contribs) (Wikibot updated DarkRP documentation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Hook name canBuyAmmo(Player ply, table ammoTable)
Whether a player can buy ammo.
Returns: boolean canBuy, boolean suppressMessage, string message, number price
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.darkrp.com/index.php?title=Hooks/Shared/canBuyAmmo]canBuyAmmo hook[/url][/b]


  1. ply (Player)
  2. The player.

  3. ammoTable (table)
  4. The table, as defined in the a ammo file.

Return values

  1. canBuy (boolean)
  2. Whether it can be bought.

  3. suppressMessage (boolean)
  4. Suppress the notification message when it cannot be bought.

  5. message (string)
  6. A replacement for the message that shows if it cannot be bought.

  7. price (number)
  8. An optional override for the price.