Hp hackers and speed hackers

Started by Nihongo^, Apr 16, 2023, 10:22 AM

Previous topic - Next topic

Nihongo^

How do we prevent hackers?

Most people come with HP and Speed hacks, and the servers cannot detect them. So how do we solve this problem? Why did the server does not detect them?

Nihongo^


habi

The server does not know anything.  All it knows is some strings coming to it.  When it comes,  that is parsed and sent to all connected clients.
If you want to know if player is speed hacking, use function onPlayerMove and compare distance,  check if player is spawned or server has recently set its position.

Nihongo^

Quote from: habi on Apr 17, 2023, 02:47 PMThe server does not know anything.  All it knows is some strings coming to it.  When it comes,  that is parsed and sent to all connected clients.
If you want to know if player is speed hacking, use function onPlayerMove and compare distance,  check if player is spawned or server has recently set its position.

Thanks, but can you give some examples who does on playermove measure the player speed ? or hp hacks ?

habi

Roughly,
function onPlayerMove(player, x,y,z,p,q,r)
{
 if((Vector(x,y,z)-Vector(p,q,r)).Length() > 5 )
 KickPlayer(player);
}