mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-18 01:30:26 +03:00
Organize files a bit and removed non source pbo's
This commit is contained in:
49
SQF/dayz_code/compile/player_gearSync.sqf
Normal file
49
SQF/dayz_code/compile/player_gearSync.sqf
Normal file
@@ -0,0 +1,49 @@
|
||||
private ["_objects"];
|
||||
_objects = nearestObjects [getPosATL player, dayz_updateObjects, 10];
|
||||
{
|
||||
//["dayzUpdateVehicle",[_x,"gear"]] call callRpcProcedure;
|
||||
dayzUpdateVehicle = [_x,"gear"];
|
||||
publicVariableServer "dayzUpdateVehicle";
|
||||
|
||||
} foreach _objects;
|
||||
|
||||
private["_dialog","_magazineArray","_control","_item","_val","_max"];
|
||||
|
||||
disableSerialization;
|
||||
_dialog = _this select 0;
|
||||
_magazineArray = [];
|
||||
|
||||
//Primary Mags
|
||||
for "_i" from 109 to 120 do
|
||||
{
|
||||
_control = _dialog displayCtrl _i;
|
||||
_item = gearSlotData _control;
|
||||
_val = gearSlotAmmoCount _control;
|
||||
_max = getNumber (configFile >> "CfgMagazines" >> _item >> "count");
|
||||
if (_item != "") then {
|
||||
if (_item == "BoltSteel") then { _item = "WoodenArrow" };
|
||||
if (_val != _max) then {
|
||||
_magazineArray set [count _magazineArray,[_item,_val]];
|
||||
} else {
|
||||
_magazineArray set [count _magazineArray,_item];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
//Secondary Mags
|
||||
for "_i" from 122 to 129 do
|
||||
{
|
||||
_control = _dialog displayCtrl _i;
|
||||
_item = gearSlotData _control;
|
||||
_val = gearSlotAmmoCount _control;
|
||||
_max = getNumber (configFile >> "CfgMagazines" >> _item >> "count");
|
||||
if (_item != "") then {
|
||||
if (_val != _max) then {
|
||||
_magazineArray set [count _magazineArray,[_item,_val]];
|
||||
} else {
|
||||
_magazineArray set [count _magazineArray,_item];
|
||||
};
|
||||
};
|
||||
};
|
||||
dayz_unsaved = true;
|
||||
dayz_Magazines = _magazineArray;
|
||||
Reference in New Issue
Block a user