Hi,
I don't think it's possible to name weapons or items. You will have to work with the classname instead.
I.e.
Check if player has a radio:
PHP Code:
if (player hasWeapon "ItemRadio") then { hint "I have a radio!"; };
Check if there's a radio lying on the ground (within 50m):
PHP Code:
_holder = (nearestObject [player, "WeaponHolder"]);
if (!(isNull _holder)) then { // Weapon holder found
if ((player distance _holder) > 5) exitWith { hint "its more than 5m away!"; };
_content = getWeaponCargo _holder;
if ("ItemRadio" in _content) then { hint "There is a radio close by, lying on the ground!"; };
};
Not 100% sure, if the second example will work like that (untested).
I hope that helps a bit.