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

[HELP] Get client's menu/panel selection without closing it


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
NewbSkiddy
Junior Member
Join Date: Mar 2017
Old 04-25-2017 , 14:44   [HELP] Get client's menu/panel selection without closing it
Reply With Quote #1

Hey! This might be a far reach, but what I am trying to do is collect when a client presses the hotkeys to switch weapons, and then use sourcemod to switch it for them as the menu blocks the weapon switch from going through.

Soooo, how would I get about doing this? I've tried out all sorts of stuff, but can't seem to make it work. Also, if anyone could answer what SetKeys actually does, I'd be really greatful. Can't find any info of it anywhere, seems like it might be a solution, no clue though. Thanks in advance!
NewbSkiddy is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 04-27-2017 , 03:52   Re: [HELP] Get client's menu/panel selection without closing it
Reply With Quote #2

Redraw the menu on selection.
__________________
Neuro Toxin is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 04-27-2017 , 15:18   Re: [HELP] Get client's menu/panel selection without closing it
Reply With Quote #3

Quote:
Originally Posted by Neuro Toxin View Post
Redraw the menu on selection.
^ This.
404UserNotFound is offline
Fyren
FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren
Join Date: Feb 2106
Old 04-28-2017 , 09:08   Re: [HELP] Get client's menu/panel selection without closing it
Reply With Quote #4

The menu API doesn't report back with the "slot" pressed, though you could attempt to guess it knowing what you're displaying and the index of the item chosen. I'd guess the slot commands are client-side only and nothing ends up going through the server.

From the SetKeys docs (here or here), it appears to let you choose which of the ten slots are used.
Fyren 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 04:39.


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