Forum Jump :

Author Message


Posts: 61
Rank:


Level: Member

Country: en
Location:
Occupation:
Age:
In-game name:

 
#1 Posted at 2007-06-15 00:55        
     
Hey again!

Was just wondering what I needed to type in the init field of my soldier to make him spawn with a custom weapon?

Cheers :)


Author Message


Posts:
Rank:


Level:

Country: 00
Location:
Occupation:
Age: 21
In-game name:

 
#2 Posted at 2007-06-15 02:53        
     
this addweapon "weapon name" without the quotes. You will then also need This addmagazine "weapon magazine" without the quotes. Info for which weapons and magazine names can be found at http://community.bistudio.com/wiki/ArmA:_Weapons


~~EDIT~~ also, i forgot, you might need to put "removeallweapons this" without quotes in before you add weapons to make sure it goes correctly.

~~EDIT2~~ and, there might be different commands to add more then 1 magazine easier then the way I do it, but for my simple mind, I just do the addmagazine thing multiple times, since 1 command only adds 1 magazine.


Advertisement


Author Message


Posts: 499
Rank:


Level: Member

Country: pl
Location: FakeStreet 123
Occupation: School :-(
Age: 28
In-game name:

 
#3 Posted at 2007-06-15 04:24        
     
If the unit already has weapons make sure you first type removeallweapons this;. It should look something like this in the init:
removeallweapons this; this addmagazine "10Rnd_127x99_M107"; this addmagazine "10Rnd_127x99_M107"; this addmagazine "10Rnd_127x99_M107"; this addmagazine "10Rnd_127x99_M107"; this addweapons "m107"
Of course adjust the weapons and magazines to what you want

This post was edited by Flat!!! (2007-10-03 15:30, ago)

11 o'clock Enemy space station 200

Author Message


Posts: 61
Rank:


Level: Member

Country: en
Location:
Occupation:
Age:
In-game name:

 
#4 Posted at 2007-06-15 10:01        
     
Cheers! Really appreciate it :)


Author Message


Posts: 14
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age: 28
In-game name:

 
#5 Posted at 2007-07-20 14:26        
     
im trying to give a unti a HK-G3A3. Ive changed the mags in you script to 20Rnd_556x45_G3mag and the m16 to HK-G3A3. But it gives me an error message when i try to preview it it gives me this message no entry 'bin\config.bin/cfgmagasines20Rnd_556x45_G3mag' when i change the magasines to something else it gives me a similar error message for the weapon
this is what my init looks like.

removeallweapons this; this addmagazine "20Rnd_556x45_G3mag"; this addweapons "HK-G3A3"


Author Message

Big  

Armaholic icons master


Posts: 5559
Rank:


Level: Former Staff

Country: es
Location: Who knows
Occupation: Industrial Engineer
Age: 45
In-game name:

 
#6 Posted at 2007-07-20 14:36        
     
The error is in the mag name:
This is the correct:
30Rnd_556x45_G36
You can check all in this weapon's guide.


Author Message


Posts: 20726
Rank:


Level: Super Admin

Country: nl
Location: The Netherlands
Occupation:
Age: 45
In-game name: Foxhound

 
#7 Posted at 2007-07-20 15:00        
     
I think you are using a custom addon right? Always check the readme of the addon and see if there are some weapon and magazine classnames. ;)
If not......well than you have to open up the .pbo and find out what classes are being used or hope someone else had the same problem and already asked the same question........or ask for help :thumb


Author Message


Posts: 14
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age: 28
In-game name:

 
#8 Posted at 2007-07-20 15:43        
     
yep it was just the name of the amo and we ingame and what it was in the read mee was diffferent , got it working now thanks


Author Message


Posts: 13
Rank:


Level: Member

Country: ca
Location:
Occupation:
Age:
In-game name:

 
#9 Posted at 2009-09-06 01:59        
     
When ever I try to use this I get a message saying "missing ;"


removeallweapons this; this addmagazine "20Rnd_556x45_ M16A2"; this addmagazine "20Rnd_556x45_ M16A2"; this addmagazine "20Rnd_556x45_ M16A2"; this addmagazine "20Rnd_556x45_ M16A2"; this addmagazine "20Rnd_556x45_ M16A2"; this addmagazine "20Rnd_556x45_ M16A2"; this addweapons "M16A2"


Author Message

W0lle  

call me evil


Posts: 1971
Rank:


Country: de
Location:
Occupation: CWR III Project Leader
Age: 105
In-game name:

 
#10 Posted at 2009-09-06 05:35        
     
1. it's addWeapon, not addweapons
2. the default magazine for the M16A2 is 30Rnd_556x45_Stanag, not 20Rnd_556x45_ M16A2

removeAllWeapons this; this addMagazine "30Rnd_556x45_Stanag"; this addMagazine "30Rnd_556x45_Stanag"; this addMagazine "30Rnd_556x45_Stanag"; this addMagazine "30Rnd_556x45_Stanag"; this addMagazine "30Rnd_556x45_Stanag"; this addMagazine "30Rnd_556x45_Stanag"; this addWeapon "M16A2"

But of course you can use 20 round magazines as well, the classname for them is 20Rnd_556x45_Stanag