AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   menu_item_setname() - way to get name? (https://forums.alliedmods.net/showthread.php?t=127489)

Drak 05-21-2010 18:51

menu_item_setname() - way to get name?
 
You can set a menu's entry text with: menu_item_setname()
but is there anyway to get the name?

I wanted to add a "*" at the end of each item, and check for it later on.

fysiks 05-21-2010 18:54

Re: menu_item_setname() - way to get name?
 
newmenus.inc
PHP Code:

/**
 * Retrieves info about a menu item.
 *
 * @param menu            Menu resource identifier.
 * @param item            Item identifier.
 * @param access        Variable to store access value.
 * @param info            Buffer to store item info.
 * @param infolen        Item info buffer length.
 * @param name            Buffer to store item display text.
 * @param namelen        Item name buffer length.
 * @param callback        Callback ID.
 * @return                1 on success, 0 on failure.
 * @error                Invalid menu resource.
 */
native menu_item_getinfo(menuitem, &accessinfo[], infolenname[]=""namelen=0, &callback); 


Drak 05-22-2010 15:00

Re: menu_item_setname() - way to get name?
 
Quote:

Originally Posted by fysiks (Post 1187251)
newmenus.inc
PHP Code:

/**
 * Retrieves info about a menu item.
 *
 * @param menu            Menu resource identifier.
 * @param item            Item identifier.
 * @param access        Variable to store access value.
 * @param info            Buffer to store item info.
 * @param infolen        Item info buffer length.
 * @param name            Buffer to store item display text.
 * @param namelen        Item name buffer length.
 * @param callback        Callback ID.
 * @return                1 on success, 0 on failure.
 * @error                Invalid menu resource.
 */
native menu_item_getinfo(menuitem, &accessinfo[], infolenname[]=""namelen=0, &callback); 


Oops. I never saw the "name[]=" Thank you. :crab:


All times are GMT -4. The time now is 03:51.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.