View Single Post
backwards
AlliedModders Donor
Join Date: Feb 2014
Location: USA
Old 07-10-2018 , 19:19   Re: [CS:GO] Hook game in background
Reply With Quote #4

Quote:
Originally Posted by Mitchell View Post
What do you mean runs his client in the background? You mean running in console mode?
I'm pretty sure he means alt-tabbed.

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.
__________________
I highly recommend joining the SourceMod Discord Server for real time support.
backwards is offline