quote="Jrb, post: 40742, member: 1784"]Hey guys, I'm having a problem with this. Just testing a few things (added a M240 as a startup weapon), but it doesn't want to work. I feel like I may not be making the array correctly:
It will let me spawn with the M240 (sometimes), but not the ammo. Any ideas?[/quote]
TRY coding it a bit different.
Also, note that your ammo isn't what it should be (i don't think). The M240 ammo is 100Rnd_762x51_M240, not 100Rnd_M240 (normally).
Code:
//Variables
_inventory = [["ItemMap","ItemMatchbox","M240_DZ"],["Skin_Camo1_DZ","100Rnd_M240","100Rnd_M240"]];
_backpack = [];
_items = [];
_magazines = [];
_weapons = [];
_medicalStats = [];
_survival = [0,0,0];
_tent = [];
_state = [];
_direction = 0;
_model = "";
_newUnit = objNull;
_botActive = false;
It will let me spawn with the M240 (sometimes), but not the ammo. Any ideas?[/quote]
TRY coding it a bit different.
Code:
_inventory = [];
_backpack = [];
_items = [];
_magazines = [["Skin_Camo1_DZ","100Rnd_762x51_M240","100Rnd_762x51_M240"]];
_weapons = [["ItemMap","ItemMatchbox","M240_DZ"]];
_medicalStats = [];
_survival = [0,0,0];
_tent = [];
_state = [];
_direction = 0;
_model = "";
_newUnit = objNull;
_botActive = false;
Also, note that your ammo isn't what it should be (i don't think). The M240 ammo is 100Rnd_762x51_M240, not 100Rnd_M240 (normally).