Taviana 2.0 Custom Loadouts...again

Will695

Member
So i've been racking my brain to get this to work and I was wondering instead of doing this through the database would it be possible to code it in to either the server or mission pbo (dayz.st). As while looking in the server_playerlogin i've found the code that says

//check custom loadout
if statement

i was wondering if i could put in an if statement that says something like
if (model == my unique id
spawn inventory backpack etc....

if anyone has heard of doing this or knows how i would be great full

Will695
 
some where in here maybe

Code:
if (_playerID == "") then {
    _playerID = getPlayerUID _playerObj;
};
 
if ((_playerID == "") or (isNil "_playerID")) exitWith {
    diag_log ("LOGIN FAILED: Player [" + _playerName + "] has no login ID");
};
 
endLoadingScreen;
diag_log ("LOGIN ATTEMPT: " + str(_playerID) + " " + _playerName);
 
_key = format["CHILD:101:%1:%2:%3:",_playerID,dayZ_instance,_playerName];
_primary = [_key,false,dayZ_hivePipeAuth] call server_hiveReadWrite;
 
if (isNull _playerObj or !isPlayer _playerObj) exitWith {
    diag_log ("LOGIN RESULT: Exiting, player object null: " + str(_playerObj));
};
 
if ((_primary select 0) == "ERROR") exitWith {
    diag_log format ["LOGIN RESULT: Exiting, failed to load _primary: %1 for player: %2 ",_primary,_playerID];
};
 
//Process request
_newPlayer  = _primary select 1;
_isNew      = count _primary < 6;
_charID    = _primary select 2;
_randomSpot = false;
_hiveVer    = 0;
 
//Set character variables
_inventory = _primary select 4;
_backpack  = _primary select 5;
_survival  = _primary select 6;
_model    = _primary select 7;
_hiveVer  = _primary select 8;
 
// Check custom inventory for new characters
if (_model == "") then {
    _key = format["CHILD:999:select replace(cl.`inventory`, '""', '""""') inventory, replace(cl.`backpack`, '""', '""""') backpack, replace(coalesce(cl.`model`, 'Survivor2_DZ'), '""', '""""') model from `cust_loadout` cl join `cust_loadout_profile` clp on clp.`cust_loadout_id` = cl.`id` where clp.`unique_id` = '?':[%1]:",str(_playerID)];
    _data = "HiveEXT" callExtension _key;
 
    //Process result
    _result = call compile format ["%1", _data];
    _status = _result select 0;
 
    if (_status == "CustomStreamStart") then {
        if ((_result select 1) > 0) then {
            _data = "HiveEXT" callExtension _key;
            _result = call compile format ["%1", _data];
            _inventory = call compile (_result select 0);
            _backpack = call compile (_result select 1);
            _model = call compile (_result select 2);
        };
    };
};
if (!(_model in ["SurvivorW2_DZ","Survivor2_DZ","Survivor3_DZ","Sniper1_DZ","Soldier1_DZ","Camo1_DZ","Bandit1_DZ","Rocket_DZ","TK_CIV_Takistani01_EP1","TK_CIV_Takistani05_EP1","TK_INS_Soldier_EP1","CZ_Soldier_DES_EP1","US_Soldier_EP1","BAF_Soldier_MTP","BAF_Soldier_DDPM","BAF_Soldier_L_MTP","BAF_Soldier_L_DDPM","BAF_Soldier_Officer_MTP","BAF_Soldier_Officer_DDPM","BAF_Soldier_Sniper_MTP","BAF_Soldier_SniperH_MTP","BAF_Soldier_SniperN_MTP","Villager1","Worker1","Citizen3"])) then {
    _model = "Survivor2_DZ";
};
 
Back
Top