Raised This Month: $32 Target: $400
 8% 

Solved [L4D2] How to achieve this menu


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
flash_cat
Junior Member
Join Date: Jul 2022
Old 07-17-2022 , 23:36   [L4D2] How to achieve this menu
Reply With Quote #1

Image example
https://i.imgur.com/AJDGnqi.jpg

"WS" Up and down selection
"AD" Change the content of the cursor

It would be great if there was a similar demo

Last edited by flash_cat; 09-25-2022 at 00:09.
flash_cat is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 07-18-2022 , 04:59   Re: [L4D2] How to achieve this menu
Reply With Quote #2

Probably tracking in with OnPlayerRunCmd and redisplaying the menu to the client.
Not so easy if it was made like this.
__________________
Marttt is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 07-19-2022 , 16:47   Re: [L4D2] How to achieve this menu
Reply With Quote #3

Edit: I've written a whole plugin "Extra Menu API" to allow other plugins to create menus easily with different options. Supports multiple pages, selectable on/off entries, increment/derecrement values with min/max value, selectable only or non-selectable entries. Triggers a forward on selection for plugins to then do stuff from that. Whole plugin seems to be working good without issues, will release once tested more.



Here's a proof of concept. Maybe it could be done better but this is what I came up with.

Freezes player in place while menu is open. W/S to move up/down the menu. A/D turn the selected entry off/on.

You could use the characters "○" and "●" for off/on instead of [ ] and [X] as shown in the screenshot/example code.

Don't know how many menu entries can be entered, you would have to test and please report back the max limit.

Thanks to "Sreaper" for help with the characters.

If you use this in a plugin, please credit me for the menu and link here what you made!



Edit: Code deleted, full plugin with API will be released soon.
__________________

Last edited by Silvers; 07-25-2022 at 08:33.
Silvers is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 07-30-2022 , 11:13   Re: [L4D2] How to achieve this menu
Reply With Quote #4

I have posted the full plugin: Extra Menu API
__________________
Silvers is offline
flash_cat
Junior Member
Join Date: Jul 2022
Old 09-25-2022 , 00:19   Re: [L4D2] How to achieve this menu
Reply With Quote #5

Many thanks to Silvers for completed this plugin
flash_cat 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 03:48.


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