[CS:GO] Hook game in background
Is there a way to hook or to check when a client runs his client in background?
I know there's an option in Audio Settings: Play audio when game in background, so within the game it's possible to check. |
Re: [CS:GO] Hook game in background
|
Re: [CS:GO] Hook game in background
What do you mean runs his client in the background? You mean running in console mode?
|
Re: [CS:GO] Hook game in background
Quote:
You can't check this naively in source mod or from the source engine server itself. You would need a way to run code on a client to figure this out normally but through my development of my previous anti-cheats I've discovered a way within CS:GO at least. NetChannels has a virtual function called GetTimeSinceLastReceived. You can use this information to figure out when the game client last sent data to the server along with the GetAvgLoss function to figure out when players are most likely alt tabbed. They will send less info to the server or none in some cases then they would if they were in-game. This is really the only way I believe you can currently do this and it's really hacky. |
Re: [CS:GO] Hook game in background
Quote:
|
Re: [CS:GO] Hook game in background
Quote:
*edit* also I already know you are aware of this, just public discussion so others know if they find this topic |
Re: [CS:GO] Hook game in background
You could check if the player has pressed alt + tab, I would toggle a boolean, then make it false if the client eg. presses w. (If that's even what you mean, no idea)
|
Re: [CS:GO] Hook game in background
Sourcemod cant check a clients actual OS keys.
|
Re: [CS:GO] Hook game in background
Oh, I just asumed you could xd
sry for misleading information! |
Re: [CS:GO] Hook game in background
...well, player cmd rate will drop down under 30 if game window is not focused/active.
Because game start run about 30 FPS when it is in background, inactive. |
All times are GMT -4. The time now is 15:27. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.