added server side logging of purchases of vehicles and removals

This commit is contained in:
[VB]AWOL
2013-10-27 10:22:29 -05:00
parent 80d31bce5f
commit aa14a03c4e
17 changed files with 36 additions and 31 deletions

View File

@@ -5,7 +5,7 @@ if (TradeInprogress) exitWith {}; // Do not allow if any script is running.
{player removeAction _x} forEach s_player_parts;s_player_parts = [];
// [ _trader_id, _category, _action ];
_activatingPlayer = _this select 1;
_activatingPlayer = player;
_trader_id = (_this select 3) select 0;
// _category = (_this select 3) select 1;

View File

@@ -1,7 +1,7 @@
private ["_activatingPlayer"];
// [ _trader_id, _category, _action ];
_activatingPlayer = _this select 1;
_activatingPlayer = player;
//diag_log format["DEBUG DEATH OBJ: %1", _this select 0];

View File

@@ -2,7 +2,7 @@
delete object from db with extra waiting by [VB]AWOL
parameters: _obj
*/
private ["_obj","_objectID","_objectUID","_started","_finished","_animState","_isMedic","_isOk","_proceed","_counter","_limit","_objType","_sfx","_dis","_itemOut","_countOut","_selectedRemoveOutput","_friendlies","_nearestPole","_ownerID","_refundpart","_isWreck","_findNearestPoles","_findNearestPole","_IsNearPlot","_brokenTool","_removeTool","_isDestructable","_isRemovable","_objOwnerID","_isOwnerOfObj","_preventRefund","_ipos","_item","_radius","_isWreckBuilding","_nameVehicle"];
private ["_activatingPlayer","_obj","_objectID","_objectUID","_started","_finished","_animState","_isMedic","_isOk","_proceed","_counter","_limit","_objType","_sfx","_dis","_itemOut","_countOut","_selectedRemoveOutput","_friendlies","_nearestPole","_ownerID","_refundpart","_isWreck","_findNearestPoles","_findNearestPole","_IsNearPlot","_brokenTool","_removeTool","_isDestructable","_isRemovable","_objOwnerID","_isOwnerOfObj","_preventRefund","_ipos","_item","_radius","_isWreckBuilding","_nameVehicle"];
if(TradeInprogress) exitWith { cutText ["Remove already in progress." , "PLAIN DOWN"]; };
TradeInprogress = true;
@@ -12,6 +12,8 @@ s_player_deleteBuild = 1;
_obj = _this select 3;
_activatingPlayer = player;
_objOwnerID = _obj getVariable["CharacterID","0"];
_isOwnerOfObj = (_objOwnerID == dayz_characterID);
@@ -158,7 +160,7 @@ if (_proceed) then {
deleteVehicle _obj;
if(!_isWreck) then {
PVDZE_obj_Delete = [_objectID,_objectUID];
PVDZE_obj_Delete = [_objectID,_objectUID,_activatingPlayer];
publicVariableServer "PVDZE_obj_Delete";
};

View File

@@ -1,7 +1,7 @@
private ["_part","_cancel","_color","_allFixed","_percent","_string","_handle","_damage","_cmpt","_vehicle","_hitpoints"];
// [ _trader_id, _category, _action ];
// _activatingPlayer = _this select 1;
// _activatingPlayer = player;
_vehicle = _this select 3;

View File

@@ -1,7 +1,7 @@
private ["_part","_cancel","_color","_percent","_string","_handle","_damage","_cmpt","_vehicle","_hitpoints"];
// [ _trader_id, _category, _action ];
// _activatingPlayer = _this select 1;
// _activatingPlayer = player;
_vehicle = _this select 3;

View File

@@ -6,7 +6,7 @@ TradeInprogress = true;
{player removeAction _x} forEach s_player_parts;s_player_parts = [];
// [ _trader_id, _category, _action ];
_activatingPlayer = _this select 1;
_activatingPlayer = player;
_trader_id = (_this select 3) select 0;
//_category = (_this select 3) select 1;

View File

@@ -9,7 +9,7 @@ if(_playerNear) exitWith { TradeInprogress = false; cutText ["Cannot trade while
// [part_out,part_in, qty_out, qty_in, loc];
_activatingPlayer = _this select 1;
_activatingPlayer = player;
_part_out = (_this select 3) select 0;
_part_in = (_this select 3) select 1;
@@ -111,7 +111,7 @@ if (_qty >= _qty_in) then {
_location = (getPosATL _veh);
//["PVDZE_veh_Publish",[_veh,[_dir,_location],_part_out,false,_keySelected]] call callRpcProcedure;
PVDZE_veh_Publish2 = [_veh,[_dir,_location],_part_out,true,dayz_characterID];
PVDZE_veh_Publish2 = [_veh,[_dir,_location],_part_out,true,dayz_characterID,_activatingPlayer];
publicVariableServer "PVDZE_veh_Publish2";
player reveal _veh;
@@ -160,8 +160,7 @@ if (_qty >= _qty_in) then {
_objectID = _obj getVariable ["ObjectID","0"];
_objectUID = _obj getVariable ["ObjectUID","0"];
//["PVDZE_obj_Delete",[_objectID,_objectUID]] call callRpcProcedure;
PVDZE_obj_Delete = [_objectID,_objectUID];
PVDZE_obj_Delete = [_objectID,_objectUID,_activatingPlayer];
publicVariableServer "PVDZE_obj_Delete";
deleteVehicle _obj;

View File

@@ -9,7 +9,7 @@ if(_playerNear) exitWith { TradeInprogress = false; cutText ["Cannot trade while
// [part_out,part_in, qty_out, qty_in, loc];
_activatingPlayer = _this select 1;
_activatingPlayer = player;
_part_out = (_this select 3) select 0;
_part_in = (_this select 3) select 1;
@@ -128,7 +128,7 @@ if (_qty >= _qty_in) then {
_location = (getPosATL _veh);
//["PVDZE_veh_Publish",[_veh,[_dir,_location],_part_out,false,_keySelected]] call callRpcProcedure;
PVDZE_veh_Publish2 = [_veh,[_dir,_location],_part_out,false,_keySelected];
PVDZE_veh_Publish2 = [_veh,[_dir,_location],_part_out,false,_keySelected,_activatingPlayer];
publicVariableServer "PVDZE_veh_Publish2";
player reveal _veh;
@@ -154,8 +154,7 @@ if (_qty >= _qty_in) then {
_objectID = _obj getVariable ["ObjectID","0"];
_objectUID = _obj getVariable ["ObjectUID","0"];
//["PVDZE_obj_Delete",[_objectID,_objectUID]] call callRpcProcedure;
PVDZE_obj_Delete = [_objectID,_objectUID];
PVDZE_obj_Delete = [_objectID,_objectUID,_activatingPlayer];
publicVariableServer "PVDZE_obj_Delete";
deleteVehicle _obj;

View File

@@ -9,7 +9,7 @@ if(_playerNear) exitWith { TradeInprogress = false; cutText ["Cannot trade while
// [part_out,part_in, qty_out, qty_in, loc];
_activatingPlayer = _this select 1;
_activatingPlayer = player;
_part_out = (_this select 3) select 0;
_part_in = (_this select 3) select 1;
@@ -127,7 +127,7 @@ if (_qty >= _qty_in) then {
_location = (getPosATL _veh);
//["PVDZE_veh_Publish",[_veh,[_dir,_location],_part_out,false,_keySelected]] call callRpcProcedure;
PVDZE_veh_Publish2 = [_veh,[_dir,_location],_part_out,false,_keySelected];
PVDZE_veh_Publish2 = [_veh,[_dir,_location],_part_out,false,_keySelected,_activatingPlayer];
publicVariableServer "PVDZE_veh_Publish2";
player reveal _veh;
@@ -180,8 +180,7 @@ if (_qty >= _qty_in) then {
_objectID = _obj getVariable ["ObjectID","0"];
_objectUID = _obj getVariable ["ObjectUID","0"];
//["PVDZE_obj_Delete",[_objectID,_objectUID]] call callRpcProcedure;
PVDZE_obj_Delete = [_objectID,_objectUID];
PVDZE_obj_Delete = [_objectID,_objectUID,_activatingPlayer];
publicVariableServer "PVDZE_obj_Delete";
deleteVehicle _obj;

View File

@@ -4,7 +4,7 @@ private ["_part_out","_part_in","_qty_out","_qty_in","_qty","_bos","_bag","_clas
if(TradeInprogress) exitWith { cutText ["Trade already in progress." , "PLAIN DOWN"]; };
TradeInprogress = true;
_activatingPlayer = _this select 1;
_activatingPlayer = player;
_part_out = (_this select 3) select 0;
_part_in = (_this select 3) select 1;

View File

@@ -6,7 +6,7 @@ TradeInprogress = true;
_total_parts_out = 0;
_activatingPlayer = _this select 1;
_activatingPlayer = player;
_part_out = (_this select 3) select 0;
_part_in = (_this select 3) select 1;

View File

@@ -4,7 +4,7 @@ private ["_part_out","_part_in","_qty_out","_qty_in","_textPartIn","_textPartOut
if(TradeInprogress) exitWith { cutText ["Trade already in progress." , "PLAIN DOWN"]; };
TradeInprogress = true;
//_activatingPlayer = _this select 1;
//_activatingPlayer = player;
_part_out = (_this select 3) select 0;
_part_in = (_this select 3) select 1;

View File

@@ -4,7 +4,7 @@ private ["_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_trad
if(TradeInprogress) exitWith { cutText ["Trade already in progress." , "PLAIN DOWN"]; };
TradeInprogress = true;
_activatingPlayer = _this select 1;
_activatingPlayer = player;
_part_out = (_this select 3) select 0;
_part_in = (_this select 3) select 1;

View File

@@ -1,7 +1,7 @@
/*
[_obj] spawn player_packTent;
*/
private ["_objectID","_objectUID","_obj","_ownerID","_dir","_pos","_object","_holder","_weapons","_magazines","_backpacks","_objWpnTypes","_objWpnQty","_countr","_alreadyPacking","_dis","_sfx","_classname","_location"];
private ["_activatingPlayer","_objectID","_objectUID","_obj","_ownerID","_dir","_pos","_object","_holder","_weapons","_magazines","_backpacks","_objWpnTypes","_objWpnQty","_countr","_alreadyPacking","_dis","_sfx","_classname","_location"];
if(TradeInprogress) exitWith { cutText ["Pack tent already in progress." , "PLAIN DOWN"]; };
TradeInprogress = true;
@@ -9,6 +9,8 @@ TradeInprogress = true;
player removeAction s_player_packtent;
s_player_packtent = 1;
_activatingPlayer = player;
_obj = _this;
_ownerID = _obj getVariable["CharacterID","0"];
_objectID = _obj getVariable["ObjectID","0"];
@@ -57,7 +59,7 @@ if(!isNull _obj and alive _obj) then {
_backpacks = getBackpackCargo _obj;
deleteVehicle _obj;
PVDZE_obj_Delete = [_objectID,_objectUID];
PVDZE_obj_Delete = [_objectID,_objectUID,_activatingPlayer];
publicVariableServer "PVDZE_obj_Delete";
if (isServer) then {
PVDZE_obj_Delete call server_deleteObj;

View File

@@ -1,11 +1,13 @@
/*
[_obj] spawn player_packVault;
*/
private ["_obj","_ownerID","_objectID","_objectUID","_alreadyPacking","_location1","_location2","_dir","_pos","_bag","_holder","_weapons","_magazines","_backpacks","_objWpnTypes","_objWpnQty","_countr","_packedClass","_text","_playerNear"];
private ["_activatingPlayer","_obj","_ownerID","_objectID","_objectUID","_alreadyPacking","_location1","_location2","_dir","_pos","_bag","_holder","_weapons","_magazines","_backpacks","_objWpnTypes","_objWpnQty","_countr","_packedClass","_text","_playerNear"];
if(TradeInprogress) exitWith { cutText ["That is already being packed." , "PLAIN DOWN"]; };
TradeInprogress = true;
_activatingPlayer = player;
_obj = _this;
_packedClass = getText (configFile >> "CfgVehicles" >> (typeOf _obj) >> "packedClass");
@@ -60,7 +62,7 @@ if(!isNull _obj and alive _obj) then {
_backpacks = getBackpackCargo _obj;
// Remove from database
PVDZE_obj_Delete = [_objectID,_objectUID];
PVDZE_obj_Delete = [_objectID,_objectUID,_activatingPlayer];
publicVariableServer "PVDZE_obj_Delete";
// Set down vault "take" item

View File

@@ -4,6 +4,7 @@
private["_id","_uid","_key"];
_id = _this select 0;
_uid = _this select 1;
_activatingPlayer = _this select 2;
if (isServer) then {
//remove from database
@@ -12,14 +13,14 @@ if (isServer) then {
_key = format["CHILD:304:%1:",_id];
_key call server_hiveWrite;
#ifdef DZE_SERVER_DEBUG_HIVE
diag_log format["DELETE: Deleted by ID: %1",_id];
diag_log format["DELETE: %1 Deleted by ID: %2",_activatingPlayer,_id];
#endif
} else {
//Send request
_key = format["CHILD:310:%1:",_uid];
_key call server_hiveWrite;
#ifdef DZE_SERVER_DEBUG_HIVE
diag_log format["DELETE: Deleted by UID: %1",_uid];
diag_log format["DELETE: %1 Deleted by UID: %2",_activatingPlayer,_uid];
#endif
};
};

View File

@@ -1,10 +1,11 @@
private ["_isOK","_object","_worldspace","_location","_dir","_class","_uid","_key","_keySelected","_characterID","_donotusekey"];
private ["_activatingPlayer","_isOK","_object","_worldspace","_location","_dir","_class","_uid","_key","_keySelected","_characterID","_donotusekey"];
_object = _this select 0;
_worldspace = _this select 1;
_class = _this select 2;
_donotusekey = _this select 3;
_keySelected = _this select 4;
_activatingPlayer = _this select 5;
if(_donotusekey) then {
_isOK = true;
@@ -115,5 +116,5 @@ _key call server_hiveWrite;
PVDZE_veh_Init = _object;
publicVariable "PVDZE_veh_Init";
diag_log ("PUBLISH: Created " + (_class) + " with ID " + str(_uid));
diag_log ("PUBLISH: " + str(_activatingPlayer) + " Bought " + (_class) + " with ID " + str(_uid));
};