mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
add license plate persistence
note: consider alternate plate number system at spawn if duplicates are found using the stock system.
This commit is contained in:
parent
c04724239b
commit
42515e3c56
@ -18,7 +18,7 @@ private ["_actualHitpoints","_allHitpoints","_allVehicles","_allowDamage","_arr"
|
|||||||
params [["_maxVehicleLimit",0]];
|
params [["_maxVehicleLimit",0]];
|
||||||
|
|
||||||
_diag = diag_tickTime;
|
_diag = diag_tickTime;
|
||||||
_dataFormat = ["", [], 0, [], 0, [], [], 0, ""];
|
_dataFormat = ["", [], 0, [], 0, [], [], 0, "", ""];
|
||||||
_dataFormatCount = count _dataFormat;
|
_dataFormatCount = count _dataFormat;
|
||||||
EPOCH_VehicleSlots = [];
|
EPOCH_VehicleSlots = [];
|
||||||
_allVehicles = [];
|
_allVehicles = [];
|
||||||
@ -64,7 +64,7 @@ for "_i" from 1 to _maxVehicleLimit do {
|
|||||||
if !((_arr select _forEachIndex) isEqualType _x) then {_arr set[_forEachIndex, _x]};
|
if !((_arr select _forEachIndex) isEqualType _x) then {_arr set[_forEachIndex, _x]};
|
||||||
} forEach _dataFormat;
|
} forEach _dataFormat;
|
||||||
|
|
||||||
_arr params ["_class","_worldspace","_damage","_hitpoints","_fuel","_inventory","_ammo","_color","_baseClass"];
|
_arr params ["_class","_worldspace","_damage","_hitpoints","_fuel","_inventory","_ammo","_color","_baseClass",["_plateNumber",""]];
|
||||||
|
|
||||||
if (_class != "" && _damage < 1) then {
|
if (_class != "" && _damage < 1) then {
|
||||||
// remove location from worldspace and set to new var
|
// remove location from worldspace and set to new var
|
||||||
@ -211,6 +211,11 @@ for "_i" from 1 to _maxVehicleLimit do {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// add previous license plate
|
||||||
|
if !(_plateNumber isEqualTo "") then {
|
||||||
|
_vehicle setPlateNumber _plateNumber;
|
||||||
|
};
|
||||||
|
|
||||||
if (_allowDamage) then {
|
if (_allowDamage) then {
|
||||||
_vehicle allowDamage true;
|
_vehicle allowDamage true;
|
||||||
};
|
};
|
||||||
|
@ -31,7 +31,7 @@ if (!isNull _vehicle) then {
|
|||||||
|
|
||||||
_colorSlot = _vehicle getVariable ["VEHICLE_TEXTURE",0];
|
_colorSlot = _vehicle getVariable ["VEHICLE_TEXTURE",0];
|
||||||
_baseType = _vehicle getVariable ["VEHICLE_BASECLASS",""];
|
_baseType = _vehicle getVariable ["VEHICLE_BASECLASS",""];
|
||||||
_VAL = [typeOf _vehicle,[getposworld _vehicle,vectordir _vehicle,vectorup _vehicle,true],damage _vehicle,_hitpoints,fuel _vehicle,_inventory,[true,magazinesAllTurrets _vehicle],_colorSlot,_baseType];
|
_VAL = [typeOf _vehicle,[getposworld _vehicle,vectordir _vehicle,vectorup _vehicle,true],damage _vehicle,_hitpoints,fuel _vehicle,_inventory,[true,magazinesAllTurrets _vehicle],_colorSlot,_baseType, getPlateNumber _vehicle];
|
||||||
["Vehicle", _vehHiveKey, EPOCH_expiresVehicle, _VAL] call EPOCH_fnc_server_hiveSETEX;
|
["Vehicle", _vehHiveKey, EPOCH_expiresVehicle, _VAL] call EPOCH_fnc_server_hiveSETEX;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user