mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-23 06:57:31 +08:00
[saco] Implement CPlayerPed::GetCurrentWeaponSlot()
This commit is contained in:
parent
8f763d8f30
commit
d20bd16a24
@ -95,6 +95,10 @@ typedef struct _PED_TYPE
|
||||
|
||||
WEAPON_SLOT_TYPE WeaponSlots[13]; // 1440-1804
|
||||
|
||||
char _gap70C[12];
|
||||
|
||||
BYTE byteCurWeaponSlot; // 1816-1817
|
||||
|
||||
} PED_TYPE;
|
||||
|
||||
//-----------------------------------------------------------
|
||||
|
@ -46,6 +46,16 @@ CPlayerPed::CPlayerPed()
|
||||
|
||||
//-----------------------------------------------------------
|
||||
|
||||
WEAPON_SLOT_TYPE * CPlayerPed::GetCurrentWeaponSlot()
|
||||
{
|
||||
if(m_pPed) {
|
||||
return &m_pPed->WeaponSlots[m_pPed->byteCurWeaponSlot];
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------
|
||||
|
||||
WEAPON_SLOT_TYPE * CPlayerPed::FindWeaponSlot(DWORD dwWeapon)
|
||||
{
|
||||
if (m_pPed)
|
||||
|
@ -14,6 +14,7 @@ class CPlayerPed : public CEntity
|
||||
{
|
||||
public:
|
||||
|
||||
WEAPON_SLOT_TYPE * GetCurrentWeaponSlot();
|
||||
WEAPON_SLOT_TYPE * FindWeaponSlot(DWORD dwWeapon);
|
||||
|
||||
void StopGoggles();
|
||||
|
Loading…
Reference in New Issue
Block a user