Posts: 406
Threads: 16
Joined: Nov 2007
Reputation:
0
If the sync has been updated so it is truely just skin hit, what is the difference between these callbacks in 0.3z?
Posts: 637
Threads: 25
Joined: Dec 2010
Reputation:
0
It's not deleted ping, it's only compensation via math functions
Posts: 6,236
Threads: 310
Joined: Jan 2011
Reputation:
0
Hackers can spoof OnPlayerGiveDamage, making it so they can kill other players without even shooting them, however they can't spoof OnPlayerTakeDamage. Clients can't be trusted.
Here's an extract from the wiki:
Note: One thing you can do with GiveDamage is detect when other players report that they have damaged a certain player, and that player hasn't taken any health loss. You can flag those players as suspicious.
You can also set all players to the same team (so they don't take damage from other players) and process all health loss from other players manually.
You might have a server where players get a wanted level if they attack Cop players (or some specific class). In that case you might trust GiveDamage over TakeDamage.
There should be a lot you can do with it. You just have to keep in mind the levels of trust between clients. In most cases it's better to trust the client who is being damaged to report their health/armour (TakeDamage). SA-MP normally does this. GiveDamage provides some extra information which may be useful when you require a different level of trust.
Posts: 1,843
Threads: 8
Joined: Nov 2008
Reputation:
0
You have bodypart detection. Headshots anyone?
Posts: 406
Threads: 16
Joined: Nov 2007
Reputation:
0
takedamage can be spoofed it just uses the player who got shot instead of the shooter, but I understand your point.
Posts: 2,698
Threads: 37
Joined: Mar 2012
Reputation:
0
Just like it's mentioned on the Wiki page, "OnPlayerGiveDamage" gets called when the player gives any sort of damage to the player. It doesn't matter even if the opponent got any damage or not, but this gets called according to the accurate shots or damage given by the player1.
"OnPlayerTakeDamage" gets called whenever the player2 gets damaged, either by player1 or by any circumstances. On the versions below 0.3z, perfect shots would be called under "OnPlayerTakeDamage" only as "OnPlayerGiveDamage" may or may not include lag-shots. As lag-shots are no more in 0.3z, it will go almost the same, however I still think "OnPlayerTakeDamage" can be used to detect if player is getting damaged as there's some bullet matters too.