mirror of
https://github.com/dashr9230/SA-MP.git
synced 2025-01-03 16:13:34 +08:00
[saco] Implement/match CPlayerPed::IsAPassenger()
This commit is contained in:
parent
29ec3c70e4
commit
ee4a0b40a7
@ -285,6 +285,27 @@ void CPlayerPed::ForceTargetRotation(float 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)
|
||||
{
|
||||
if(!m_pPed) return;
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user