Индивидуальный лут после смерти игрока

Dikken

New Member
По серверу 1.8.0.3 DCC 5.9.4.0

В БД есть колонки для записи стартового лута определнным игрокам cust_loadout_profile и cust_loadout.

Сравнил server_playerLogin.sqf от этой версии и от 1.7.7.1, в 7.1 есть отсылка к БД, а именно
Code:
if (CheckCustInv && _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':[]:", _playerID]; 
_result = _key call server_hiveReadWrite; 
_status = _result select 0; 
if (_status == "CustomStreamStart") then { 
if ((_result select 1) > 0) then { 
_result = _key call server_hiveReadWrite; 
_inventory = call compile (_result select 0); 
_backpack = call compile (_result select 1); 
_model = call compile (_result select 2); 
diag_log ("PLAYER: CUSTOM INVENTORY LOADED: " + str(_inventory)); 
}; 
}; 
};
Вот как это прикрутить в 1.8.0.3 ?, ибо там этого нет и соответственно спавн лута только стартовый для всех.
 
открываешь: server_playerLogin.sqf

ищешь: _hiveVer =_primary select 8;

пропускаешь строку и вставляешь:


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);
};
};
};
У меня работает на 1.8.0.3:)
 
Back
Top