mirror of
https://github.com/dashr9230/SA-MP.git
synced 2025-09-19 20:26:14 +08:00
[saco] Implement/match CPlayerPed::GetVehicleSeatID()
This commit is contained in:
@ -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()
|
WORD CPlayerPed::GetAmmo()
|
||||||
{
|
{
|
||||||
if(m_pPed) {
|
if(m_pPed) {
|
||||||
|
@ -71,6 +71,7 @@ public:
|
|||||||
VEHICLE_TYPE * GetGtaContactVehicle();
|
VEHICLE_TYPE * GetGtaContactVehicle();
|
||||||
ENTITY_TYPE * GetGtaContactEntity();
|
ENTITY_TYPE * GetGtaContactEntity();
|
||||||
|
|
||||||
|
int GetVehicleSeatID();
|
||||||
float GetDistanceFromVehicle(CVehicle *pVehicle);
|
float GetDistanceFromVehicle(CVehicle *pVehicle);
|
||||||
|
|
||||||
void StartJetpack();
|
void StartJetpack();
|
||||||
|
Reference in New Issue
Block a user