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

Quote:
Originally Posted by Mitchell View Post
If they have the game minimize i remember others saying OnPlayerRunCmd no longer fires for that client so you could have a timer every 10 seconds check if some one hasn't fired that forward.
In CS:GO at least the server seems to be firing the last good known usercmd if no new ones are supplied. This prevents the AirStuck from when you stop sending packets method and also is the reason why when most people timeout they continue walking forwards or backwards into walls constantly. The normal hook for OnRunCommand would still fire in this case so it's not exposed to sourcemod as anything different. Should be a function you can hook prior to see if the RunCommand is being called via normal means after ProcessUserCmds or is being forwarded the most recent usercmd received. It's a good idea just not natively easy in sourcemod as you'd need a custom extension wrote for handling this.

*edit* also I already know you are aware of this, just public discussion so others know if they find this topic
__________________
I highly recommend joining the SourceMod Discord Server for real time support.

Last edited by backwards; 07-11-2018 at 02:47.
backwards is offline