Raised This Month: $51 Target: $400
 12% 

How to detect if selection of a menu is complete


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
TheSpaniard
Senior Member
Join Date: Jul 2017
Location: Hell
Old 09-23-2017 , 03:01   How to detect if selection of a menu is complete
Reply With Quote #1

I want to make csdm like weapon equip menu, how to detect if selection of a menu is complete so i can display another menu after it.

P.S. I studied csdm_equip plugin by bailopan but didn't understand a thing.
__________________
And I Am Back.
TheSpaniard is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 09-23-2017 , 03:25   Re: How to detect if selection of a menu is complete
Reply With Quote #2

Read this Sub-Menu
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
TheSpaniard
Senior Member
Join Date: Jul 2017
Location: Hell
Old 09-23-2017 , 03:28   Re: How to detect if selection of a menu is complete
Reply With Quote #3

Quote:
Originally Posted by wickedd View Post
Read this Sub-Menu
I dont want submenu i know how to make one, i want to display a entirely new menu after the player has chosen a value from previous menu.
__________________
And I Am Back.
TheSpaniard is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 09-23-2017 , 04:49   Re: How to detect if selection of a menu is complete
Reply With Quote #4

If you want to use the old menu you have to need a global variable g_iMenu_Selection[33][MAXKEYS=10] and fill the var it when in the menu displaying function


Recommended to use the newmenu system


Edit : i really dont understand what u want..
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 09-23-2017 at 04:57.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
TheSpaniard
Senior Member
Join Date: Jul 2017
Location: Hell
Old 09-23-2017 , 04:51   Re: How to detect if selection of a menu is complete
Reply With Quote #5

Quote:
Originally Posted by Natsheh View Post
If you want to use the old menu you have to need a global variable g_iMenu_Selection[33][MAXKEYS=10] and fill the var it when in the menu displaying function


Recommended to use the newmenu system
Yes, i am using the the new menu system it's more easier.
__________________
And I Am Back.

Last edited by TheSpaniard; 09-23-2017 at 04:53.
TheSpaniard is offline
TheSpaniard
Senior Member
Join Date: Jul 2017
Location: Hell
Old 09-23-2017 , 05:08   Re: How to detect if selection of a menu is complete
Reply With Quote #6

Quote:
Originally Posted by Natsheh View Post
Edit : i really don't understand what u want..
In CSDM when you spawn first you see primary weapon menu and after choosing a primary weapon you see a secondary weapon menu and then you choose a secondary menu.

There is no timer to the first menu so it will stay till you choose and immediately after choosing you see the the second menu.

i want to make two menu's like that.

@brief i want to put two consecutive menu's in a single plugin.

if you still don't understand see bailopan's csdm_equip sma
__________________
And I Am Back.
TheSpaniard is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 09-23-2017 , 05:18   Re: How to detect if selection of a menu is complete
Reply With Quote #7

wickedd is correct, the sub-menu example is exactly what you need. It's really quite trivial. Simply show the new menu when the player selects an item from the first menu.

Quote:
Originally Posted by wickedd View Post
Read this Sub-Menu
__________________
fysiks is offline
TheSpaniard
Senior Member
Join Date: Jul 2017
Location: Hell
Old 09-23-2017 , 05:22   Re: How to detect if selection of a menu is complete
Reply With Quote #8

Quote:
Originally Posted by fysiks View Post
wickedd is correct, the sub-menu example is exactly what you need. It's really quite trivial. Simply show the new menu when the player selects an item from the first menu.
Code:
switch(item)
{
case 1:
{
//your code here
submenu(id)
}
case 2:
{
//your code here
submenu(id)
}
}
or with set_task(1.0, "submenu")

like this?
__________________
And I Am Back.

Last edited by TheSpaniard; 09-23-2017 at 05:23.
TheSpaniard is offline
TheSpaniard
Senior Member
Join Date: Jul 2017
Location: Hell
Old 09-23-2017 , 06:27   Re: How to detect if selection of a menu is complete
Reply With Quote #9

How to add pages to menu
__________________
And I Am Back.
TheSpaniard is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 09-23-2017 , 06:46   Re: How to detect if selection of a menu is complete
Reply With Quote #10

Just add items, it will have pages if there are too many items for all to be displayed on a single page.
klippy 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 22:36.


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