SA-MP Forums Archive
OnPlayerTakeDamage + Lag Compensation - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: OnPlayerTakeDamage + Lag Compensation (/showthread.php?tid=552955)



OnPlayerTakeDamage + Lag Compensation - Eyce - 27.12.2014

I've been wanting to know this for a long time and still can't find a thread or post related to it. Does the lag compensation apply to OnPlayerTakeDamage()?

What I mean is, if lag compensation is disabled (lag shooting on), would OnPlayerTakeDamage() be accurate to the physical shots only or also to the lag shots? Thanks!


Re: OnPlayerTakeDamage + Lag Compensation - JaydenJason - 27.12.2014

Quote:
Originally Posted by Eyce
Посмотреть сообщение
I've been wanting to know this for a long time and still can't find a thread or post related to it. Does the lag compensation apply to OnPlayerTakeDamage()?

What I mean is, if lag compensation is disabled (lag shooting on), would OnPlayerTakeDamage() be accurate to the physical shots only or also to the lag shots? Thanks!
Its accurate to lag shots


Re: OnPlayerTakeDamage + Lag Compensation - Eyce - 27.12.2014

I'll take your word for it. Thanks!


Re: OnPlayerTakeDamage + Lag Compensation - LivingLikeYouDo - 27.12.2014

If Lag Compensation is off, I bet OnPlayerTakeDamage won't be accurate. Yeah, it won't.


Re: OnPlayerTakeDamage + Lag Compensation - Kyance - 27.12.2014

OnPlayerTakeDamage > OnPlayerGiveDamage or OnPlayerWeaponShot


e: Just now saw the 'physical' and 'lag' shots.

OnPlayerGiveDamage would work on physical shots, and if Lag. Compensation is off(actually doesn't matter if it's on or off..) -- but it's not super accurate.
OnPlayerTakeDamage would work on lag shots(lag. comp off), AND physical shots (lag. comp on) -- it's very accurate


Re: OnPlayerTakeDamage + Lag Compensation - Eyce - 27.12.2014

Quote:
Originally Posted by LivingLikeYouDo
Посмотреть сообщение
If Lag Compensation is off, I bet OnPlayerTakeDamage won't be accurate. Yeah, it won't.
You bet or you know? I guess it just has to be tried.

Quote:
Originally Posted by Kyance
Посмотреть сообщение
OnPlayerTakeDamage > OnPlayerGiveDamage or OnPlayerWeaponShot
e: Just now saw the 'physical' and 'lag' shots.

OnPlayerGiveDamage would work on physical shots, and if Lag. Compensation is off -- but it's not super accurate.
OnPlayerTakeDamage would work on lag shots(lag. comp off), AND physical shots (lag. comp on) -- it's very accurate.
I'm aware that it's more accurate than the other two, but do you think it would work if lag compensation was disabled? --- Nevermind, just saw your edited reply. Thanks though.


Re: OnPlayerTakeDamage + Lag Compensation - Lordzy - 27.12.2014

If lagcompmode is OFF, OnPlayerTakeDamage is accurate. Because OnPlayerGiveDamage is called whenever a player attacks other player, regardless if they other player receives a damage or even get shot.