mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
- Moved player_countMagazines to \compile\ folder - Removed several unused and obsolete files - Moved some epoch functions out of compiles.sqf into individual files - Synced order and formatting with 1.8.7. Much easier to compare now. Any changes I make to official DayZ Mod code and files I also submit as a pull request to them.
42 lines
1.5 KiB
Plaintext
42 lines
1.5 KiB
Plaintext
private ["_vehicle","_class","_maxMagazines","_maxWeapons","_maxBackpacks","_magazineCount","_weaponsCount","_backpackCount","_magazineCount_raw","_weaponsCount_raw","_backpackCount_raw","_vehicle_gear_count"];
|
|
_vehicle = _this select 3;
|
|
_class = typeOf _vehicle;
|
|
|
|
_vehicle_gear_count = {
|
|
private "_counter";
|
|
_counter = 0;
|
|
{
|
|
_counter = _counter + _x;
|
|
} count _this;
|
|
_counter
|
|
};
|
|
|
|
// Get max magazines count
|
|
_maxMagazines = getNumber (configFile >> "CfgVehicles" >> _class >> "transportMaxMagazines");
|
|
|
|
// Get max weapon count
|
|
_maxWeapons = getNumber (configFile >> "CfgVehicles" >> _class >> "transportMaxWeapons");
|
|
|
|
// Get max backpack count
|
|
_maxBackpacks = getNumber (configFile >> "CfgVehicles" >> _class >> "transportmaxbackpacks");
|
|
|
|
// Count and show magazines available space
|
|
_magazineCount_raw = getMagazineCargo _vehicle;
|
|
|
|
// Count and show weapons available space
|
|
_weaponsCount_raw = getWeaponCargo _vehicle;
|
|
|
|
// Count and show backpacks available space
|
|
_backpackCount_raw = getBackpackCargo _vehicle;
|
|
|
|
// Count and show magazines available space
|
|
_magazineCount = (_magazineCount_raw select 1) call _vehicle_gear_count;
|
|
|
|
// Count and show weapons available space
|
|
_weaponsCount = (_weaponsCount_raw select 1) call _vehicle_gear_count;
|
|
|
|
// Count and show weapons available space
|
|
_backpackCount = (_backpackCount_raw select 1) call _vehicle_gear_count;
|
|
|
|
cutText [format[(localize "str_epoch_player_1"),_magazineCount,_maxMagazines,_weaponsCount,_maxWeapons,_backpackCount,_maxBackpacks], "PLAIN DOWN"];
|