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

This commit is contained in:
RD42 2024-08-11 23:42:32 +08:00
parent 29ec3c70e4
commit ee4a0b40a7
2 changed files with 23 additions and 0 deletions

View File

@ -283,6 +283,27 @@ void CPlayerPed::ForceTargetRotation(float fRotation)
ScriptCommand(&set_actor_z_angle,m_dwGTAId,fRotation);
}
//-----------------------------------------------------------
BOOL CPlayerPed::IsAPassenger()
{
if( m_pPed->pVehicle && IN_VEHICLE(m_pPed) )
{
VEHICLE_TYPE * pVehicle = (VEHICLE_TYPE *)m_pPed->pVehicle;
if( pVehicle->pDriver != m_pPed ||
pVehicle->entity.nModelIndex == TRAIN_PASSENGER ||
pVehicle->entity.nModelIndex == TRAIN_FREIGHT ) {
return TRUE;
}
else {
return FALSE;
}
}
return FALSE;
}
//-----------------------------------------------------------
void CPlayerPed::GiveWeapon(int iWeaponID, int iAmmo)

View File

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