Create a passive item ability that doesn't do anything (such as +0 armor) and give it thw weapon model as art.
Then set the attachment point to "hand,left" or "hand,right" (or "weapon" if that one exists for your model).
When you're done, you can add the ability to the item you want and whenever someone picks up that item, the weapon model will appear.
Otherwise (if you do it without items), you can use a trigger that looks like:
-
Special Effect - Create a special effect on [your unit] on hand,right with as model assault rifle
I can't access the world editor, but it should look something like this ^^
If you want to remove the weapon later on, create a variable called "weaponeffect" (type: special effect) and add the line "Set weaponeffect = (Last created special effect)" behind the previous trigger.
When you want to remove it, use the action:
-
Special Effect - destroy weaponeffect