AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   open the /menu commands with "M" (https://forums.alliedmods.net/showthread.php?t=332865)

shaleval1 06-05-2021 10:48

open the /menu commands with "M"
 
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?

Supremache 06-05-2021 11:07

Re: open the /menu commands with "M"
 
Quote:

Originally Posted by shaleval1 (Post 2748960)
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"


fysiks 06-05-2021 13:40

Re: open the /menu commands with "M"
 
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".

shaleval1 06-05-2021 13:52

Re: open the /menu commands with "M"
 
Quote:

Originally Posted by Supremache (Post 2748962)
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

Supremache 06-05-2021 14:01

Re: open the /menu commands with "M"
 
Quote:

Originally Posted by shaleval1 (Post 2748975)
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"


shaleval1 06-05-2021 14:14

Re: open the /menu commands with "M"
 
Quote:

Originally Posted by Supremache (Post 2748976)
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 06-05-2021 14:28

Re: open the /menu commands with "M"
 
Quote:

Originally Posted by fysiks (Post 2748974)
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

fysiks 06-05-2021 14:45

Re: open the /menu commands with "M"
 
Quote:

Originally Posted by shaleval1 (Post 2748980)
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.


All times are GMT -4. The time now is 19:52.

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