SysTime/CurTime/RealTime not affected by speedhacking?

Hi, I’m attempting to write a small script to detect speedhacking, but it seems none of them are affected when I turn on my speedhack

[lua]local SCH = SysTime()
local CCH = CurTime()
local RCH = RealTime()
print( "SysTime difference: " … SysTime() - SCH)
print( "CurTime difference: " … CurTime() - CCH )
print( "RealTime difference: " … RealTime() - RCH … "
SCH = SysTime()
CCH = CurTime()
RCH = RealTime()

Not Speedhacking
SysTime difference: 9.9858964047348
CurTime difference: 10
RealTime difference: 9.98583984375

With Speedhacks on
SysTime difference: 9.9897361051781
CurTime difference: 9.9848480224609
RealTime difference: 9.989990234375

Can anyone tell me what I’m doing wrong exactly?

It gets the time in seconds since server start, so it should be unaffected by clients speed?

This is all done client-side, the client’s should differ when sped up. I know for a fact CurTime() is client-sided and changed, yet it seems it’s not.

Why would it be affected by speed hacking?

Because you’re speeding up the game. When you speedhack, you offset timers/send more cusercmd’s than people that don’t. Yet, it’s not affected.

Timers are also effected, that’s why your results are wrong.

SysTime and RealTime are sped up.

well shit

How would I go about getting correct results from the client?

[editline]8th October 2013[/editline]

nvm, might have a solution.

If you don’t need to be more accurate then a second, os.time - I’d also take a look into os.clock.

for most people that speed hack, you can detect convars. since if you rename it, it won’t work. for c++ speedacks, add a create move hook. compare their cur time or realtime every time the hook runs. look for patterns.

Check how often they send usercmds with the setupmove hook serverside. Everything you are doing clientside is more likely to get detoured.

Shouldn’t be too much of a hastle with Sourcenet3 either :slight_smile: