Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Test call to see if it worked
- diag_log("Testing call to get custom loadout");
- diag_log("Unique_id: "+str(_playerID));
- _key = format["CHILD:666:%1:",_playerID];
- _customloadout = [_key,false,dayZ_hivePipeAuth] call server_hiveReadWrite;
- _custominventory = _customloadout select 0;
- _custombackpack = _customloadout select 1;
- _custommodel = _customloadout select 2;
- diag_log("Call to get loadout made, here are results: Inventory? " + str(_custominventory) + " Backpack? " + str(_custombackpack) + " Model? " + str(_custommodel)); //Maybe custom backpack in future
- //Record initial inventory
- _config = (configFile >> "CfgSurvival" >> "Inventory" >> "Default");
- _mags = getArray (_config >> "magazines");
- _wpns = getArray (_config >> "weapons");
- _bcpk = getText (_config >> "backpack");
- _randomSpot = true;
- _dbLoadout = [_wpns,_mags];
- if (str(initialLoadout) != "[]") then {
- _inventory = initialLoadout;
- _dbLoadout = _inventory;
- };
- //Wait for HIVE to be free
- //Load in custom loadout if found
- if (count _customInventory == 0) then {
- _key = format["CHILD:203:%1:%2:%3:",_charID,_dbLoadout,[_bcpk,[],[]]];
- _key spawn server_hiveWrite;
- } else {
- diag_log("LOADING IN CUSTON LOADOUT");
- _inventory = _custominventory;
- _dbLoadout = _inventory;
- diag_log("bcpk before: " + str(_bcpk));
- _bcpk = _custombackpack;
- diag_log("bcpk after: " + str(_bcpk));
- diag_log("model before: " + str(_model));
- _model = _custommodel;
- diag_log("model after: " + str(_model));
- _backpack = [_bcpk,[[],[]],[[],[]]];
- _key = format["CHILD:203:%1:%2:%3:",_charID,_dbLoadout,[_bcpk,[],[]]];
- _key spawn server_hiveWrite;
- };
Add Comment
Please, Sign In to add comment