SetPlayerHealth with anticheat -
TwinkiDaBoss - 16.06.2016
Alright so I will not name the cheat but you all know the story. Its the one that starts with S ends with IT
So since SetPlayerHealth doesnt get called by the anti cheat and shit, detecting by simply checking
PHP Code:
new Float:Hp;
GetPlayerHealth(playerid,HP);
if(HP > some custom HP etc.) return BanPlayer...
wont work.
SetPlayerHealth like doesnt get called and shit in it, so is there any way to prevent it other way around? I tried looking at some tutorials and some discussions that there were, but cant find anything decent enough,
Re: SetPlayerHealth with anticheat -
Gammix - 16.06.2016
GetPlayerHealth returns the health player has, no matter if received with cheats or given by server. And health hacks don't work like that, the health can be a constant value, never changing, so the health never gets increased and your check fails.
There is a anti health hack
here, maybe some help.
Re: SetPlayerHealth with anticheat -
TwinkiDaBoss - 16.06.2016
Yeah I understand you but for example this
PHP Code:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart) {
new ss[128];
format(ss,sizeof(ss),"%s got hit by %s",GetName(playerid),GetName(issuerid));
SendClientMessageToAll(COLOR_RED,ss);
return true;
}
He turns on the cheat - nothing gets detected
he turns off the cheat - everything gets detected
Re: SetPlayerHealth with anticheat -
Gammix - 16.06.2016
Quote:
Originally Posted by TwinkiDaBoss
Yeah I understand you but for example this
PHP Code:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart) {
new ss[128];
format(ss,sizeof(ss),"%s got hit by %s",GetName(playerid),GetName(issuerid));
SendClientMessageToAll(COLOR_RED,ss);
return true;
}
He turns on the cheat - nothing gets detected
he turns off the cheat - everything gets detected
|
OnPlayerGiveDamage is what you should be using.
Re: SetPlayerHealth with anticheat -
TwinkiDaBoss - 16.06.2016
Quote:
Originally Posted by Gammix
OnPlayerGiveDamage is what you should be using.
|
Just tested, same bro :/
ALTHO I finally found a way with
PHP Code:
OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
For some reason neither does OnPlayerGiveDamage or Take doesnt get detected with this version of the cheat, only OnplayerWeaponShot does
Re: SetPlayerHealth with anticheat -
Gammix - 16.06.2016
Quote:
Originally Posted by TwinkiDaBoss
Just tested, same bro :/
ALTHO I finally found a way with
PHP Code:
OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
For some reason neither does OnPlayerGiveDamage or Take doesnt get detected with this version of the cheat, only OnplayerWeaponShot does
|
OnPlayerGiveDamage on the shooter side ?