SA-MP Forums Archive
OnPlayerGiveDamage doesn't detect some types of damage - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP (https://sampforum.blast.hk/forumdisplay.php?fid=3)
+--- Forum: Bug Reports (https://sampforum.blast.hk/forumdisplay.php?fid=20)
+--- Thread: OnPlayerGiveDamage doesn't detect some types of damage (/showthread.php?tid=320681)



OnPlayerGiveDamage doesn't detect some types of damage - Kurama - 24.02.2012

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.


Re: OnPlayerGiveDamage doesn't detect some types of damage - T0pAz - 24.02.2012

I don't think OnPlayerGiveDamage can detect explosion.


Re: OnPlayerGiveDamage doesn't detect some types of damage - Richie© - 24.02.2012

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


Re: OnPlayerGiveDamage doesn't detect some types of damage - steki. - 24.02.2012

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


Respuesta: Re: OnPlayerGiveDamage doesn't detect some types of damage - Kurama - 24.02.2012

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.


AW: OnPlayerGiveDamage doesn't detect some types of damage - BigETI - 26.02.2012

The differences between OnPlayerGiveDamage and OnPlayerTakeDamage:

OnPlayerGiveDamage

pawn Код:
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid)
OnPlayerTakeDamage
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)



Respuesta: OnPlayerGiveDamage doesn't detect some types of damage - Kurama - 27.02.2012

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.


AW: OnPlayerGiveDamage doesn't detect some types of damage - BigETI - 27.02.2012

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)


Re: Respuesta: OnPlayerGiveDamage doesn't detect some types of damage - steki. - 27.02.2012

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: 100% 'trust-able'.


Re: OnPlayerGiveDamage doesn't detect some types of damage - Shadow_ - 27.02.2012

Its not 100% trust-able.

Read the wiki page.