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,619
Reputation: 440
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)

185.107.96.218:9901
Beta Testing for JakAdmin 3.5
Join and participate!

Gamemodes || Filterscripts || Includes || Maps || Tutorials
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,402
Reputation: 403
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 offline   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,349
Reputation: 115
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;
    } 
Dayrion is offline   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,188
Reputation: 149
Default Re: Fight Against Undetectable weapon Hacks

bullet crasher was patched in 0.3.7
__________________
SA-MP, G-MOD and Web hosting @ https://www.prestigesteve.com.


Working on:
Prison RP (90%) | Multi Mode (10%) | Call of Duty (Build 2 - 20%)

Today's song: Assassins Creed II - Ezio's Family
Logic_ is offline   Reply With Quote
Old 14/05/2017, 08:24 PM   #15
Astralis
High-roller
 
Join Date: Sep 2009
Location: France
Posts: 2,996
Reputation: 374
Default Re: Fight Against Undetectable weapon Hacks

Good share.
Astralis is online now   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,619
Reputation: 440
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)

185.107.96.218:9901
Beta Testing for JakAdmin 3.5
Join and participate!

Gamemodes || Filterscripts || Includes || Maps || Tutorials
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,349
Reputation: 115
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.
Dayrion is offline   Reply With Quote
Old 15/05/2017, 07:31 PM   #18
jlalt
High-roller
 
Join Date: Oct 2014
Posts: 1,256
Reputation: 274
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: 955
Reputation: 157
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,619
Reputation: 440
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)

185.107.96.218:9901
Beta Testing for JakAdmin 3.5
Join and participate!

Gamemodes || Filterscripts || Includes || Maps || Tutorials
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 09:14 AM.


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