You should get all weapons of the player and create a bit const with ids of pistols., that means:
Code:
const BITSUM_PISTOLS = ((1<<CSW_USP) | (1<<CSW_GLOCK18) | (1<<CSW_P228) | (1<<CSW_ELITE) | (1<<CSW_FIVESEVEN) | (1<<CSW_DEAGLE))
...
new rgWeapons[32], iWeaponsCount, iWeaponId;
get_user_weapons(this, rgWeapons, iWeaponsCount);
for (new i = 0; i < iWeaponsCount; i++)
{
iWeaponId = rgWeapons[i];
if (!(BITSUM_PISTOLS & (1<<iWeaponId)))
continue;
// something with pistol...
}
__________________