SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 16/05/2017, 03:04 AM   #21
Hansrutger
Gangsta
 
Hansrutger's Avatar
 
Join Date: May 2011
Location: Sweden
Posts: 946
Reputation: 158
Default Re: Fight Against Undetectable weapon Hacks

Thank you for testing, I highly appreciate it!!
__________________


Hansrutger is offline   Reply With Quote
Old 16/05/2017, 06:48 AM   #22
jlalt
High-roller
 
Join Date: Oct 2014
Posts: 1,324
Reputation: 304
Default Re: Fight Against Undetectable weapon Hacks

Quote:
Originally Posted by JaKe Elite View Post
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

Isn't the point that system fools server to pass holding weapon as punch [ 0 ] ? What if that doesn't happen if you're in vehicle?
jlalt is offline   Reply With Quote
Old 16/05/2017, 03:08 PM   #23
JaKe Elite
High-roller
 
JaKe Elite's Avatar
 
Join Date: Apr 2012
Location: Philippines
Posts: 3,631
Reputation: 444
Default Re: Fight Against Undetectable weapon Hacks

I will sort it out shortly, Seems like GetPlayerWeapon is not reliable (I have forgot that I used it in the first place lol) GetPlayerWeaponData will be used instead.
__________________

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 16/05/2017, 03:36 PM   #24
JaKe Elite
High-roller
 
JaKe Elite's Avatar
 
Join Date: Apr 2012
Location: Philippines
Posts: 3,631
Reputation: 444
Default Re: Fight Against Undetectable weapon Hacks

This could work, a temporary fix (Creates a PVar storing player's last weapon they have hold before entering the vehicle) - The server then will force the player to hold that weapon whenever the player tries to switch for a new weapon.

PHP Code:
public OnPlayerStateChange(playeridnewstateoldstate)
{
    if(
newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
    {
        
SetPVarInt(playerid"old_weapon"GetPlayerWeapon(playerid));
    }
    return 
1;
}

public 
OnPlayerUpdate(playerid)
{
    if(
IsPlayerInAnyVehicle(playerid))
    {
        
SetPlayerArmedWeapon(playeridGetPVarInt(playerid"old_weapon"));
    }
    return 
1;

__________________

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 20/06/2017, 09:18 PM   #25
Brys
Big Clucker
 
Brys's Avatar
 
Join Date: Jul 2014
Location: Palestine
Posts: 189
Reputation: 9
Default Re: Fight Against Undetectable weapon Hacks

Good stuff
__________________
Brys is offline   Reply With Quote
Old 22/06/2017, 02:23 AM   #26
Pottus
Godfather
 
Pottus's Avatar
 
Join Date: Jun 2012
Posts: 5,307
Reputation: 1164
Default Re: Fight Against Undetectable weapon Hacks

Why bother beating around the bush with an obsolete tutorial? We have a much better solution that does this and everything this doesn't do and it doesn't require scripting stale bits of code.

http://forum.sa-mp.com/showthread.php?t=563387
Pottus is offline   Reply With Quote
Old 22/06/2017, 06:24 AM   #27
iLearner
Banned
 
Join Date: Apr 2017
Posts: 435
Reputation: 89
Default Re: Fight Against Undetectable weapon Hacks

There are some new cheats with undetectable weapons... Even though players kills other one it doesn't recognizes and this a cancer.
iLearner is offline   Reply With Quote
Old 22/06/2017, 08:06 PM   #28
Spmn
Gangsta
 
Join Date: Jun 2015
Location: Romania
Posts: 528
Reputation: 113
Default Re: Fight Against Undetectable weapon Hacks

I'm not sure that's really undetectable. Just make damage system serverside and check if the HP reported by the client is different from what server knows.
Spmn is online now   Reply With Quote
Old 22/06/2017, 11:07 PM   #29
ISmokezU
Huge Clucker
 
Join Date: Aug 2016
Posts: 496
Reputation: 58
Default Re: Fight Against Undetectable weapon Hacks

Quote:
Originally Posted by Spmn View Post
I'm not sure that's really undetectable. Just make damage system serverside and check if the HP reported by the client is different from what server knows.
That May Work?,

Keep in mind, that there hacks in which weapon switch (Change a Deagle to a Minigun) yet it's still like a deagle. I Actually saw that once on a server. Is there a way to detect this one?

Although hacks such as that is seldom these days.
ISmokezU is offline   Reply With Quote
Old 23/06/2017, 12:01 AM   #30
Spmn
Gangsta
 
Join Date: Jun 2015
Location: Romania
Posts: 528
Reputation: 113
Default Re: Fight Against Undetectable weapon Hacks

Check if the damage inflicted coresponds to the reported weapon. (Eg: if player is shooting with a m4, make sure dmg ~= 10)
Spmn is online now   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 05:50 PM.


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