Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
you would have to make different arrays for weapons and magazines then try something likeSo that didn't seem to fix it.
is there a way it could be set up like this?
//Written by Matt L http://opendayz.net/members/matt-l.7134/
// 5/12/2014
//Feel free to edit to your liking, just give credit where it is due!
//Thanks to Armbot for the idea && test server
private ["_incombat","_timeout","_inventory"];
_timeout = player getVariable["combattimeout", 0];
_inCombat = if (_timeout >= diag_tickTime) then { true } else { false };
_inventory = [["M9","M4A3_CCO_EP1","ItemMap","ItemToolbox","ItemHatchet"],["15Rnd_9x19_M9","15Rnd_9x19_M9","ItemBandage","ItemBandage","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","ItemPainkiller","ItemBloodbag","ItemMorphine"]];
if (_inCombat) then {
titleText ["WTF.", "PLAIN DOWN", 3];
sleep 5;
titleFadeOut 1;
} else {
//i think this is wrong, not sure how to call and add the inventory
player spawn _inventory;
reload player;
cuttext ["you are a hero level 2", "PLAIN DOWN"];
sleep 5;
titleFadeOut 1;
};
{player addMagazine [_x,1];} forEach _items;
{player addWeapon [_x,1];} forEach _weps;
Don't add multiples of the same item in the array. Only have 1 classname listed for each item, you have duplicates so that could be doing something to it. If you want more of the items change the [_x,1] to [_x,3] etc, idk why the weapons aren't spawning though.so it spawned the items in not the weps. also something strange each mag only had one round in each one.
//Written by Matt L http://opendayz.net/members/matt-l.7134/
// 5/12/2014
//Feel free to edit to your liking, just give credit where it is due!
//Thanks to Armbot for the idea && test server
private ["_incombat","_timeout","_items","_weps"];
_timeout = player getVariable["combattimeout", 0];
_inCombat = if (_timeout >= diag_tickTime) then { true } else { false };
_items = ["15Rnd_9x19_M9","15Rnd_9x19_M9","ItemBandage","ItemBandage","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","ItemPainkiller","ItemBloodbag","ItemMorphine"];
_weps = ["M9","M4A3_CCO_EP1","ItemMap","ItemToolbox","ItemHatchet"];
if (_inCombat) then {
titleText ["WTF.", "PLAIN DOWN", 3];
sleep 5;
titleFadeOut 1;
} else {
{player addMagazine [_x,1];} forEach _items;
{player addWeapon [_x,1];} forEach _weps;
reload player;
cuttext ["you are a hero level 2", "PLAIN DOWN"];
sleep 5;
titleFadeOut 1;
};
yes, if you want there to be 3 of a certain item, put those in a different array _items3;thank you for explaining that to me , also if i change [_x,3] will that dup everything in that array
{player addMagazine [_x,3];} forEach _items3;
{player addMagazine [_x,1];} forEach _items;
rdmspwn = compile preprocessFileLineNumbers "scripts\rdmspwn.sqf";
waitUntil {!isNil "PVCDZ_plr_Login"};
waitUntil {count PVCDZ_plr_Login > 0};
if ((!isDedicated) && (PVCDZ_plr_Login select 4)) then {call rdmspwn;};