diff --git a/saco/game/common.h b/saco/game/common.h index 1d627a4..4dcc894 100644 --- a/saco/game/common.h +++ b/saco/game/common.h @@ -103,7 +103,11 @@ typedef struct _PED_TYPE DWORD dwActiveVision; // 1280-1284 - char _gap504[156]; + char _gap504[136]; + + DWORD pVehicle; // 1420-1424 + + char _gap590[16]; WEAPON_SLOT_TYPE WeaponSlots[13]; // 1440-1804 diff --git a/saco/game/playerped.cpp b/saco/game/playerped.cpp index 88b6447..1137d11 100644 --- a/saco/game/playerped.cpp +++ b/saco/game/playerped.cpp @@ -136,6 +136,17 @@ BYTE CPlayerPed::GetCurrentWeapon() } //----------------------------------------------------------- + +int CPlayerPed::GetCurrentVehicleID() +{ + if(!m_pPed) return 0; + + VEHICLE_TYPE *pVehicle = (VEHICLE_TYPE *)m_pPed->pVehicle; + return GamePool_Vehicle_GetIndex(pVehicle); +} + +//----------------------------------------------------------- + void CPlayerPed::GiveWeapon(int iWeaponID, int iAmmo) { if(!m_pPed) return; diff --git a/saco/game/playerped.h b/saco/game/playerped.h index 849dd0d..85ad8d9 100644 --- a/saco/game/playerped.h +++ b/saco/game/playerped.h @@ -25,6 +25,7 @@ public: void SetCurrentAim(CAMERA_AIM *pAim); BYTE GetCurrentWeapon(); + int GetCurrentVehicleID(); WORD GetAmmo();