Quote:
Originally Posted by Mlk27
is there way to check if a weapon belongs to primary or secondary weapons group?
|
There may be a better way but here's what I do:
PHP Code:
public WeaponGroup(iWeapID)
{
//primary returns 1, secondary returns 2
switch (iWeapID)
{
case CSW_SCOUT,CSW_XM1014,CSW_MAC10, CSW_AUG, CSW_UMP45,CSW_SG550,CSW_GALIL,CSW_FAMAS,CSW_AWP,CSW_MP5NAVY,CSW_M249,CSW_M3, CSW_M4A1,CSW_TMP,CSW_G3SG1,CSW_SG552,CSW_AK47,CSW_P90: return 1;
case CSW_P228, CSW_ELITE, CSW_FIVESEVEN, CSW_USP, CSW_GLOCK18, CSW_DEAGLE: return 2;
}
return 0;
}
__________________