by r00k » Fri Feb 22, 2013 3:55 pm
Look in ITEMS.QC for 'void() weapon_foo =' , these are spawn functions when the map loads.
In WEAPONS.QC, is the code for changing weapons, and firing the weapon.
So you will need
a spawn function which creates the entity, and precaches it's model, sets up a touch function, then spawns the item.
an impulse use to select that weapon, (including cycling to that weapon via impulse 10/12)
addition to w_attack so u can update v_fooweapon anims via player.qc and handle what happens when u shoot the weapon.
plus if the weapon uses any ammo, you need to account for all that too!
Sorry i wrote this off the cuff and in a hurry, if you like i could make a simple weapon and document all required code...