| Mirage Source http://miragesource.net/forums/ |
|
| GetPlayerVital() returning 0. http://miragesource.net/forums/viewtopic.php?f=201&t=4579 |
Page 1 of 1 |
| Author: | Ripe [ Fri Oct 17, 2008 5:39 pm ] |
| Post subject: | GetPlayerVital() returning 0. |
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) |
|
| Author: | Jacob [ Fri Oct 17, 2008 7:08 pm ] |
| Post subject: | Re: GetPlayerVital() returning 0. |
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. |
|
| Author: | Ripe [ Sat Oct 18, 2008 3:30 am ] |
| Post subject: | Re: GetPlayerVital() returning 0. |
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! |
|
| Page 1 of 1 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|