[saco] Implement/match CPlayerPed::ClearAllWeapons()

This commit is contained in:
RD42 2024-08-13 23:12:39 +08:00
parent d4ea1ee91e
commit 7cda157fd9
2 changed files with 18 additions and 0 deletions

View File

@ -352,6 +352,23 @@ void CPlayerPed::GiveWeapon(int iWeaponID, int iAmmo)
//-----------------------------------------------------------
void CPlayerPed::ClearAllWeapons()
{
DWORD dwPedPtr = (DWORD)m_pPed;
*pbyteCurrentPlayer = m_bytePlayerNumber;
if(dwPedPtr) {
_asm mov ecx, dwPedPtr
_asm mov eax, 0x5E6320
_asm call eax
}
*pbyteCurrentPlayer = 0;
}
//-----------------------------------------------------------
void CPlayerPed::SetArmedWeapon(int iWeaponType, bool bUnk)
{
if(!m_pPed) return;

View File

@ -47,6 +47,7 @@ public:
void GiveWeapon(int iWeaponID, int iAmmo);
void SetArmedWeapon(int iWeaponType, bool bUnk);
void ClearAllWeapons();
WEAPON_SLOT_TYPE * GetCurrentWeaponSlot();
WEAPON_SLOT_TYPE * FindWeaponSlot(DWORD dwWeapon);
BOOL HasAmmoForCurrentWeapon();