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

This commit is contained in:
RD42 2024-10-15 17:45:42 +08:00
parent b2d28335a3
commit ab853af4c2
2 changed files with 21 additions and 0 deletions

View File

@ -748,6 +748,26 @@ float CPlayerPed::GetDistanceFromVehicle(CVehicle *pVehicle)
//-----------------------------------------------------------
int CPlayerPed::GetVehicleSeatID()
{
VEHICLE_TYPE *pVehicle;
if( GetActionTrigger() == ACTION_INCAR && (pVehicle = (VEHICLE_TYPE *)m_pPed->pVehicle) != 0 ) {
if(pVehicle->pDriver == m_pPed) return 0;
if(pVehicle->pPassengers[0] == m_pPed) return 1;
if(pVehicle->pPassengers[1] == m_pPed) return 2;
if(pVehicle->pPassengers[2] == m_pPed) return 3;
if(pVehicle->pPassengers[3] == m_pPed) return 4;
if(pVehicle->pPassengers[4] == m_pPed) return 5;
if(pVehicle->pPassengers[5] == m_pPed) return 6;
if(pVehicle->pPassengers[6] == m_pPed) return 7;
}
return (-1);
}
//-----------------------------------------------------------
WORD CPlayerPed::GetAmmo()
{
if(m_pPed) {

View File

@ -71,6 +71,7 @@ public:
VEHICLE_TYPE * GetGtaContactVehicle();
ENTITY_TYPE * GetGtaContactEntity();
int GetVehicleSeatID();
float GetDistanceFromVehicle(CVehicle *pVehicle);
void StartJetpack();