1.0.1.1 part 4

This commit is contained in:
vbawol
2013-05-29 16:45:15 -05:00
parent dbe8fb206a
commit f6d2b2a2c0
4 changed files with 412 additions and 338 deletions

View File

@@ -94,6 +94,26 @@ serverVehicleCounter = [];
_object = createVehicle [_type, _pos, [], 0, "CAN_COLLIDE"];
_object setVariable ["lastUpdate",time];
_object setVariable ["ObjectID", _idKey, true];
// fix for leading zero issues on safe codes after restart
if (_object isKindOf "VaultStorageLocked") then {
if(_ownerID == 0) then {
_ownerID = "0000";
} else {
_codeCount = (count (toArray _ownerID));
if(_codeCount == 3) then {
_ownerID = format["0%1", _ownerID];
};
if(_codeCount == 2) then {
_ownerID = format["00%1", _ownerID];
};
if(_codeCount == 1) then {
_ownerID = format["000%1", _ownerID];
};
};
};
_object setVariable ["CharacterID", _ownerID, true];
clearWeaponCargoGlobal _object;