mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-11-27 08:20:35 +00:00
[saco] Implement/match CVehicle::IsOccupied()
This commit is contained in:
parent
d9f2fc7766
commit
fdbaa2a9e6
@ -49,3 +49,20 @@ BOOL CVehicle::HasADriver()
|
||||
|
||||
//-----------------------------------------------------------
|
||||
|
||||
BOOL CVehicle::IsOccupied()
|
||||
{
|
||||
if(m_pVehicle) {
|
||||
if(m_pVehicle->pDriver) return TRUE;
|
||||
if(m_pVehicle->pPassengers[0]) return TRUE;
|
||||
if(m_pVehicle->pPassengers[1]) return TRUE;
|
||||
if(m_pVehicle->pPassengers[2]) return TRUE;
|
||||
if(m_pVehicle->pPassengers[3]) return TRUE;
|
||||
if(m_pVehicle->pPassengers[4]) return TRUE;
|
||||
if(m_pVehicle->pPassengers[5]) return TRUE;
|
||||
if(m_pVehicle->pPassengers[6]) return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------
|
||||
|
||||
|
@ -25,6 +25,9 @@ public:
|
||||
|
||||
void LinkToInterior(int iInterior);
|
||||
|
||||
BOOL IsOccupied();
|
||||
|
||||
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user