new const m_rgpPlayerItems_CBasePlayer[6] = {367,368,...}
new WeaponEnt = get_pdata_cbase(id, m_rgpPlayerItems_CBasePlayer[2])
new WeaponIndex = cs_get_weapon_id(WeaponEnt)
If he has multiple pistols then to get the others retrieve their index from m_pNext offset(get_pdata_cbase(WeaponEnt, m_pNext, 4)).
Thank you. Is there a way to directly get the weapon name from WeaponEnt or is get_weaponname necessary?