Adv. Trading handle other and free vehicle types

Allow players to sell vehicles without keys and add boat and bike
trading classes to buy/sell
This commit is contained in:
icomrade
2016-04-28 23:40:28 -04:00
parent 4b9d6df0bb
commit bc0d5027f5
6 changed files with 66 additions and 49 deletions

View File

@@ -108,14 +108,19 @@ _normalItems = _normalItems - ["soldItem"];
if (count _vehInfo > 0) then {
{
if (configName(inheritsFrom(configFile >> "CfgWeapons" >> _x)) in ["ItemKeyYellow","ItemKeyBlue","ItemKeyRed","ItemKeyGreen","ItemKeyBlack"]) then {
if (str(getNumber(configFile >> "CfgWeapons" >> _x >> "keyid")) == _keyID) then {
_weaps set [count _weaps, _x];
_deleteVeh = True;
if (!((_vehInfo select 4) in ["trade_any_bicycle", "trade_any_bicycle_old", "trade_any_vehicle_free"])) then {
{
if (configName(inheritsFrom(configFile >> "CfgWeapons" >> _x)) in ["ItemKeyYellow","ItemKeyBlue","ItemKeyRed","ItemKeyGreen","ItemKeyBlack"]) then {
if (str(getNumber(configFile >> "CfgWeapons" >> _x >> "keyid")) == _keyID) then {
_weaps set [count _weaps, _x];
_deleteVeh = True;
};
};
};
} count _normalWeaps;
} count _normalWeaps;
if (_keyID == "0") then {_deleteVeh = True;};
} else {
_deleteVeh = True;
};
};
{