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, 11:45 PM   #11
JaKe Elite
High-roller
 
JaKe Elite's Avatar
 
Join Date: Apr 2012
Location: Philippines
Posts: 3,626
Reputation: 447
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.
__________________

Click here to connect to Opis Gaming Roleplay
Known as Elaine Patterson on Opis-Gaming Roleplay (Server Admin)
JaKe Elite is offline   Reply With Quote
Old 14/05/2017, 05:50 PM   #12
Abagail
High-roller
 
Join Date: Dec 2013
Location: GetPlayerPos(playerid, pos); Scripter/Mapper.
Posts: 3,453
Reputation: 413
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, 06:53 PM   #13
Dayrion
High-roller
 
Dayrion's Avatar
 
Join Date: Jan 2016
Location: France
Posts: 1,473
Reputation: 120
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;
    } 
__________________
What matters isn't to going further, it's the way to get there
Dayrion is offline   Reply With Quote
Old 14/05/2017, 07:12 PM   #14
Logic_
High-roller
 
Logic_'s Avatar
 
Join Date: Jun 2015
Location: Next to Oblivion (Kalcor's place)
Posts: 1,181
Reputation: 176
Default Re: Fight Against Undetectable weapon Hacks

bullet crasher was patched in 0.3.7
__________________
Providing SA-MP, G-MOD, Minecraft, MTA and Web hosting @ https://www.prestigesteve.com.
Top notch quality experience and support!
Logic_ is online now   Reply With Quote
Old 14/05/2017, 09:24 PM   #15
Astralis
High-roller
 
Join Date: Sep 2009
Location: France
Posts: 3,108
Reputation: 411
Default Re: Fight Against Undetectable weapon Hacks

Good share.
__________________
http://samp4you.com
Hosted Tab 25/mo || 100 Slots 5,50/mo
Astralis is offline   Reply With Quote
Old 15/05/2017, 12:47 PM   #16
JaKe Elite
High-roller
 
JaKe Elite's Avatar
 
Join Date: Apr 2012
Location: Philippines
Posts: 3,626
Reputation: 447
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)
__________________

Click here to connect to Opis Gaming Roleplay
Known as Elaine Patterson on Opis-Gaming Roleplay (Server Admin)
JaKe Elite is offline   Reply With Quote
Old 15/05/2017, 07:10 PM   #17
Dayrion
High-roller
 
Dayrion's Avatar
 
Join Date: Jan 2016
Location: France
Posts: 1,473
Reputation: 120
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.
__________________
What matters isn't to going further, it's the way to get there
Dayrion is offline   Reply With Quote
Old 15/05/2017, 08:31 PM   #18
jlalt
High-roller
 
Join Date: Oct 2014
Posts: 1,319
Reputation: 304
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, 10:49 PM   #19
Hansrutger
Gangsta
 
Hansrutger's Avatar
 
Join Date: May 2011
Location: Sweden
Posts: 943
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, 01:42 AM   #20
JaKe Elite
High-roller
 
JaKe Elite's Avatar
 
Join Date: Apr 2012
Location: Philippines
Posts: 3,626
Reputation: 447
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

__________________

Click here to connect to Opis Gaming Roleplay
Known as Elaine Patterson on Opis-Gaming Roleplay (Server Admin)
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 02:50 PM
Anti Weapon hacks STONEGOLD Scripting Help 3 24/06/2015 03:10 PM
[FilterScript] Music | Anti jet-pack hacks | Anti weapon hacks LeXuZ Filterscripts 3 23/10/2014 07:15 PM
Anti Weapon Hacks, Flooding Chat UnknownGamer Scripting Help 12 05/12/2012 01:21 PM
Anti Weapon Hacks Not Working Medardo4Life Scripting Help 5 27/11/2011 10:40 PM


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


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