Как узнать состояние двигателя автомобиля, на котором я еду?
Как узнать статус дверей автомобиля, которым я управляю?
RakNet::BitStream bsDamage;
bsDamage.Write(true);
bsDamage.Write((uint16_t)nearId.first);
bsDamage.Write(resultDamage);
bsDamage.Write((uint32_t)byteWeapon);
bsDamage.Write((uint32_t)nearBone);
rakhook::emul_rpc(115, bsDamage);
sampapi::v037r1::RefNetGame()->GetPlayerPool()->GetLocalPlayer()->SendGiveDamage(nearId.first, resultDamage, byteWeapon, nearBone);
Пуля в человека уже сэмулирована, осталось только урон отправитьemul_rpc эмулирует входящий рпц, а не отправляет его. Так же нужно отправлять пулю в человека (ID_BULLET_SYNC). Еще желательно слать аим синхну (ID_AIM_SYNC) и онфут синхру (ID_ONFOOT_SYNC), чтобы сервер не кикал за читы
Первый параметр должен быть false, если речь идет про исходящий урон.bsDamage.Write(true);
RwMatrix* matrix = RwMatrixCreate();
RwV3d axis = { 0.f, 0.f, 1.f };
RwMatrixRotate(matrix, &axis, 180.f, RwOpCombineType::rwCOMBINEPOSTCONCAT);
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
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
sampapi::v037r3::RefNetGame()->m_pPools->m_pPlayer->m_pObject[i]->m_pPlayer->m_pPed->GetHealth();
CSprite2D::Draw? CRect rect;
rect.left = -0.5f;
rect.top = -0.5f;
rect.right = RsGlobal.maximumWidth;
rect.bottom = RsGlobal.maximumHeight;
sprite.Draw(rect, {0xFF, 0xFF, 0xFF, 0xFF});
Потому что от 0.0 до 1.0 пробуй. Или от 0.0 до 640. 0.0 до 360.0Как правильно работать с рендером черезCSprite2D::Draw?
Картинка рендерится, однако получается что-то не то:C++:CRect rect; rect.left = -0.5f; rect.top = -0.5f; rect.right = RsGlobal.maximumWidth; rect.bottom = RsGlobal.maximumHeight; sprite.Draw(rect, {0xFF, 0xFF, 0xFF, 0xFF});
Посмотреть вложение 250825
А попробуй такКак правильно работать с рендером черезCSprite2D::Draw?
Картинка рендерится, однако получается что-то не то:C++:CRect rect; rect.left = -0.5f; rect.top = -0.5f; rect.right = RsGlobal.maximumWidth; rect.bottom = RsGlobal.maximumHeight; sprite.Draw(rect, {0xFF, 0xFF, 0xFF, 0xFF});
Посмотреть вложение 250825
CRect rect;
rect.left = 1.0f;
rect.top = 0.5f;
rect.right = RsGlobal.maximumWidth + 1.0f;
rect.bottom = RsGlobal.maximumHeight + 0.5f;
sprite.Draw(rect, {0xFF, 0xFF, 0xFF, 0xFF});
дело, если правильно помню, было не в координатах, а в том, что рендерил не в том месте, не в то время (не в пресенте напрямую, а в хуке PlayerTags::DrawLabel)А попробуй так
C++:CRect rect; rect.left = 1.0f; rect.top = 0.5f; rect.right = RsGlobal.maximumWidth + 1.0f; rect.bottom = RsGlobal.maximumHeight + 0.5f; sprite.Draw(rect, {0xFF, 0xFF, 0xFF, 0xFF});