• November 23, 2024, 08:52:39 am
Welcome, guest! Please login or register.

Server IP: 141.94.180.144:8292

Author Topic: Important information about anticheat for speed-hacks  (Read 890 times)

0 Members and 1 Guest are viewing this topic.

vito

  • Guest
Important information about anticheat for speed-hacks
« on: March 12, 2017, 04:09:30 pm »
As I know there no way to get time in milliseconds in client-side of vc-mp so people are using GetTicks to get something like it to detect speedhacks. EC doing this:
Code: [Select]
function CheckPS( )
{
local mI = ::myInfo, checkDur = ( Script.GetTicks( ) - mI.LastPosCheck );
if (  mI.Noticed < 3 && checkDur >= 1000 )
{
local cPos = ::localplayer.Position, lPos = mI.LastPos;
mI.LastPosCheck = Script.GetTicks( );
mI.LastPos = Vector( cPos.X, cPos.Y, cPos.Z );
...

I will just post what SLC said about that:

Quote
<vito>   can you write again in few words why GetTicks should not be used as time and why it may be incorrect
<vito>   because servers using it for anticheat system and it may cause wrong bans
<vito>   i will post this in server's forum
<SLC>   because GetTicks returns the time your program used the CPU. and your program does not use the CPU all the time since other programs needs to use it as well
<SLC>   not only that but your program may also jump between multiple cores and end up reporting as using more time than the actual amount of time in real world
<SLC>   therefore, GetTicks can be either ahead or behind deppending on how your program uses the CPU
<SLC>   take this benchmark I just ran this morning. because it ran in 2 threads and I have 2 physica; cores available. the CPU time appears to be double https://s21.postimg.org/yl2szpuyv/Untitled.png

Offline Human.

  • Developer
  • General of EC
  • *
  • Posts: 1931
  • Country: my
    • View Profile
Re: Important information about anticheat for speed-hacks
« Reply #1 on: March 13, 2017, 02:58:29 pm »
That's pretty bad..

Btw, the chance of players getting caught by false detection is quite low as the script in client-side will first check whether the player is moving( his current speed is faster than his last speed ) & his speed is continuously over limit in a row before the script reports to server for the 1st time, otherwise it will be ignored. The server only report about it to me if the client reports about suspicious speed more than 2 times to server, means his speed is continuously over limit while him moving. Anyway, it is under testing & it only PM me about the suspicious speed, no action was taken toward them without valid evidences. A few players was caught and most of them were later reported using speed hack by players, which means the detection is still useable.

PS: seems like someone is interested in seeing the script :P

vito

  • Guest
Re: Important information about anticheat for speed-hacks
« Reply #2 on: March 13, 2017, 03:32:25 pm »
no action was taken toward them without valid evidences.
I just wanted to make sure you wont ban people without checking them few times. Since it's affected by chance you need to collect some statistics before take actions. I'm glad to hear you are doing it.
PS: seems like someone is interested in seeing the script :P
I'm learning vc-mp scripting so I have an collection of _mem files from all servers. Some coders hates me for that, Sorry if something wrong :)
« Last Edit: March 13, 2017, 03:34:09 pm by vito »

Offline Human.

  • Developer
  • General of EC
  • *
  • Posts: 1931
  • Country: my
    • View Profile
Re: Important information about anticheat for speed-hacks
« Reply #3 on: March 13, 2017, 03:34:28 pm »
nope, nothing important is in the file.

I'll lock this topic now.