- 318
- 677
as noob as it sounds how can i get health/armor of an enemy player using samp-api, because i get invalid info everytime:
C++:samp::CPlayerInfo* pPlayer = playerPool->GetAt(i); auto hp = remote_player->m_onfootData.m_nHealth; //does work sometimes i think people from that comes to your streamzone gives 0hp auto ap = remote_player->m_onfootData.m_nArmor //does work sometimes i think people from that comes to your streamzone gives 0ap auto hpp = remote_player->m_pPed->GetHealth(); //always 100 auto app = remote_player->m_pPed->GetArmour(); //always 100 auto hpp = remote_player->m_pPed->m_pGamePed->m_fHealth; //always 100 or 0 dont renember auto app = remote_player->m_pPed->m_pGamePed->m_fArmour; //always 100 or 0 dont renember
C++:
sampapi::v037r3::RefNetGame()->m_pPools->m_pPlayer->m_pObject[i]->m_pPlayer->m_pPed->GetHealth();