Anti weapon hack idea
#1

My current system is sorta inefficient with catching weapon hackers and I would like to hear your thoughts on this one I have in mind. Basically, I'll add a variable that states that you got a weapon through legitimate means and you'll lose that variable once you lose the weapon (eg. death).

Example of a legitimate weapon recipient:
- John_Smith goes into Ammu-Nation
- He proceeds to buy a shotgun
- Server assigns "HasShotgun = 1" to John_Smith's temp variables
If John_Smith dies or stores the shotgun in his house, then HasShotgun = 0
If John_Smith disconnects, HasShotgun will be saved into his MySQL entry for future checks


Example of a weapon hacker:
- Ben_Smith uses a weapon hack to spawn a shotgun
- Server notices that Ben_Smith doesn't have "HasShotgun = 1", bans him

Would this be an efficient way of catching weapon hackers? If it's worth knowing, the server I'm going to use it on is a roleplay server so they won't be any weapon pickup points. You have to create them using commands or buy them using a dialog. I know this won't cover people who use ammo hacks, but I already have something else lined up for that.

Please let me know your thoughts.
Reply
#2

Pretty sure that's how most people do it. If you're unsure about whether it works, you can try it.

I wouldn't ban people in your anticheat though, rather send a message to the admins.
Reply
#3

Most people do this. It works fine.
Reply
#4

That's how most of anti-cheat works.
Reply
#5

Ahh. Been doing it wrong this whole time then.

Thanks for the responses!
Reply
#6

You actually dont need to use one mysql column for every weapon[hasdeagle,hasshotgun] etc,
you can just use one BoughtWeapon for every weapon .
Reply
#7

There are several issues to be taken care of.

1. Trying to change a player's weapon while he is inside a vehicle won't cause the change until he exits the car. A player has M4 and is driving a car. You give an AK-47 to him. GetPlayerWeaponData will claim that he has M4 which is wrong. After the player exits the vehicle, GetPlayerWeaponData give the correct weapon ids.

2. Desynced players don't respond to GivePlayerWeapon.

and lot more... I am not able to recall... there are many more exceptions to be taken care of if you want to make a fail proof anti weapon hack.

In other words, I am trying to say that do NOT let the server ban a player by itself.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)