SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Discussion

Reply
 
Thread Tools Display Modes
Old 06/11/2016, 12:00 PM   #1
Dairyll
Huge Clucker
 
Dairyll's Avatar
 
Join Date: Feb 2009
Location: Manila, PH
Posts: 414
Reputation: 40
Default Anti weapon hack idea

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.
__________________
MasayaHost - Affordable Web Hosting and VPS Hosting
$1/mo VPS Hosting | 70 GB Storage, 3 GB RAM, 3 TB Bandwidth
Chicago (USA), London (UK), Sydney (AU), Finland & Bulgaria
Deploy your Linux VPS and start your server today!
Dairyll is offline   Reply With Quote
Old 06/11/2016, 12:10 PM   #2
Dignity
High-roller
 
Dignity's Avatar
 
Join Date: May 2013
Location: Belgium
Posts: 1,636
Reputation: 1179
Default Re: Anti weapon hack idea

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.
Dignity is online now   Reply With Quote
Old 06/11/2016, 12:27 PM   #3
iamjems
Big Clucker
 
iamjems's Avatar
 
Join Date: Aug 2016
Location: Croatia
Posts: 123
Reputation: 7
Default Re: Anti weapon hack idea

Most people do this. It works fine.
iamjems is offline   Reply With Quote
Old 06/11/2016, 12:57 PM   #4
Jayse
Big Clucker
 
Jayse's Avatar
 
Join Date: Sep 2016
Posts: 76
Reputation: 9
Default Re: Anti weapon hack idea

That's how most of anti-cheat works.
Jayse is offline   Reply With Quote
Old 06/11/2016, 01:06 PM   #5
Dairyll
Huge Clucker
 
Dairyll's Avatar
 
Join Date: Feb 2009
Location: Manila, PH
Posts: 414
Reputation: 40
Default Re: Anti weapon hack idea

Ahh. Been doing it wrong this whole time then.

Thanks for the responses!
__________________
MasayaHost - Affordable Web Hosting and VPS Hosting
$1/mo VPS Hosting | 70 GB Storage, 3 GB RAM, 3 TB Bandwidth
Chicago (USA), London (UK), Sydney (AU), Finland & Bulgaria
Deploy your Linux VPS and start your server today!
Dairyll is offline   Reply With Quote
Old 24/11/2016, 12:48 PM   #6
PepsiCola23
Gangsta
 
Join Date: May 2015
Posts: 730
Reputation: 3
Default Re: Anti weapon hack idea

You actually dont need to use one mysql column for every weapon[hasdeagle,hasshotgun] etc,
you can just use one BoughtWeapon for every weapon .
PepsiCola23 is offline   Reply With Quote
Old 24/11/2016, 07:10 PM   #7
Yashas
Gangsta
 
Join Date: Jun 2012
Location: India
Posts: 882
Reputation: 317
Default Re: Anti weapon hack idea

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.
Yashas is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[FilterScript] Anti-Cheat ANTIFLY\ANTI GOD\ANTI SKIN BUG\ANTI MONEY HACK\ANTI JETPACK HACK\ANTI GODOFCARS\ANTI FAKEKILL RedMF Lanšamentos/Releases 15 19/07/2018 07:29 PM
Request anti cheat, anti flyhack | anti ammo hack | anti healt hack | anti aimboter Izaki Scripting Help 1 15/06/2015 05:21 PM
[FilterScript] PMH's Anti Weapon Hack!!! + Ammo hack PMH Filterscripts 4 25/01/2015 12:12 PM
Genius Anti Weapon Hack idea i built Snopi Scripting Help 5 02/09/2013 09:32 AM


All times are GMT. The time now is 05:43 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.