void CIVPedWeapons::SetCurrentWeaponByType(eWeaponType weaponType) { if(m_pPedWeapons) { CIVWeaponInfo * pWeaponInfo = g_pCore->GetGame()->GetWeaponInfo(weaponType); if(pWeaponInfo) { eWeaponSlot weaponSlot = pWeaponInfo->GetWeaponInfo()->m_slot; if(m_pWeaponSlots[weaponSlot]->GetType() == weaponType) SetCurrentWeaponBySlot(weaponSlot); } } }
DWORD CIVPedWeapons::GetAmmoByType(eWeaponType weaponType) { if(m_pPedWeapons) { CIVWeaponInfo * pWeaponInfo = g_pCore->GetGame()->GetWeaponInfo(weaponType); if(pWeaponInfo) { eWeaponSlot weaponSlot = pWeaponInfo->GetWeaponInfo()->m_slot; if(m_pWeaponSlots[weaponSlot]->GetType() == weaponType) return GetAmmoBySlot(weaponSlot); } } return 0; }