Is there any way i can make a bind that allows me to continue after a prefix. For example, I hit "I" and it will open chat with a /advert prefix, similar to say_team or something. I've tried using alias to give it a command but that doesnt work. Could i do something like : bind "I" "lua_run_cl Local ply = Player:ConCommand( "say /advert" .. )"
or something along those lines?
This may be better suited in development discussion. I wanted to do a similar thing a long time ago on Minecraft.
bind [key] "lua_run_cl chat.Open(1)" - should open the chat box, how you then add text I'm not sure. Plus this would only work if the server had sv_allowcslua = 1.
The other solution may be if your keyboard supports binds, maybe you can setup a bind that presses the chat key-bind then the letters you need to enter the first half of the command :/
bind k "say k"
[QUOTE=Sir TE5T;49836229]bind k "say k"[/QUOTE]
Linux_Torvald knows how to do that. They are asking how to have a bind that puts the start of the command in chat ready for it to be completed. Eg: Pressing 'I' puts '/kick ' in the chat ready for a name to be entered.
[QUOTE=Semajnad;49836290]Linux_Torvald knows how to do that. They are asking how to have a bind that puts the start of the command in chat ready for it to be completed. Eg: Pressing 'I' puts '/kick ' in the chat ready for a name to be entered.[/QUOTE]
bind k "say /kick @"
[QUOTE=Sir TE5T;49838655]bind k "say /kick @"[/QUOTE]
What is that meant to do?
[QUOTE=Semajnad;49839042]What is that meant to do?[/QUOTE]
ulx, * ^ @
[QUOTE=Sir TE5T;49839282]ulx, * ^ @[/QUOTE]
I've never seen @ as a parameter? What is it meant to do?
[QUOTE=Semajnad;49839344]I've never seen @ as a parameter? What is it meant to do?[/QUOTE]
@ = who you are looking at with ulx
* = everyone with ulx
^ = self with ulx
!%admin = all that are below admin, not including admin in ulx
[editline]29th February 2016[/editline]
I know everything abot that. I was more of asking exactly what semajnad said:
[QUOTE=Semajnad;49836290]Linux_Torvald knows how to do that. They are asking how to have a bind that puts the start of the command in chat ready for it to be completed. Eg: Pressing 'I' puts '/kick ' in the chat ready for a name to be entered.[/QUOTE]
[QUOTE=Linus_Torvald;49839813]
@ = who you are looking at with ulx
[/QUOTE]
Ahh nice, I didn't know about @ anyway.
Linus, I'm guessing the way to do it is to use chat.Open(1) to open the chat box, then add the text using VGUI something like DTextEntry:SetText("/kick ") but I'm not sure if you can edit the text in the chat box.
Sorry, you need to Log In to post a reply to this thread.