So I now built this:
PHP Code:
int iWeapon = GetPlayerWeaponSlot(iClient, 1);
int iWeaponItemDefIndex = GetEntProp(iWeapon, Prop_Send, "m_iItemDefinitionIndex");
CSWeaponID cswWeaponToCheck = CS_AliasToWeaponID("weapon_usp_silencer");
int iWeaponToCheckItemDefIndex = CS_WeaponIDToItemDefIndex(cswWeaponToCheck);
if (iWeaponItemDefIndex == iWeaponToCheckItemDefIndex)
{
// SUCCESS
}
Which actually seems to work flawlessly. Every weapon has it's own ItemDefIndex that skins don't seem to change.
Thanks a lot. Will report if I have more time to test and if it doesn't work in some case.