Add coin support to dayz_Server and login

New variables: DZE_groupManagement = false; //Enable or disable group
management. Enabled by default
DZE_MoneyStorageClasses = []; // If using a Single currency system
(Z_SingleCurrency = true;), this is an array of object classes players
can store coins in

if Z_SingleCurrency = true; the hive is now set up to handle coin
updates on players, characters, and objects.
if DZE_groupManagement = true; the hive is now set up to save groups

group and coin variables are set in player_monitor.fsm, for
vehicles/objects it's set in the server_monitor.sqf file for objects in
the DZE_MoneyStorageClasses array

Also, this commit includes a change to the way the hive spawns in
vehicles. vehicles are now created at [0,0,0] and moved using setPosATL
to their saved position. Thanks for the tip @ndavalos  @eraser1
This commit is contained in:
icomrade
2016-08-03 18:01:22 -04:00
parent de9d3feb0f
commit ae78fde067
6 changed files with 117 additions and 39 deletions

View File

@@ -67,7 +67,8 @@ if (_status == "ObjectStreamStart") then {
_hitPoints = if ((typeName (_x select 6)) == "ARRAY") then { _x select 6 } else { [] };
_fuel = if ((typeName (_x select 7)) == "SCALAR") then { _x select 7 } else { 0 };
_damage = if ((typeName (_x select 8)) == "SCALAR") then { _x select 8 } else { 0.9 };
_storageMoney = if ((typeName (_x select 9)) == "SCALAR") then { _x select 9 } else { 0 };
//set object to be in maintenance mode
_maintenanceMode = false;
_maintenanceModeVars = [];
@@ -168,13 +169,16 @@ if (_status == "ObjectStreamStart") then {
};
//Create it
_object = createVehicle [_type, _pos, [], 0, if (_type in DayZ_nonCollide) then {"NONE"} else {"CAN_COLLIDE"}];
_object = createVehicle [_type, [0,0,0], [], 0, if (_type in DayZ_nonCollide) then {"NONE"} else {"CAN_COLLIDE"}];
_object setPosATL _pos;
// prevent immediate hive write when vehicle parts are set up
_object setVariable ["lastUpdate",diag_ticktime];
_object setVariable ["ObjectID", _idKey, true];
_object setVariable ["OwnerPUID", _ownerPUID, true];
if ((typeOf (_object)) in DZE_MoneyStorageClasses) then {
_object setVariable [Z_MoneyVariable, _storageMoney, true];
};
if (DZE_permanentPlot && (typeOf _object == "Plastic_Pole_EP1_DZ")) then {
_object setVariable ["plotfriends", _inventory, true];
};