Add menu_item_setaccess native (#826)

* Add set access.

* Update newmenus.inc

* typo

* Update newmenus.inc
This commit is contained in:
shel
2020-05-29 23:40:35 +04:00
committed by GitHub
parent 1bc342a692
commit b9b4001bf9
2 changed files with 26 additions and 0 deletions

View File

@ -257,6 +257,17 @@ native menu_item_setcmd(menu, item, const info[]);
*/
native menu_item_setcall(menu, item, callback=-1);
/**
* Sets an item's access.
*
* @param menu Menu resource identifier.
* @param item Item identifier.
* @param access New access required by the player for access to the item.
* @return 1 on success, 0 on failure.
* @error Invalid menu resource.
*/
native menu_item_setaccess(menu, item, access=0);
/**
* Destroys a menu. Player menus will be cancelled (although may still linger
* on the HUD), and future attempts to access the menu resource will result in