Jump to content

Sending commands to a Source game console


Recommended Posts

I'm pretty new to AutoIt, and I've made a few programs, however I've come across a problem when making a program to send commands to a Source (e.g. GMod, Counter Strike:Source) console. I made a program to send the commands you type in the input box to the console, however it uses a ControlSend function which is unreliable as it assumes the client is in a position where the console is availible, and also assumes the console is not already open. I was wondering if it would be possible to send commands directly to the game but I have no idea what to search and where to start going about this.

Any help would be greatly appreciated.

Link to comment
Share on other sites

@Chrisaster

Send() function ?

Cheers, FireFox.

FireFox,

Thanks for the quick reply, however I was wondering if it would be possible to use functions other than Send or ControlSend to send commands to the clients console. So the command is actually 'injected' into the game using a third party program.

Edited by Chrisaster
Link to comment
Share on other sites

FireFox,

Thanks for the quick reply, however I was wondering if it would be possible to use functions other than Send or ControlSend to send commands to the clients console. So the command is actually 'injected' into the game using a third party program.

Any injected DLL will get you detected by VAC and get you Perma banned. I highly suggest you not to try and take that route.

What is the exact problem? I use the code below to limit how fast AutoIt types, so it's for the most part always correct. If you want to ensure that nothing gets messed up you can lock the keyboard till you get to the end of the send.

Opt("SendKeyDelay", 20)
Opt("SendKeyDownDelay", 5)
Link to comment
Share on other sites

Any injected DLL will get you detected by VAC and get you Perma banned. I highly suggest you not to try and take that route.

What is the exact problem? I use the code below to limit how fast AutoIt types, so it's for the most part always correct. If you want to ensure that nothing gets messed up you can lock the keyboard till you get to the end of the send.

Opt("SendKeyDelay", 20)
Opt("SendKeyDownDelay", 5)
AgentSmith,

This program is designed for Garry's Mod and responds to key presses such as Ctrl+F simulating a bind press. However this is slow and not 100% reliable. In Garry's Mod VAC is stated as enabled, however it is not (No idea why).

And about:

Opt("SendKeyDelay", 20)

Opt("SendKeyDownDelay", 5)

I give the user an option to set the key stroke delay.

Edited by Chrisaster
Link to comment
Share on other sites

I believe steam has no thoughts of inforcing any rules for Gmod, why? simple thiers so maney addons for the game and people alrdy have contraptions that can kill u from farther then u see with a 95% chance of a head shot no mater what. thiers aimbots alrdy in the game ever hear of smartsnap? Ever 1 SHOULD have it (so help full <3) lol and its an aimbot...

But for ur problem I dont have an idea sorry :lmao: but it sounds like it could be realy helpfull :)

Edited by Bam
Link to comment
Share on other sites

When hosting a dedicated server off a pc it has a window u can type commands into and if u want to do users commands i believe u can do like "ulx cexec "username" "command";requires ulx :)

other then that idk, u might be able to open the command window on a dedicated server remotly.

Link to comment
Share on other sites

  • 5 years later...

I know it's an old thread but I needed it too and find a solution!

To send commanda to a game let it:

FileWrite(sourcegame/cfg/test.cfg) <-- example

Then bind a button ingame like:

Bind "kp_end" "exec test"

Then you send:

Send("{NUMPAD1}")

After that

FileDelete("sourcegame/cfg/test.cfg")

So the full code is like:

FileWrite(sourcegame/cfg/test.cfg) <-- example

Send("{NUMPAD1}")

FileDelete("sourcegame/cfg/test.cfg")

You can also make a txtfile with all the commanda you want send then filereadline, filewrite thenthe same..

And instead of send you can use ControlSend too so you cando it out of the game!

No problem and have a good day!

Link to comment
Share on other sites

  • Developers

I know it's an old thread but I needed it too and find a solution!

-snip-

No problem and have a good day!

Just don't when you know and read our current forumrules around Game bots.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...