WORD CIVWeapon::GetClipSize()
{
	if(m_pWeapon)
	{
		CIVWeaponInfo * pWeaponInfo = CGame::GetWeaponInfo(m_pWeapon->m_weaponType);

		if(pWeaponInfo)
			return pWeaponInfo->GetWeaponInfo()->m_wClipSize;
	}

	return 0;
}
eWeaponSlot CIVWeapon::GetSlot()
{
	if(m_pWeapon)
	{
		CIVWeaponInfo * pWeaponInfo = CGame::GetWeaponInfo(m_pWeapon->m_weaponType);

		if(pWeaponInfo)
			return pWeaponInfo->GetWeaponInfo()->m_slot;
	}

	return WEAPON_SLOT_UNARMED;
}
Example #3
0
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);
		}
	}
}
Example #4
0
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;
}