02.02.2017, 16:35
I was making a anti cheat, to remove INV/life hack...
So i made this new health (on server side):
Using OnPlayerGiveDamage i've chaged all weapon damage, but now i have a problem...
There is 3 things left:
- Player on Fire damage (fire like when you get a damage from molotov or get on fire after car explosion)
- Player explosion damage (car,rpg all explosions)
- Fall damage
Anyone know how to detect this 3 ways, because my server just removing vida[playerid] OnPlayerGiveDamage and i need to change it...
If someone have the same problem or want to make on this way to remove hacks i've made this callback to remove health on fall (it's a shit, but better then nothing)
So i made this new health (on server side):
Код:
new vida[MAX_PLAYERS];
There is 3 things left:
- Player on Fire damage (fire like when you get a damage from molotov or get on fire after car explosion)
- Player explosion damage (car,rpg all explosions)
- Fall damage
Anyone know how to detect this 3 ways, because my server just removing vida[playerid] OnPlayerGiveDamage and i need to change it...
If someone have the same problem or want to make on this way to remove hacks i've made this callback to remove health on fall (it's a shit, but better then nothing)
Код:
DanoQueda(playerid) {
new danoqueda, dmgstring[10], anim = GetPlayerAnimationIndex(playerid);
if(anim == 1029) { danoqueda = 10; }
else if(anim == 1208) { danoqueda = 20; }
else if(anim == 1129) { danoqueda = 5; }
if(danoqueda > 0) {
vida[playerid] -= danoqueda;
ultimoplayerquemedeudano[playerid] = playerid;
ultimaarmaquemedeudano[playerid] = 54;
ApplyAnimation(playerid, "GYMNASIUM", "gym_jog_falloff", 4.1, 0, 1, 1, 0, 0);
SetTimerEx("StopAnim", 1500, false, "i", playerid);
}
}


