Edroniasty
New Member
- Joined
- Oct 2, 2015
- Messages
- 84
- Reaction score
- 1
Hello! I wanted to compile my tfs 1.2 so that my HP/MANA bar displays in a percents not amount like 4200 HP/ 1000 Mana must be like 100 HP/100 MP, I am looking for help here:
https://otland.net/threads/jak-wysylac-hp-i-mane-w-procentach.181560/
but my protocolgame.cpp lines are different:
instead like in tutorial:
how to solve it? what is the working code for tfs 1.2+?
( sorry for my bad English) rep++ for help!
https://otland.net/threads/jak-wysylac-hp-i-mane-w-procentach.181560/
but my protocolgame.cpp lines are different:
Code:
msg.add<uint16_t>(std::min<int32_t>(player->getHealth(), std::numeric_limits<uint16_t>::max()));
msg.add<uint16_t>(std::min<int32_t>(player->getPlayerInfo(PLAYERINFO_MAXHEALTH), std::numeric_limits<uint16_t>::max()));
instead like in tutorial:
Code:
msg->put<uint16_t>(player->getHealth());
msg->put<uint16_t>(player->getPlayerInfo(PLAYERINFO_MAXHEALTH));
how to solve it? what is the working code for tfs 1.2+?
( sorry for my bad English) rep++ for help!