Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GetPlayerVital() returning 0.
#1
Hello,

I've been trying to get the health of another player by using GetPlayerVital(Parse(1), Vitals.HP) but for some strange reason it always returns 0. I know there isn't anything wrong with the ID because GetPlayerName(Parse(1)) works fine and if I change it to GetPlayerVital(MyIndex, Vitals.HP) it returns my health fine. I realize I could easily pass the health from the server with the packet containing the ID but I'll like to keep what I'm doing as optimized as possible.

Thanks for any help!

(Also I wasn't sure if this was correct area, this is to do with MS4)
Reply
#2
It seems your trying to do it client side if you are using 'MyIndex'.

If I remember correctly, you don't get any other players vitals.
Reply
#3
Oh okay, I thought it'll be weird to store every players HP on the client, specially since its always changing! I'll just pass it in with the ID packet. Thanks!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)