mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-22 20:12:20 +03:00
+ Added variable pricing to traders. Stock under 5 will be sold at the buy price and over 50 will be bought at the sell price. + Fixed trades not forcing a gear save and added more forced gear saves. + Added test for time based UID for purchased vehicles. + Reduced humanity gained by using a blood bag to 100 down from 250. + Added 5 minute penalty knockout for combat loggers. + Added prevention to logging out in a trader city. fixes #171 + Changed cargo check to only show on alive vehicles. Fixes #176 + Potential fix for gunner on armored SUV. Fixes #172 + Fixes for refueling and repairing that was broken by 1.7.61 + Removed taming of dogs for now. fixes #162
28 lines
962 B
Plaintext
28 lines
962 B
Plaintext
private["_ammoType","_vehicle","_ammo","_weapon","_turret","_text","_array"];
|
|
_array = _this select 3;
|
|
_vehicle = _array select 0;
|
|
_weapon = _array select 1;
|
|
_turret = _array select 2;
|
|
_ammo = "";
|
|
_text = [];
|
|
|
|
call r_player_removeActions2;
|
|
_magazines = getArray (configFile >> "cfgWeapons" >> _weapon >> "magazines");
|
|
{
|
|
_ammoType = getText (configFile >> "cfgMagazines" >> _x >> "displayName");
|
|
if (_ammoType == "") then {_ammoType = _x;};
|
|
if (!(_ammoType in _text)) then {_text set [count _text,_ammoType];};
|
|
if (_x in magazines player) exitWith {_ammo = _x;};
|
|
} forEach _magazines;
|
|
if (_ammo != "") then {
|
|
_vehicle removeMagazineTurret [_ammo,_turret];
|
|
_vehicle addMagazineTurret [_ammo,_turret];
|
|
player removeMagazine _ammo;
|
|
|
|
disableSerialization;
|
|
call dayz_forceSave;
|
|
|
|
cutText [format["You have successfully loaded %1 ammunition.",_ammoType], "PLAIN DOWN"];
|
|
} else {
|
|
cutText [format["You need %1 type of ammo to do this.",_text], "PLAIN DOWN"];
|
|
}; |