SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 11/05/2017, 10:45 PM   #11
JaKe Elite
High-roller
 
JaKe Elite's Avatar
 
Join Date: Apr 2012
Location: Philippines
Posts: 3,694
Reputation: 476
Default Re: Fight Against Undetectable weapon Hacks

Thread Updated

~ Please keep in mind, If you are looking for the Anticheat for those Regular Weapon Hacks then this isn't the place for you use the SEARCH button. This anticheat only works for those Weapon Hacks which uses CLEO Mod & SAMPFUNCS.
JaKe Elite is offline   Reply With Quote
Old 14/05/2017, 04:50 PM   #12
Abagail
High-roller
 
Join Date: Dec 2013
Location: GetPlayerPos(playerid, pos); Scripter/Mapper.
Posts: 3,526
Reputation: 435
Default Re: Fight Against Undetectable weapon Hacks

Another thing that slipped my mind earlier, vehicles such as the Predator, Hydra, Hunter, etc. also shoot weapons. You should incorporate this in sanity checks, e.g:
Code:
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
		    {
				new vehModel = GetVehicleModel(GetPlayerVehicleID(playerid)));
				if(vehModel == 425 || vehModel == 430 || vehModel == 447)
					return true;
			}

else
{
       // ...
Abagail is online now   Reply With Quote
Old 14/05/2017, 05:53 PM   #13
Dayrion
High-roller
 
Dayrion's Avatar
 
Join Date: Jan 2016
Location: France
Posts: 1,721
Reputation: 206
Default Re: Fight Against Undetectable weapon Hacks

Also ; a simple anti cheat :
PHP Code:
public  OnPlayerWeaponShot(playeridweaponidhittypehitidFloat:fXFloat:fYFloat:fZ)
{
    
// ===================== FAKE DATA SEND ===================== // 
    
if(!(<= hittype <= 4) || !IsPlayerConnected(playerid))
    {
        
// ur code
        
return 0;
    }
    
// ==================================================== //

    // ===================== BULLET CRASHER ===================== // 
    
if(!(22 <= weaponid <= 34 || weaponid == 38))
    {
        
// ur code
        
return 0;
    } 
__________________
actor_plus - v4.1.2
I'm a goner, somebody catch my breath,
I'm a goner, somebody catch my breath
Dayrion is online now   Reply With Quote
Old 14/05/2017, 06:12 PM   #14
Logic_
High-roller
 
Logic_'s Avatar
 
Join Date: Jun 2015
Location: Next to Oblivion (Kalcor's place)
Posts: 1,337
Reputation: 236
Default Re: Fight Against Undetectable weapon Hacks

bullet crasher was patched in 0.3.7
__________________

Current projects
Roleplay scripts and San Andreas Battle Royale
Providing SA-MP, G-MOD, Web hosting and Hosted tab listing for cheap @ www.prestigesteve.com.
Logic_ is offline   Reply With Quote
Old 14/05/2017, 08:24 PM   #15
Astralis
High-roller
 
Join Date: Sep 2009
Location: France
Posts: 3,228
Reputation: 448
Default Re: Fight Against Undetectable weapon Hacks

Good share.
__________________
http://samp4you.com - SA-MP Server Hosting
Hosted Tab 25/mo || 50 Slots 3/mo
PaySafeCard/Skrill/PayPal/Bank Accepted!
English Support & Anti-DDoS Protected

Astralis is offline   Reply With Quote
Old 15/05/2017, 11:47 AM   #16
JaKe Elite
High-roller
 
JaKe Elite's Avatar
 
Join Date: Apr 2012
Location: Philippines
Posts: 3,694
Reputation: 476
Default Re: Fight Against Undetectable weapon Hacks

Quote:
Originally Posted by Logic_ View Post
bullet crasher was patched in 0.3.7
This has nothing to do with bullet crasher, Player spawns a weapon on their screen but the server (& players streamed in) doesn't recognizes the weapon which makes the server thinks that the hacker is holding nothing (by passing the regular weapon anticheats)
JaKe Elite is offline   Reply With Quote
Old 15/05/2017, 06:10 PM   #17
Dayrion
High-roller
 
Dayrion's Avatar
 
Join Date: Jan 2016
Location: France
Posts: 1,721
Reputation: 206
Default Re: Fight Against Undetectable weapon Hacks

Quote:
Originally Posted by JaKe Elite View Post
This has nothing to do with bullet crasher, Player spawns a weapon on their screen but the server (& players streamed in) doesn't recognizes the weapon which makes the server thinks that the hacker is holding nothing (by passing the regular weapon anticheats)
He answered me.
__________________
actor_plus - v4.1.2
I'm a goner, somebody catch my breath,
I'm a goner, somebody catch my breath
Dayrion is online now   Reply With Quote
Old 15/05/2017, 07:31 PM   #18
jlalt
High-roller
 
Join Date: Oct 2014
Posts: 1,358
Reputation: 333
Default Re: Fight Against Undetectable weapon Hacks

If I am not wrong player weapon doesn't update if he is sitting in a vehicle.
So maybe its possible yet to sit as passenger, turn on the hack, get head out of window and start shooting?
jlalt is offline   Reply With Quote
Old 15/05/2017, 09:49 PM   #19
Hansrutger
Gangsta
 
Hansrutger's Avatar
 
Join Date: May 2011
Location: Sweden
Posts: 929
Reputation: 158
Default Re: Fight Against Undetectable weapon Hacks

Quote:
Originally Posted by jlalt View Post
If I am not wrong player weapon doesn't update if he is sitting in a vehicle.
So maybe its possible yet to sit as passenger, turn on the hack, get head out of window and start shooting?
That is fully correct. I had myself being banned over and over again on my test server because I didn't take into count if player is in vehicle, very important part!

The weapon that the player held before entering the vehicle will be recorded from GetPlayerWeapon. HOWEVER! I have not tested if it's valid on OnGivePlayerDamage or OnPlayerTakeDamage yet so someone feel free to shed some light here if the parameter that is passed into those callbacks are old weapon ids.
__________________


Hansrutger is offline   Reply With Quote
Old 16/05/2017, 12:42 AM   #20
JaKe Elite
High-roller
 
JaKe Elite's Avatar
 
Join Date: Apr 2012
Location: Philippines
Posts: 3,694
Reputation: 476
Default Re: Fight Against Undetectable weapon Hacks

Quote:
Originally Posted by jlalt View Post
If I am not wrong player weapon doesn't update if he is sitting in a vehicle.
So maybe its possible yet to sit as passenger, turn on the hack, get head out of window and start shooting?
Quote:
Originally Posted by Hansrutger View Post
That is fully correct. I had myself being banned over and over again on my test server because I didn't take into count if player is in vehicle, very important part!

The weapon that the player held before entering the vehicle will be recorded from GetPlayerWeapon. HOWEVER! I have not tested if it's valid on OnGivePlayerDamage or OnPlayerTakeDamage yet so someone feel free to shed some light here if the parameter that is passed into those callbacks are old weapon ids.
Surprisingly the weaponid parameters OnPlayerWeaponShot & OnPlayerGive(Take)Damage is reliable as it returns the player's correct holding weapon while they are on the vehicle.

Testing in game (with debug messages);
Note the message "Weapon I am holding" returns GetPlayerWeapon

JaKe Elite 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
Anti Weapon hacks sscarface Scripting Help 2 02/07/2015 01:50 PM
Anti Weapon hacks STONEGOLD Scripting Help 3 24/06/2015 02:10 PM
[FilterScript] Music | Anti jet-pack hacks | Anti weapon hacks LeXuZ Filterscripts 3 23/10/2014 06:15 PM
Anti Weapon Hacks, Flooding Chat UnknownGamer Scripting Help 12 05/12/2012 12:21 PM
Anti Weapon Hacks Not Working Medardo4Life Scripting Help 5 27/11/2011 09:40 PM


All times are GMT. The time now is 08:53 PM.


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