Posts: 2,699
Threads: 244
Likes Received: 1,414 in 673 posts
Likes Given: 1,932
Joined: Feb 2012
Country:
04-25-2014, 12:27 AM
(This post was last modified: 09-01-2022, 01:03 AM by Fearless Community.
Edit Reason: Checked Encoding
)
(04-25-2014, 12:04 AM)Positive Wrote: (04-24-2014, 02:55 PM)Floodify Wrote: Nice guide.
But.. Is it possible to bind two commands to one key?
This used to work for me:
bind H "act_dance; say hi"
Was just about to post this myself. Not sure if you can bind multiple say commands together. It appears to be that you used to be able to in previous GMod versions with a wait command but that doesn't work anymore.
Also you may want to add the list of bindable keys.
Posts: 1,594
Threads: 77
Likes Received: 384 in 249 posts
Likes Given: 630
Joined: Apr 2013
Reputation:
21
04-25-2014, 12:27 AM
(This post was last modified: 09-01-2022, 01:03 AM by Fearless Community.
Edit Reason: Checked Encoding
)
(04-25-2014, 12:04 AM)Positive Wrote: (04-24-2014, 02:55 PM)Floodify Wrote: Nice guide.
But.. Is it possible to bind two commands to one key?
This used to work for me:
bind H "act_dance; say hi"
Hmm, so you can do it, if you add a semicolon? Would someone be able to confirm this?
Thank you everyone for contributing to this guide. It's really improving it!
I'll add the info about the 'multiple binds' thing, and that it can only be for separate commands (can't do a line of 'say' commands in a row)
Posts: 2,699
Threads: 244
Likes Received: 1,414 in 673 posts
Likes Given: 1,932
Joined: Feb 2012
Country:
04-25-2014, 12:39 AM
(This post was last modified: 09-01-2022, 01:03 AM by Fearless Community.
Edit Reason: Checked Encoding
)
It seems to be able to do other commands okay
(eg. bind m "ent_create npc_zombie; ent_create npc_zombie; ent_create npc_zombie; ent_create npc_zombie; say Bring on the apocalypse!")
Will create 4 zombies and then do the say command just fine.
However bind m "say Testing 1; say Testing 2" will only write Testing 1 in the chat.
Posts: 1,594
Threads: 77
Likes Received: 384 in 249 posts
Likes Given: 630
Joined: Apr 2013
Reputation:
21
04-25-2014, 12:42 AM
(This post was last modified: 09-01-2022, 01:03 AM by Fearless Community.
Edit Reason: Checked Encoding
)
(04-25-2014, 12:39 AM)GRiiM Wrote: It seems to be able to do other commands okay
(eg. bind m "ent_create npc_zombie; ent_create npc_zombie; ent_create npc_zombie; ent_create npc_zombie; say Bring on the apocalypse!")
Will create 4 zombies and then do the say command just fine.
However bind m "say Testing 1; say Testing 2" will only write Testing 1 in the chat.
I should think using the 'act' commands in multiple lines would only do the first one too, right?
As for this guide, it's only for Fearless and only the admins can spawn in those entities anyway, so I won't bother to put that bit in.
Posts: 519
Threads: 42
Likes Received: 180 in 90 posts
Likes Given: 150
Joined: Mar 2012
Reputation:
31
04-25-2014, 10:38 AM
(This post was last modified: 09-01-2022, 01:03 AM by Fearless Community.
Edit Reason: Checked Encoding
)
Ah this guide is perfect!
Posts: 1,721
Threads: 127
Likes Received: 630 in 241 posts
Likes Given: 813
Joined: Feb 2014
Reputation:
74
04-25-2014, 06:58 PM
(This post was last modified: 09-01-2022, 01:03 AM by Fearless Community.
Edit Reason: Checked Encoding
)
What if had extra keys on my keyborad? like the M1 M2 M3 and so on keys? how do I bind those?
Posts: 61
Threads: 15
Likes Received: 5 in 3 posts
Likes Given: 7
Joined: Nov 2013
Reputation:
0
04-25-2014, 08:22 PM
(This post was last modified: 09-01-2022, 01:03 AM by Fearless Community.
Edit Reason: Checked Encoding
)
(04-25-2014, 06:58 PM)MrSnow Wrote: What if had extra keys on my keyborad? like the M1 M2 M3 and so on keys? how do I bind those?
What I do is take out my fading door tool and bind the door to my extra key (ex. M1). If you look to the left where it shows what key your fading door is bound to, take note of it and do that for 'bind KEYHERE'. I hope i explained it correctly :|
Posts: 1,594
Threads: 77
Likes Received: 384 in 249 posts
Likes Given: 630
Joined: Apr 2013
Reputation:
21
04-25-2014, 11:32 PM
(This post was last modified: 09-01-2022, 01:03 AM by Fearless Community.
Edit Reason: Checked Encoding
)
(04-25-2014, 06:58 PM)MrSnow Wrote: What if had extra keys on my keyborad? like the M1 M2 M3 and so on keys? how do I bind those?
What I do is take out my fading door tool and bind the door to my extra key (ex. M1). If you look to the left where it shows what key your fading door is bound to, take note of it and do that for 'bind KEYHERE'. I hope i explained it correctly :|
[/quote]
What Ex7reMe said, that's a good way of doing it. (I have G buttons on mine, it'd be interesting to see what they are called), but yeah - for any custom buttons, it'll have a different name, other than just what it's called on the keyboard.
Posts: 1,594
Threads: 77
Likes Received: 384 in 249 posts
Likes Given: 630
Joined: Apr 2013
Reputation:
21
05-19-2014, 01:25 PM
(This post was last modified: 09-01-2022, 01:03 AM by Fearless Community.
Edit Reason: Checked Encoding
)
Tidied it up a little bit and added spoilers so the thread isn't so long when you first open it up.
Posts: 2,699
Threads: 244
Likes Received: 1,414 in 673 posts
Likes Given: 1,932
Joined: Feb 2012
Country:
06-21-2014, 04:05 AM
(This post was last modified: 09-01-2022, 01:03 AM by Fearless Community.
Edit Reason: Checked Encoding
)
Okay, so I've spent some time messing around further with binds to bypass the limitations within Garry's Mod, especially macro keys which aren't recognized in Garry's Mod.
So far I've managed to get it working so that macro keys work within Garry's Mod and also multiple lines of text can be sent with one key press but there's a lot more that can be done.
To achieve this I use some software called 'AutoHotKey'.
Here's the code I use to post two lines of Miranda rights with one key-press:
Code: #NoEnv
text1 =
(
You have the right to remain silent. Anything you say or do can and will be held against you in the court of law.
)
Send, y
sleep, 100
sendinput %text1%
sleep, 100
Send, {enter}
sleep, 600
text2 =
(
You have the right to an attorney. If you cannot afford an attorney, one will be appointed to you.
)
Send, y
sleep, 100
sendinput %text2%
Send, {enter}
ExitApp
More information: http://www.fearlessrp.net/showthread.php?tid=48263
|