[saco] Implement and match CPlayerPed::GetCurrentVehicleID()

This commit is contained in:
RD42 2024-05-05 18:54:54 +08:00
parent f7ff8d45df
commit cf591f0fb8
3 changed files with 17 additions and 1 deletions

View File

@ -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

View File

@ -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;

View File

@ -25,6 +25,7 @@ public:
void SetCurrentAim(CAMERA_AIM *pAim);
BYTE GetCurrentWeapon();
int GetCurrentVehicleID();
WORD GetAmmo();