mirror of
https://github.com/dashr9230/SA-MP.git
synced 2025-01-04 00:23:22 +08:00
[saco] Implement and match CPlayerPed::GetCurrentVehicleID()
This commit is contained in:
parent
f7ff8d45df
commit
cf591f0fb8
@ -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
|
||||
|
||||
|
@ -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;
|
||||
|
@ -25,6 +25,7 @@ public:
|
||||
void SetCurrentAim(CAMERA_AIM *pAim);
|
||||
|
||||
BYTE GetCurrentWeapon();
|
||||
int GetCurrentVehicleID();
|
||||
|
||||
WORD GetAmmo();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user