zp_items_force_buy
Forces a player to buy an extra item.
Syntax
native zp_items_force_buy(id, itemid, ignorecost = false) /** * Appends text to an item being displayed on the extra items menu. * Use this on the item select pre forward. * * @param text Additional text to display. */ native zp_items_menu_text_add(const text[]) /** * Called when determining whether an item should be available to a player. * * Possible return values are: * - ZP_ITEM_AVAILABLE (show in menu, allow selection) * - ZP_ITEM_NOT_AVAILABLE (show in menu, don't allow selection) * - ZP_ITEM_DONT_SHOW (don't show in menu, don't allow selection) * * @param id Player index. * @param itemid Internal item ID. * @param ignorecost Whether item cost should be ignored. */ forward zp_fw_items_select_pre(id, itemid, ignorecost) /** * Called after a player selected an item from the extra items menu. * * @param id Player index. * @param itemid Internal item ID. * @param ignorecost Whether item cost should be ignored.
Usage
| id | Player index. |
| itemid | A valid extra item ID. |
| ignorecost | If set, item's cost won't be deduced from player. |
Return
True — on success, false otherwise.
Defined in
zp50_items.inc
at line 82
.
This documentation was automatically generated from source.