[saco] Implement/match CPlayerPed::StopJetpack()

This commit is contained in:
RD42 2024-08-11 23:36:29 +08:00
parent 3bb1a5c63d
commit 939bc77912
2 changed files with 21 additions and 0 deletions

View File

@ -432,6 +432,26 @@ void CPlayerPed::SetMoney(int iAmount)
//-----------------------------------------------------------
void CPlayerPed::StopJetpack()
{
if(!m_pPed || IN_VEHICLE(m_pPed)) return;
if(m_pPed->Tasks->pdwJumpJetPack == NULL) return;
DWORD dwJmpVtbl = m_pPed->Tasks->pdwJumpJetPack[0];
if(dwJmpVtbl == 0x8705C4) {
DWORD dwJetPackTask = (DWORD)m_pPed->Tasks->pdwJumpJetPack;
_asm mov ecx, dwJetPackTask
_asm mov edx, 0x6801D0
_asm push 1
_asm call edx
m_pPed->Tasks->pdwJumpJetPack = 0;
}
}
//-----------------------------------------------------------
BOOL CPlayerPed::IsInJetpackMode()
{
if(!m_pPed || IN_VEHICLE(m_pPed)) return FALSE;

View File

@ -53,6 +53,7 @@ public:
void SetImmunities(BOOL bBullet, BOOL bFire, BOOL bExplosion, BOOL bDamage, BOOL bUnknown);
void StopJetpack();
BOOL IsInJetpackMode();
void StartGoggles();