try
hint format ["%1 this is the weapon",primaryweapon player]
im not sure that will work but i think its along thos lines just put that in the players init field
also if the player doesnt have the weapon you want the name of just change the word player from the above sample to the name of the unit
hope that helps syntax is not guranteed
infact ill have a look in the comref for ya
if above doesnt work try
hint format ["%1 this is the weapon",weapons player]
that will return every weapon the player has including secondary and pistols also satchel chargs etc etc
hope it helps