Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: Nihongo^ on Apr 16, 2023, 10:22 AM

Title: Hp hackers and speed hackers
Post by: Nihongo^ on Apr 16, 2023, 10:22 AM
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?
Title: Re: Hp hackers and speed hackers
Post by: Nihongo^ on Apr 17, 2023, 12:39 PM
bump ?
Title: Re: Hp hackers and speed hackers
Post by: habi on Apr 17, 2023, 02:47 PM
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.
Title: Re: Hp hackers and speed hackers
Post by: Nihongo^ on Apr 18, 2023, 07:37 AM
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 ?
Title: Re: Hp hackers and speed hackers
Post by: habi on Apr 18, 2023, 10:04 AM
Roughly,
function onPlayerMove(player, x,y,z,p,q,r)
{
 if((Vector(x,y,z)-Vector(p,q,r)).Length() > 5 )
 KickPlayer(player);
}