PDA

View Full Version : SRCDS command-line autocompletion 1.0.1


Peace-Maker
08-28-2016, 04:25
SRCDS Command-line autocompletion
Command-line tab-completion for the SRCDS

This extension enables command and convar autocompletion in the server command-line.
Shows matching commands in the command-line on <tab> or suggests valid arguments for a command, if the command supports it (try changelevel <tab>).

The argument suggestions use the builtin ConCommand::AutoCompleteSuggest (https://mxr.alliedmods.net/hl2sdk-sdk2013/source/public/tier1/convar.h#284) just like the windows SRCDS GUI does.

Installation


Drag & drop


I've only tested on CS:GO and CS:S on windows and linux. There are binaries for CS:GO, CS:S, TF2, DOD:S, HL2:DM, L4D, L4D2, Nuclear Dawn, Black Mesa Source, Insurgency and SourceSDK 2013 mods included though. Post if there are problems with your game.

Thanks to Didrole for his MethodScanner class and giving me access to his SourceCurses code to get me started.

Download (https://github.com/peace-maker/srcds-autocomplete/releases)
Sourcecode (https://github.com/peace-maker/srcds-autocomplete)
Gamedata (https://raw.githubusercontent.com/peace-maker/srcds-autocomplete/master/autocomplete.games.txt)

Changelog:

28-08-2016 - 1.0: Initial Release


CS:GO and Orangebox games support

04-12-2016 - 1.0.1


Fix CS:GO gamedata
Add support for Left 4 Dead, Left 4 Dead 2, Nuclear Dawn, Black Mesa Source and SourceSDK 2013 mods
Switch to SourceMod's IMemoryUtils instead of using own class to handle signature lookup
Change gamedata layout to be similar to SM's supported libraries ('@' in front of symbols etc)

shavit
08-29-2016, 02:42
Insanely useful, thank you!

ofir753
08-29-2016, 12:57
Seems useful thanks, for some reason I have this problem.

<FAILED> file "autocomplete.ext.2.csgo.so": Could not find interface: IGameHelpers

sneaK
08-29-2016, 13:20
Seems useful thanks, for some reason I have this problem.

<FAILED> file "autocomplete.ext.2.csgo.so": Could not find interface: IGameHelpers


Requires Sourcemod 1.8+

ofir753
08-29-2016, 13:55
Requires Sourcemod 1.8+

Thanks!

ImACow
08-30-2016, 17:38
Holy shit, thanks for this

Peace-Maker
12-04-2016, 20:14
Updated to 1.0.1
Code simplifications and support for more games.


Fix CS:GO gamedata
Add support for Left 4 Dead, Left 4 Dead 2, Nuclear Dawn, Black Mesa Source and SourceSDK 2013 mods
Switch to SourceMod's IMemoryUtils instead of using own class to handle signature lookup
Change gamedata layout to be similar to SM's supported libraries ('@' in front of symbols etc)

wazer
06-03-2017, 17:04
Remember to update here :D

Spirit_12
06-13-2017, 00:31
Working flawlessly on L4D2. Comes pretty handy when you want to get things done quick.

Peace-Maker
07-13-2017, 06:03
Working flawlessly on L4D2. Comes pretty handy when you want to get things done quick.

Thanks, did you test on windows too?

Spirit_12
07-13-2017, 20:24
Thanks, did you test on windows too?

I don't use windows for servers that much, but I can do a quick test, if you want to confirm.

lugui
06-20-2018, 08:49
<FAILED> file "autocomplete.ext.2.tf2.so": /var/HDD_Storage/servers/server-1/tf/addons/sourcemod/extensions/autocomplete.ext.2.tf2.so: undefined symbol: Warning

Spirit_12
06-20-2018, 09:04
What version of sourcemod?

Peace-Maker
06-20-2018, 17:11
Did you try the latest builds for version 1.0.1? That's usually caused by some compiler being unable to link tier0 correctly, but that should be the case for all builds not only the tf2 one.
Building the extension again using clang should work.

Pyc
09-02-2018, 07:07
SourceMod Version: 1.9.0.6248

error log

L 09/02/2018 - 14:01:10: [SM] Unable to load extension "autocomplete.ext": /left4dead2/addons/sourcemod/extensions/autocomplete.ext.2.l4d2.so: undefined symbol: Error



sm exts list
<FAILED> file "autocomplete.ext.2.l4d2.so": /left4dead2/addons/sourcemod/extensions/autocomplete.ext.2.l4d2.so: undefined symbol: Error

ProjectSky
10-22-2020, 10:46
<FAILED> file "autocomplete.ext.2.l4d2.so" undefined symbol: Error



SourceMod Version: 1.10.0.6497
Metamod:Source version: 1.11.0-dev+1143

cravenge
10-24-2020, 03:16
Looks like L4D2 Linux changed. The Windows version still works fine up to this day.

Peace-Maker
10-28-2020, 08:01
Looks like L4D2 Linux changed. The Windows version still works fine up to this day.

Does it crash when you press tab or on load?

Here's another build compiled with clang, but the one in the release was as well, so not sure why those loading errors occur.

ProjectSky
11-21-2020, 05:10
[SM] Extension autocomplete.ext.so failed to load: Failed to find CTextConsole::ReceiveTab symbol in dedicated library

Peace-Maker
11-21-2020, 12:33
[SM] Extension autocomplete.ext.so failed to load: Failed to find CTextConsole::ReceiveTab symbol in dedicated library


Which game?

ProjectSky
11-30-2020, 09:46
Which game?

l4d2

Peace-Maker
12-01-2020, 11:29
Did you download the gamedata file from the first post?

ProjectSky
12-01-2020, 19:19
Did you download the gamedata file from the first post?

I forgot to put in gamedata, now it works well.

#1 It not support autocomplete of commands like sm version?

Peace-Maker
12-02-2020, 08:12
No, because SourceMod itself doesn't provide the autocompletion information for the "sm" command that would be used by this extension. The proposal to add support for this (https://github.com/alliedmodders/sourcemod/pull/549) didn't receive too much feedback.