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

This commit is contained in:
RD42 2024-08-13 23:13:17 +08:00
parent 7cda157fd9
commit c739657b56
2 changed files with 15 additions and 0 deletions

View File

@ -399,6 +399,20 @@ void CPlayerPed::SetArmedWeapon(int iWeaponType, bool bUnk)
//-----------------------------------------------------------
void CPlayerPed::RemoveWeaponWhenEnteringVehicle()
{
DWORD dwPedPtr = (DWORD)m_pPed;
if(dwPedPtr) {
_asm mov ecx, dwPedPtr
_asm push 0
_asm mov edx, 0x5E6370
_asm call edx
}
}
//-----------------------------------------------------------
WEAPON_SLOT_TYPE * CPlayerPed::GetCurrentWeaponSlot()
{
if(m_pPed) {

View File

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