diff --git a/saco/game/vehicle.cpp b/saco/game/vehicle.cpp index 01b1236..86fa562 100644 --- a/saco/game/vehicle.cpp +++ b/saco/game/vehicle.cpp @@ -127,3 +127,15 @@ BOOL CVehicle::IsWrecked() //----------------------------------------------------------- +BOOL CVehicle::IsDriverLocalPlayer() +{ + if(m_pVehicle) { + if((PED_TYPE *)m_pVehicle->pDriver == GamePool_FindPlayerPed()) { + return TRUE; + } + } + return FALSE; +} + +//----------------------------------------------------------- + diff --git a/saco/game/vehicle.h b/saco/game/vehicle.h index 40e6f1b..8a3d4f6 100644 --- a/saco/game/vehicle.h +++ b/saco/game/vehicle.h @@ -27,6 +27,7 @@ public: BOOL HasSunk(); BOOL IsWrecked(); + BOOL IsDriverLocalPlayer(); BOOL HasADriver(); void SetEngineState(BOOL bState);