OnPlayerGiveDamage doesn't detect some types of damage
#1

I don't know if it's a bug, but it is supposed that OnPlayerGiveDamage can detect when some player damages the lag image of another player. It can't detect Explosions, with Rocket Launcher, Heat seeking Rocket Launcher , Grenades and Satchel Charges. It also cannot detect when I run over people and when I burn another player with Molotov or Flame Thrower. If I didn't forget something, it only can detect when I shoot or hit another player.
Reply
#2

I don't think OnPlayerGiveDamage can detect explosion.
Reply
#3

Try OnPlayerTakeDamage, i use it to controll serverside health and it detects about everything afaik.
Reply
#4

Quote:
Originally Posted by T0pAz
Посмотреть сообщение
I don't think OnPlayerGiveDamage can detect explosion.
It's supposed to.
Reply
#5

Quote:
Originally Posted by Richie©
Посмотреть сообщение
Try OnPlayerTakeDamage, i use it to controll serverside health and it detects about everything afaik.
I use OnPlayerGiveDamage for health hack anticheat, if you use certain cheat tool that all we know, only shots and hits can damage the cheater player because OnPlayerTakeDamage isn't called when the player has god mode.
It also serves to make an anti lead-shot, if you shoot some player with the rocket launcher and it has 250 ping, you won't hit him because his lag image, if OnPlayerGiveDamage would detect that, it would be possible to do a full anti lead-shot.
Reply
#6

The differences between OnPlayerGiveDamage and OnPlayerTakeDamage:

OnPlayerGiveDamage

pawn Код:
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid)
  • True and fake damage are recordable on its bully's screen. (In short will be only called without using the "lag shot")
  • Will be NOT always called if a player has been damaged.
  • Not a trustable callback to write an anti cheating system in (Of course it depends on you if you do it right)
OnPlayerTakeDamage
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
  • Mostly real damage is recordable by it (Victim side damage)
  • Almost a perfect callback to write an anti cheating system in.
Reply
#7

OnPlayerTakeDamage isn't a trustable callback, do you know why?
When you have that cheat tool that all we know (i don't want to name it) OnPlayerTakeDamage isn't called because there's no damage animation. So your trustable callback sometimes returns wrong id and isn't very accurate. Do you call it "trustable"? Don't make me laught, man. Just test it and you will know what I mean.
Reply
#8

Of course it will not be called if the player uses cheats such as godmode, BUT OnPlayerGiveDamage is a more way untrustable callback since you can even call this function (bully sided) by sending fake data to the server (It will be only called if you hit your enemies lag shadow (The body which was synced some ms ago) and as we know that if you don't hit the enemy on his/her screen so no damage will happen so your anti cheat in OnPlayerGiveDamage is not accurate enough)
Reply
#9

Quote:
Originally Posted by Kurama
Посмотреть сообщение
OnPlayerTakeDamage isn't a trustable callback, do you know why?
When you have that cheat tool that all we know (i don't want to name it) OnPlayerTakeDamage isn't called because there's no damage animation. So your trustable callback sometimes returns wrong id and isn't very accurate. Do you call it "trustable"? Don't make me laught, man. Just test it and you will know what I mean.
No callback is 'trust-able' if you don't know how to use it properly. You're spitting bullshit.
The OnPlayerGiveDamage has a lot of uses, besides the 'no-lag' idea. Of course Kye wouldn't make the callback if it's pointless and I bet he thought about the no-lag thingy and that's why he made us available the 'GetPlayerTarget' function, which is the client side version for the OnPlayerGiveDamage.

That means in the conditions of:
  • The player has a ranged bullet-type weapon and GetPlayerTarget of the player is the player is displayed on OnPlayerGiveDamage, it's legit.
  • The player has a melee weapon and his Camera Vector matches with target's position range and the distance between both players is < 2.5, It's legit.
  • The player has a rocket-type weapon and his camera vector matches with the range of ~20 meters with the center, the target's position, It's legit.
100% 'trust-able'.
Reply
#10

Its not 100% trust-able.

Read the wiki page.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)