OnPlayerTakeDamage issue
#1

Hello, I'm following a player's health/armor with OnPlayerTakeDamage, but sometimes it appears that the actual GetPlayerHealth/Armour won't be updated for a few seconds after the callback was triggered, and even more times that the callback is triggered but the player takes no damage at all (unlike what is stated in OnPlayerTakeDamage).
Is there any way to solve this issue?
Reply
#2

I cannot understand what you're trying to say, Post Lines, In Game/Compile errors so we can help..
Reply
#3

I'm following a player's health at all times by OnPlayerTakeDamage, but sometimes the callback is being called, but the player hasn't actually been damaged so player health stays the same as before the callback. Probably due to lags or packet loss. Is there a way to fix it?
Reply
#4

Health & armor are not updated when OnPlayerTakeDamage is called.
Reply
#5

Quote:
Originally Posted by Abagail
Посмотреть сообщение
Health & armor are not updated when OnPlayerTakeDamage is called.
Sorry, didn't explain it correctly. I am having a timer check if both GetPlayerHealth and the health var which is updated in OnPlayerTakeDamage are equal. Many times they are not, and player hasn't really get damaged, but the callback was called.
Reply
#6

My advice, either use this or do the same in another way (set all players' team to the same ID, set custom damages for every weapon ID, etc.)
Reply
#7

Please post the code you're working with and we'll get a better understanding of what you're trying to do and how we can help.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)