Home   Help Search Login Register  

Author Topic: Adding ammo to ammobox  (Read 1465 times)

0 Members and 1 Guest are viewing this topic.

Offline Grandi

  • Members
  • *
Adding ammo to ammobox
« on: 16 Mar 2011, 20:02:48 »

Offline Aldo15

  • OFP-addict
  • Former Staff
  • ****
    • My OFP missions
Re: Adding ammo to ammobox
« Reply #1 on: 16 Mar 2011, 20:14:25 »
You must write in the init of the ammobox this:

this addMagazineCargo ["HuntingRifleMag" , 4] -----> this is for Magazines
this addWeaponCargo [ "HuntingRifle" , 1] -----> this is for Weapons

You can to change the numbers of weapons and magazines

Cheers,
Aldo15
My OFP stuff
FMF Project by Aldo15. Coming soon.
If in the high school or university, Teachers add a new subject about how to make scripts, missions, for ofp. I'd be number one of my classroom

Offline NightJay0044

  • Former Staff
  • ****
  • Let's make OFPEC great again
    • My Steam Workshop
Re: Adding ammo to ammobox
« Reply #2 on: 20 Mar 2011, 07:01:13 »
I'm sure you may know how , but I'll add it anyways. If you want to add a weapon to a vehicle just use this


Code: [Select]
Vehicle1 addweaponcargo [Huntingrifle",4]
Only difference is the unit, whether a soldier or a vehicle.  :D.

Another note: if you want to add only a hunting rifle, you can add this in it's initialization field. This will remove the weapons of the soldier.

Code: [Select]
Removeallweapons this; this addmagazine "HuntingrifleMag"; this addmagazine "HuntingRifleMag"; This addweapon "HuntingRifle".

You have to add the removeallweapons first, then add the magazines, then add the weapon in order for it to work from my previous experience.

« Last Edit: 20 Mar 2011, 07:04:40 by NightJay0044 »
Who's hyped for Arma4, long live Arma!

Offline Aldo15

  • OFP-addict
  • Former Staff
  • ****
    • My OFP missions
Re: Adding ammo to ammobox
« Reply #3 on: 20 Mar 2011, 12:54:42 »
I agree with NightJay, But I have to say that if you want to add a HuntinRifle to ammobox, you need to add the magazines too, for example:

Code: [Select]
this addWeaponCargo ["HuntingRifle" , 1]
this addMagazineCargo ["HuntingRiflemag" , 5]

If you add only the HuntingRifle and don't add the magazines to ammobox, it will appear, but without magazine

Cheers,
Aldo15
« Last Edit: 20 Mar 2011, 12:56:17 by Aldo15 »
My OFP stuff
FMF Project by Aldo15. Coming soon.
If in the high school or university, Teachers add a new subject about how to make scripts, missions, for ofp. I'd be number one of my classroom