AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Menu select bind (https://forums.alliedmods.net/showthread.php?t=299159)

Vliket 07-05-2017 10:26

Menu select bind
 
Greetings.

I have question about how to bind something in menu like :

I need to type in chat /hns and after that need to click on 6 to choose VIP items that will open new menu and in that menu i need to click on 5 and thats Invincible.

My question is how to bind this whole action on some key like F1 i know only how to bind say /hns in console but thats all :) i know that bind is something like menuselect;6;menuselect;5 etc.. can someone help me :) ?

say /hns then menuselect 6 and then menuselect 5

OciXCrom 07-05-2017 10:39

Re: Menu select bind
 
You can't on a key like F1. You can register commands such as drop, radio1, chat, spray, etc and put it there.

Vliket 07-05-2017 10:47

Re: Menu select bind
 
It was an example, but i saw guy who was using this command and it works for him i just forget it :x or its script idk.

Natsheh 07-05-2017 10:55

Re: Menu select bind
 
(bind F1 slot5) but only the client can execute this command..

PRoSToTeM@ 07-05-2017 21:17

Re: Menu select bind
 
Quote:

Originally Posted by OciXCrom (Post 2533546)
You can't on a key like F1.

You can hook F1 and F2 using cl_autobuy, cl_rebuy, cl_setautobuy...

fysiks 07-05-2017 22:12

Re: Menu select bind
 
... unless the user has changed their binds (which is common).

Rohanlogs 07-06-2017 01:23

Re: Menu select bind
 
Quote:

Originally Posted by Vliket (Post 2533549)
It was an example, but i saw guy who was using this command and it works for him i just forget it :x or its script idk.

If you saw a guy with this "bind", he was probably using some kind of macro or there's a command for Invincible in that plugin.
If there's a command for it you just use bind f1 hns_invincible or something.
Also if there's no command, its not hard to add it if you have the source code.

SpannerSpammer 07-06-2017 02:30

Re: Menu select bind
 
Code:

alias "msel5"      "menuselect 5"
alias "msel6"      "menuselect 6"
alias "6t"          "wait; wait; wait; wait; wait; wait"
alias "hns_menu"    "say /hns"
alias "hns_invin"  "hns_menu; 6t; msel6; 6t; msel5"
bind F1 "hns_invin"

Put this in one of your config files (autoexec etc).

I don't know if this will work going through multiple menus like
that but try it, add more wait commands as needed.

Vliket 07-06-2017 07:03

Re: Menu select bind
 
Quote:

Originally Posted by SpannerSpammer (Post 2533669)
Code:

alias "msel5"      "menuselect 5"
alias "msel6"      "menuselect 6"
alias "6t"          "wait; wait; wait; wait; wait; wait"
alias "hns_menu"    "say /hns"
alias "hns_invin"  "hns_menu; 6t; msel6; 6t; msel5"
bind F1 "hns_invin"

Put this in one of your config files (autoexec etc).

I don't know if this will work going through multiple menus like
that but try it, add more wait commands as needed.

Wow, it works! Thanks for your help !

edit. And if i wanna bind more things like Boots of speed or some items on Furien where i can find those names ? Like hns_invin etc??

fysiks 07-06-2017 09:40

Re: Menu select bind
 
So, it looks like this is NOT a Scripting Help question. In that case, the question makes much more sense.


All times are GMT -4. The time now is 22:51.

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