zp_items_register
Registers a custom item which will be added to the extra items menu of ZP. Note: The returned item ID can be later used to catch item selection events for the zp_item_select_() forwards.
Syntax
native zp_items_register(const name[], cost) /** * Returns an item's ID. * * @param name Item name to look for. * @return Internal item ID, or ZP_INVALID_ITEM if not found. */ native zp_items_get_id(const real_name[]) /** * Returns an item's name. * * @param itemid A valid item ID. * @param name The buffer to store the string in. * @param len Character size of the output buffer. * @return True on success, false otherwise. */ native zp_items_get_name(itemid, name[], len) /** * Returns an item's real name (used when registering the item). * * @param classid A valid item ID. * @param name The buffer to store the string in. * @param len Character size of the output buffer. * @return True on success, false otherwise. */ native zp_items_get_real_name(itemid, real_name[], len)
Usage
| name | Caption to display on the menu. |
| cost | Cost to display on the menu. |
Return
An — internal item ID, or ZP_INVALID_ITEM on failure.
Defined in
zp50_items.inc
at line 29
.
This documentation was automatically generated from source.