Remove FNC_getPlayerUID

It's been over two years since it was added. All servers should be
updated to steam ID by now.
This commit is contained in:
ebaydayz
2016-08-23 15:40:26 -04:00
parent 7d27b5c0b1
commit 134a614255
30 changed files with 76 additions and 128 deletions

View File

@@ -5,12 +5,11 @@
// Note:
// This code calls server_publishFullObject which also saves damage, inventory and fuel. Hitpoints are assumed to be empty as this is for buildables only.
private ["_distance","_plotpole","_playerUID","_isowner", "_findNearestObjects","_classname","_objectID", "_objectUID", "_position", "_worldspace", "_object", "_key","_invW","_invM","_invB","_itemsExist","_charID","_inventory","_changecount"];
private ["_distance","_plotpole","_isowner","_findNearestObjects","_classname","_objectID","_objectUID","_position",
"_worldspace","_object","_key","_invW","_invM","_invB","_itemsExist","_charID","_inventory","_changecount"];
_distance = (DZE_PlotPole select 0) + 1;
_plotpole = nearestobject [(vehicle player),"Plastic_Pole_EP1_DZ"];
_playerUID = [player] call FNC_GetPlayerUID;
_changecount = 0;
// Check is owner of the plot pole.
@@ -49,9 +48,9 @@ if (_isowner select 0) then {
_charID = dayz_characterID;
};
_position = getPosATL _object;
_position = getPosATL _object;
_vector = [(vectorDir _object),(vectorUp _object)];
_worldspace = [round(direction _object),_position,_playerUID,_vector];
_worldspace = [round(direction _object),_position,dayz_playerUID,_vector];
_invW = getWeaponCargo _object;
{
@@ -82,14 +81,14 @@ if (_isowner select 0) then {
_damage = damage _object;
_fuel = fuel _object;
PVDZE_fullobj_Publish = [_charID,_object,_worldspace,_classname, _inventory, _hitpoints, _damage, _fuel];
PVDZE_fullobj_Publish = [_charID,_object,_worldspace,_classname,_inventory,_hitpoints,_damage,_fuel];
publicVariableServer "PVDZE_fullobj_Publish";
_object setvariable["ownerPUID", _playerUID];
_object setVariable ["ownerPUID",dayz_playerUID];
_changecount = _changecount + 1;
};
};
} count _findNearestObjects;
format[localize "STR_EPOCH_APLOTFORLIFE_TAKE_OWNERSHIP",_changecount] call dayz_rollingMessages;
};
};

View File

@@ -1,15 +1,13 @@
private ["_location","_isOk","_pondPos","_isPond","_dir","_dis","_sfx","_classname","_object","_playerPos","_item","_hastentitem","_building","_config","_text","_objectsPond","_playerUID"];
private ["_location","_isOk","_pondPos","_isPond","_dir","_dis","_sfx","_classname","_object","_playerPos","_item","_hastentitem","_building","_config","_text","_objectsPond"];
//check if can pitch here
call gear_ui_init;
_playerPos = getPosATL player;
_playerPos = getPosATL player;
_item = _this;
_hastentitem = _this in magazines player;
_location = player modeltoworld [0,2.5,0];
_location set [2,0];
_building = nearestObject [(vehicle player), "HouseBase"];
_isOk = [(vehicle player),_building] call fnc_isInsideBuilding;
_playerUID = [player] call FNC_GetPlayerUID;
//_isOk = true;
//diag_log ("Pitch Tent: " + str(_isok) );
@@ -22,7 +20,7 @@ if (!_hastentitem) exitWith format[localize "str_player_31",_text,"pitch"] call
//blocked
if (["concrete",dayz_surfaceType] call fnc_inString) then { _isOk = true; diag_log ("surface concrete"); };
//Block Tents in pounds
_objectsPond = nearestObjects [_playerPos, [], 10];
_objectsPond = nearestObjects [_playerPos, [], 10];
{
_isPond = ["pond",str(_x),false] call fnc_inString;
if (_isPond) then {
@@ -50,7 +48,7 @@ if (!_isOk) then {
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
[player,_dis,true,(getPosATL player)] spawn player_alertZombies;
_classname = getText (configFile >> "CfgMagazines" >> _item >> "ItemActions" >> "Pitch" >> "create");
_classname = getText (configFile >> "CfgMagazines" >> _item >> "ItemActions" >> "Pitch" >> "create");
sleep 5;
//place tent (local)
@@ -61,14 +59,13 @@ if (!_isOk) then {
_location = getPosATL _object;
_object setVariable ["CharacterID",dayz_characterID,true];
_object setVariable ["ownerPUID",_playerUID,true];
_object setVariable ["ownerPUID",dayz_playerUID,true];
//["PVDZE_obj_Publish",[dayz_characterID,_tent,[_dir,_location],_classname]] call callRpcProcedure;
PVDZE_obj_Publish = [dayz_characterID,_object,[_dir,_location, _playerUID],_classname];
PVDZE_obj_Publish = [dayz_characterID,_object,[_dir,_location,dayz_playerUID],_classname];
publicVariableServer "PVDZE_obj_Publish";
localize "str_success_tent_pitch" call dayz_rollingMessages;
} else {
localize "str_fail_tent_pitch" call dayz_rollingMessages;
};
};