Raised This Month: $ Target: $400
 0% 

Make menu from constants


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Paradox.
Member
Join Date: May 2013
Old 01-03-2014 , 09:43   Re: Make menu from constants
Reply With Quote #5

Quote:
Originally Posted by fysiks View Post
If you know a plugin that already does it, you can look at its code to see how the author did it.

Basically, you loop through all the items in the array and create the menu item based the iteration of the array.

PHP Code:
    for( new 0sizeof(test[]); i++ )
    {
        
menu_additem(menutest[i], ""0);
    } 
I don't understand the code from the plugin .Can you make me a clearly example ? And how can I make an option to be available only from players with ADMIN_LEVEL_H. Like menu_additem(menu,"item",0,ADMIN_LEVEL_H). And how to make the menu handler.

Last edited by Paradox.; 01-03-2014 at 12:14.
Paradox. is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:05.


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