Posts: 149
Threads: 1
Joined: Feb 2012
Reputation:
0
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.
I don't think OnPlayerGiveDamage can detect explosion.
Posts: 368
Threads: 24
Joined: Feb 2012
Try OnPlayerTakeDamage, i use it to controll serverside health and it detects about everything afaik.
Posts: 1,046
Threads: 29
Joined: Mar 2010
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.
Posts: 149
Threads: 1
Joined: Feb 2012
Reputation:
0
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.
Posts: 1,046
Threads: 29
Joined: Mar 2010
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)
Posts: 539
Threads: 24
Joined: Nov 2008
Reputation:
0
Its not 100% trust-able.
Read the wiki page.