Thread: keybd_event
View Single Post
Re: keybd_event
Old
  (#8)
Lazy
Member
 
Lazy's Avatar
 
Status: Offline
Posts: 236
Join Date: Jan 2004
Location: Toronto, Ontario, Canada
Default Re: keybd_event - 27-09-2005

What kind of bot are you doing?
I'm just asking because they are _usually_ done server-side and not in a seperate client application.

As for running commands, I doubt you could get console commands running through a second application.
You could send window messages like WM_KEYDOWN, ect to the half-life window which would make the player move or do other things.

The easiest way to do a client-side bot is with a dll hook but since VAC2 is out its not safe to do.

Notice: The only client-side thing I had running was a clock, nothing else... Not only that I started using windowed mode so the clock became useless.
Though I did learn alot about function hooking.

[Added]
Actually, if you somehow managed to get loaded into half-life's address space and remain undetected by VAC2 you could run console commands...

- Hook cl_enginefuncs_t::pfnCmd_Args, pfnCmd_Argc, pfnCmd_Argv
- In you pfnCmd_xxx functions simply return your custom command
- Call pfnClientCommand

I think, haven't touched the client in a long time.

Last edited by Lazy; 27-09-2005 at 21:29..
  
Reply With Quote