[saco] Implement/match CPlayerPed::SetWeaponAmmo; it writes the slot ammo found by FindWeaponSlot

This commit is contained in:
ricardoofnl
2026-09-03 02:25:52 +07:00
parent 6cbbd15928
commit fae75bbc87
2 changed files with 11 additions and 0 deletions
+10
View File
@@ -1300,6 +1300,16 @@ CPlayerPed::~CPlayerPed()
//-----------------------------------------------------------
void CPlayerPed::SetWeaponAmmo(BYTE byteWeapon, WORD wAmmo)
{
if(!m_pPed) return;
WEAPON_SLOT_TYPE *pSlot = FindWeaponSlot(byteWeapon);
if(pSlot) pSlot->dwAmmo = wAmmo;
}
//-----------------------------------------------------------
void CPlayerPed::Destroy()
{
DWORD dwPedPtr = (DWORD)m_pPed;
+1
View File
@@ -164,6 +164,7 @@ public:
void SetShopName(char *szNewShopName);
void SetWeaponSkillLevel(int iSkill, WORD wLevel);
void SetWeaponAmmo(BYTE byteWeapon, WORD wAmmo); // .text:100B0080
VECTOR* GetBonePosition(int iBone, VECTOR *vecPos);
VECTOR* GetTransformedBonePosition(int iBone, VECTOR *vecOffset);