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

open the /menu commands with "M"


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
shaleval1
Junior Member
Join Date: May 2021
Old 06-05-2021 , 10:48   open the /menu commands with "M"
Reply With Quote #1

Ey, guys.

My server has /menu for server's menu with commands, stats and such things.

Is it possible to make the button "M" opens the /menu on my server? For example, if someone presses M it opens the /menu instead of typing it, possible?
shaleval1 is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 06-05-2021 , 11:07   Re: open the /menu commands with "M"
Reply With Quote #2

Quote:
Originally Posted by shaleval1 View Post
Ey, guys.

My server has /menu for server's menu with commands, stats and such things.

Is it possible to make the button "M" opens the /menu on my server? For example, if someone presses M it opens the /menu instead of typing it, possible?
Just add this command to the plugin !!

PHP Code:
register_clcmd("chooseteam",    "Menu function"
__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.
Supremache is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-05-2021 , 13:40   Re: open the /menu commands with "M"
Reply With Quote #3

It is not possible to link a command to a specific keyboard key. You can only link it to a command that is send to the server. The proper solution is for each player to set up their own bind if they want to use a key to open the menu instead of forcing it be used when a player is trying to use another command like "chooseteam".
__________________
fysiks is offline
shaleval1
Junior Member
Join Date: May 2021
Old 06-05-2021 , 13:52   Re: open the /menu commands with "M"
Reply With Quote #4

Quote:
Originally Posted by Supremache View Post
Just add this command to the plugin !!

PHP Code:
register_clcmd("chooseteam",    "Menu function"
cant get it to work, can you help me adding it here?

https://forums.alliedmods.net/showthread.php?t=284324
shaleval1 is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 06-05-2021 , 14:01   Re: open the /menu commands with "M"
Reply With Quote #5

Quote:
Originally Posted by shaleval1 View Post
cant get it to work, can you help me adding it here?

https://forums.alliedmods.net/showthread.php?t=284324
add this line to public plugin_init() function
PHP Code:
register_clcmd("chooseteam""cmdMenu"
__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.
Supremache is offline
shaleval1
Junior Member
Join Date: May 2021
Old 06-05-2021 , 14:14   Re: open the /menu commands with "M"
Reply With Quote #6

Quote:
Originally Posted by Supremache View Post
add this line to public plugin_init() function
PHP Code:
register_clcmd("chooseteam""cmdMenu"
https://i.imgur.com/ZxozmsP.png
Like that? Still doesn't work ;( I'm the worst with plugins xd
shaleval1 is offline
shaleval1
Junior Member
Join Date: May 2021
Old 06-05-2021 , 14:28   Re: open the /menu commands with "M"
Reply With Quote #7

Quote:
Originally Posted by fysiks View Post
It is not possible to link a command to a specific keyboard key. You can only link it to a command that is send to the server. The proper solution is for each player to set up their own bind if they want to use a key to open the menu instead of forcing it be used when a player is trying to use another command like "chooseteam".
well I been playing with server that if you press M it opens the /menu
shaleval1 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-05-2021 , 14:45   Re: open the /menu commands with "M"
Reply With Quote #8

Quote:
Originally Posted by shaleval1 View Post
well I been playing with server that if you press M it opens the /menu
They aren't looking for the M key being pressed, they are looking for the chooseteam command being sent (unless they are and you are allowing them to slowhack you). If you changed your bind for chooseteam, it would go to that new key.
__________________
fysiks is offline
Reply


Thread Tools
Display Modes

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:35.


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