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]];
|
||||
|
||||
_diag = diag_tickTime;
|
||||
_dataFormat = ["", [], 0, [], 0, [], [], 0, ""];
|
||||
_dataFormat = ["", [], 0, [], 0, [], [], 0, "", ""];
|
||||
_dataFormatCount = count _dataFormat;
|
||||
EPOCH_VehicleSlots = [];
|
||||
_allVehicles = [];
|
||||
@ -64,7 +64,7 @@ for "_i" from 1 to _maxVehicleLimit do {
|
||||
if !((_arr select _forEachIndex) isEqualType _x) then {_arr set[_forEachIndex, _x]};
|
||||
} 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 {
|
||||
// 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 {
|
||||
_vehicle allowDamage true;
|
||||
};
|
||||
|
@ -28,10 +28,10 @@ if (!isNull _vehicle) then {
|
||||
_hitpoints = (getAllHitPointsDamage _vehicle) param [2,[]];
|
||||
|
||||
_inventory = _vehicle call EPOCH_server_CargoSave;
|
||||
|
||||
|
||||
_colorSlot = _vehicle getVariable ["VEHICLE_TEXTURE",0];
|
||||
_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;
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user