From d35afe824d5f2b83b2dc6f2fa473ac7b3f3d48d9 Mon Sep 17 00:00:00 2001 From: RD42 <42702181+dashr9230@users.noreply.github.com> Date: Mon, 5 Aug 2024 18:15:05 +0800 Subject: [PATCH] [saco] Match `CPlayerPed::SetArmedWeapon(...)` --- saco/game/playerped.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/saco/game/playerped.cpp b/saco/game/playerped.cpp index 62a183a..92e2065 100644 --- a/saco/game/playerped.cpp +++ b/saco/game/playerped.cpp @@ -358,7 +358,9 @@ void CPlayerPed::SetArmedWeapon(int iWeaponType, bool bUnk) GameStoreLocalPlayerWeaponSkills(); GameSetRemotePlayerWeaponSkills(m_bytePlayerNumber); - if(m_pPed && IN_VEHICLE(m_pPed) || bUnk) + if((!m_pPed || !IN_VEHICLE(m_pPed)) && !bUnk) + ScriptCommand(&set_actor_armed_weapon,m_dwGTAId,iWeaponType); + else { DWORD dwPedPtr = (DWORD)m_pPed; if(dwPedPtr) { @@ -368,8 +370,6 @@ void CPlayerPed::SetArmedWeapon(int iWeaponType, bool bUnk) _asm call edx } } - else - ScriptCommand(&set_actor_armed_weapon,m_dwGTAId,iWeaponType); GameSetLocalPlayerWeaponSkills();