mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 14:37:29 +08:00
[saco] Implement/match CPlayerPed::GetVehicleSeatID()
This commit is contained in:
parent
b2d28335a3
commit
ab853af4c2
@ -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) {
|
||||
|
@ -71,6 +71,7 @@ public:
|
||||
VEHICLE_TYPE * GetGtaContactVehicle();
|
||||
ENTITY_TYPE * GetGtaContactEntity();
|
||||
|
||||
int GetVehicleSeatID();
|
||||
float GetDistanceFromVehicle(CVehicle *pVehicle);
|
||||
|
||||
void StartJetpack();
|
||||
|
Loading…
Reference in New Issue
Block a user