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

CSGO disable first options in map vote menu


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Spyrek
Senior Member
Join Date: Jun 2009
Old 02-23-2017 , 09:09   CSGO disable first options in map vote menu
Reply With Quote #1

Hello,
I'm trying to edit the mapchooser plugin to disable first 3 choices in map vote menu, but without success. The first options 1-3 is still selectable.
This is my code:

PHP Code:
g_VoteMenu = new Menu(Handler_MapVoteMenuMENU_ACTIONS_ALL);
    
g_VoteMenu.SetTitle("Vote Nextmap");
    
g_VoteMenu.AddItem(""""ITEMDRAW_DISABLED);
    
g_VoteMenu.AddItem(""""ITEMDRAW_DISABLED);
    
g_VoteMenu.AddItem(""""ITEMDRAW_DISABLED); 
I have tried also ITEMDRAW_RAWLINE, but still nothing.

Edit:
Changing MENU_ACTIONS_ALL to MenuAction_Display | MenuAction_End | MenuAction_DisplayItem | MenuAction_Cancel partially solves the problem, but it creates pagination: 4-6 map names, 7 empty, 8 "Next". How to display map names on positions 4-8 without pagination?

Edit2: Fixed by adding line:
SetMenuPagination(g_VoteMenu, MENU_NO_PAGINATION);

Last edited by Spyrek; 02-23-2017 at 18:33.
Spyrek is offline
OSWO
Senior Member
Join Date: Jul 2015
Location: United Kingdom, London
Old 02-23-2017 , 09:24   Re: CSGO disable first options in map vote menu
Reply With Quote #2

You need to populate it with either blank text, you cannot have an item with no text.

Try AddItem("", " ", ITEMDRAW_DISABLED);
__________________
SourceTimer | WeaponSkins++ | BasePlugins++ https://github.com/OSCAR-WOS
OSWO is offline
alexnet
New Member
Join Date: Nov 2017
Old 08-18-2018 , 15:21   Re: CSGO disable first options in map vote menu
Reply With Quote #3

Quote:
Originally Posted by Spyrek View Post
Hello,
I'm trying to edit the mapchooser plugin to disable first 3 choices in map vote menu, but without success. The first options 1-3 is still selectable.
This is my code:

PHP Code:
g_VoteMenu = new Menu(Handler_MapVoteMenuMENU_ACTIONS_ALL);
    
g_VoteMenu.SetTitle("Vote Nextmap");
    
g_VoteMenu.AddItem(""""ITEMDRAW_DISABLED);
    
g_VoteMenu.AddItem(""""ITEMDRAW_DISABLED);
    
g_VoteMenu.AddItem(""""ITEMDRAW_DISABLED); 
I have tried also ITEMDRAW_RAWLINE, but still nothing.

Edit:
Changing MENU_ACTIONS_ALL to MenuAction_Display | MenuAction_End | MenuAction_DisplayItem | MenuAction_Cancel partially solves the problem, but it creates pagination: 4-6 map names, 7 empty, 8 "Next". How to display map names on positions 4-8 without pagination?

Edit2: Fixed by adding line:
SetMenuPagination(g_VoteMenu, MENU_NO_PAGINATION);


so I did try it sorry I'm from Russia and I hope that you understand my English
Attached Files
File Type: sp Get Plugin or Get Source (mapchooser.sp - 223 views - 33.6 KB)

Last edited by alexnet; 08-18-2018 at 15:22.
alexnet 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 16:29.


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