11.05.2017, 13:38
(
Last edited by JaKe Elite; 11/05/2017 at 10:48 PM.
)
Update;
I am not sure if this has been posted here yet but I did like to share yall something, An anti cheat against those so-called "undetectable weapon hacks". The hacks works like this they type in something which alerts the script to make their spawned hack weapons to be undetectable by the server, they then attack the players with those spawned weapons while in reality on server's perspective view they are holding nothing.
So basically, You can actually detect if they are weapon hacking and I have found my own method. You can use OnPlayerGiveDamage and check if they are giving damages to players with their bare hands if the weapons they used to give damage to the player isn't a bare hand they are possibly 99.9% weapon hacking with this so-called "undetectable weapon hack". I haven't tested this on a public server, however, I tried it on my NPC and the debug works, you may try it out yourself.
Any feedbacks are welcome, you may post your feedbacks below.
Bulleted Weapons Detection (Damage Block)
Not Bulleted Weapons Detection (No Damage Block)
Quote:
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. |
So basically, You can actually detect if they are weapon hacking and I have found my own method. You can use OnPlayerGiveDamage and check if they are giving damages to players with their bare hands if the weapons they used to give damage to the player isn't a bare hand they are possibly 99.9% weapon hacking with this so-called "undetectable weapon hack". I haven't tested this on a public server, however, I tried it on my NPC and the debug works, you may try it out yourself.
Any feedbacks are welcome, you may post your feedbacks below.
Bulleted Weapons Detection (Damage Block)
PHP Code:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float: fX, Float: fY, Float: fZ)
{
// Checks if playerid has weaponID 0, and it also checks if the weaponid OnPlayerWeaponShot.
// If the weaponid OPWS isn't zero then they are probably hacking - CHECK IF THEY ARE DESYNC THOUGH.
if(GetPlayerWeapon(playerid) == 0 && weaponid != 0)
{
return 0; // Blocks bullets from being sent to the server client to player client.
}
return 1;
}
PHP Code:
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart)
{
// Checks if the playerid (The player who damages the other player) is not holding any weapon.
// If the weaponid used to attack the other players aren't zero (null) then they are possibly weapon hacking with this undetectable weapon hack.
if(GetPlayerWeapon(playerid) == 0 && weaponid != 0)
{
// Your code here
}
return 1;
}