OFPEC Forum

Addons & Mods Depot => OFP - Addons & Mods Beta Testing => Topic started by: Coot on 05 Oct 2005, 19:50:54

Title: How do you find?
Post by: Coot on 05 Oct 2005, 19:50:54
Hey there, got another question.  I think i downloaded and placed in my addons folder the new mp-5 pack successfully.  Where do I find these fire arms?  If its in mission editor, where do i go to find them?  Thanks.
Title: Re:How do you find?
Post by: Baddo on 05 Oct 2005, 20:02:20
You need to know the weapon and magazine class names. Did you read the readme file which came with the addon? Usually class names are listed there. Too bad if it doesn't include a list...

When you know the class names, you can use for example this kind of code to give a unit the new weapon and ammo for it (put your modified version with correct class names to init field of unit, for starters):

Code: [Select]
removeAllWeapons this; this addMagazine "classNameOfYourWeaponsMagazineHere"; this addMagazine "classNameOfYourWeaponsMagazineHere"; this addMagazine "classNameOfYourWeaponsMagazineHere"; this addMagazine "classNameOfYourWeaponsMagazineHere"; this addWeapon "classNameOfYourWeaponHere"
#Edit:

Usually when you only get a weapon addon (not new units), you can't find it straight from the editor but you have to add it to a unit like in the example code. Unit addons can normally be found somewhere from the class and unit lists in the editor.