Raised This Month: $ Target: $400
 0% 

Menu System


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
vitorrossi
Senior Member
Join Date: Apr 2012
Location: NY, USA
Old 11-27-2012 , 14:26   Menu System
Reply With Quote #1

I have been basing myself off of https://forums.alliedmods.net/showth...highlight=menu

One thing I do not understand is why do I have to create and destroy menu for each ID. If all menus are the same, could I just create the menu once, and display it to players instead of creating and destroying each time?

Also, what is the difference between setting property (menu_setprop) and not setting it?

Last edited by vitorrossi; 11-27-2012 at 14:39.
vitorrossi is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-27-2012 , 14:57   Re: Menu System
Reply With Quote #2

Yes, create the menu once in plugin_init or where you want, store the menu index in a global variable (and don't destroy them, obviously).
Use menu_setprop when you want to set them to something different than default settings.
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 11-27-2012 at 14:57.
ConnorMcLeod is offline
vitorrossi
Senior Member
Join Date: Apr 2012
Location: NY, USA
Old 11-28-2012 , 14:03   Re: Menu System
Reply With Quote #3

Thank you
vitorrossi is offline
Reply



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 09:10.


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