[Tutorial] Fight Against Undetectable weapon Hacks
#21

Thank you for testing, I highly appreciate it!!
Reply
#22

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?
Reply
#23

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.
Reply
#24

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;

Reply
#25

Good stuff
Reply
#26

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.

https://sampforum.blast.hk/showthread.php?tid=563387
Reply
#27

There are some new cheats with undetectable weapons... Even though players kills other one it doesn't recognizes and this a cancer.
Reply
#28

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.
Reply
#29

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.
Reply
#30

Check if the damage inflicted coresponds to the reported weapon. (Eg: if player is shooting with a m4, make sure dmg ~= 10)
Reply
#31

And you still say we don't need a damn update! Cheaters are getting over and over.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)