Raised This Month: $ Target: $400
 0% 

[HELP] Menus .. Damn Menus


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Depresie
Veteran Member
Join Date: Nov 2013
Old 01-09-2016 , 11:25   [HELP] Menus .. Damn Menus
Reply With Quote #1

So, i tried to convert this menu to the new style menu, since i had more than 9 options, and i needed more pages
Now the thing is that i never worked with menus, so im sure i screwed somethings up..
I also found an issue, when i press exit on the second page, it goes to the previous page instead of quiting the menu...

Can anyone please check the code?
Especialy enum, plugint_init and show_menu_admin and the handler menu_admin...
Attached Files
File Type: sma Get Plugin or Get Source (zp50_admin_menu.sma - 558 views - 28.2 KB)
__________________
Depresie is offline
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 01-09-2016 , 12:10   Re: [HELP] Menus .. Damn Menus
Reply With Quote #2

Quote:
Originally Posted by Depresie View Post
i never worked with menus
No problem with that, just use a good deputation approach then.

I used them at my plugins. See how that goes for you.

Here you will find my code with it, I marked the lines where I used them (between lines 4.787 and 4.913), they are that DEBUG_LOGGER(...) messages:
https://github.com/addonszz/Galileo/blob/b84166b77b378f33ccfa12fb99ccd0c6a4af239e/scripting/galileo.sma#L4787-L4913

And here, at the last [SPOILER] tag (at the end of the commentary), you will find snippet to copy and paste:
https://forums.alliedmods.net/showpost.php?p=2381358&postcount=7
__________________
Plugin: Sublime Text - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective

Last edited by addons_zz; 01-17-2016 at 16:13. Reason: spelling fix
addons_zz is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 01-09-2016 , 12:30   Re: [HELP] Menus .. Damn Menus
Reply With Quote #3

ahm.. sorry, but i have no ideea about the things you just posted...

i converted the old menu to the new menu style and i have these lines and i have no ideea what they are and if they are supposed to be there anymore...
i just want someone to check the throw a look over the code to tell me if i messed up forgot something

PHP Code:
// Admin menu actions 
enum
 
{
     
ACTION_MAKE_NEMESIS 0,
     
ACTION_MAKE_SURVIVOR,
     
ACTION_MAKE_ASSASSIN,
     
ACTION_MAKE_SNIPER,
     
ACTION_MAKE_DRAGON,
     
ACTION_MAKE_NINJA,
     
ACTION_MAKE_TYRANT,
     
ACTION_INFECT_CURE,
     
ACTION_RESPAWN_PLAYER,
     
ACTION_START_GAME_MODE
 
}
 

 
// Menu keys
 
const KEYSMENU MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4|MENU_KEY_5|MENU_KEY_6|MENU_KEY_7|MENU_KEY_8|MENU_KEY_9|MENU_KEY_0
 

register_menu
("Admin Menu"KEYSMENU"menu_admin"
__________________

Last edited by Depresie; 01-09-2016 at 12:32.
Depresie is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 01-09-2016 , 12:32   Re: [HELP] Menus .. Damn Menus
Reply With Quote #4

I suggest you read this again or just copy the basic menu from that thread and use it in your plugin.
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 01-09-2016 , 14:57   Re: [HELP] Menus .. Damn Menus
Reply With Quote #5

"i converted the old menu to the new menu style and i have these lines and i have no ideea what they are and if they are supposed to be there anymore...
i just want someone to check the throw a look over the code to tell me if i messed up forgot something"
__________________
Depresie 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:32.


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