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;
};
};

View File

@@ -9,7 +9,7 @@ _closePeople = if (DZE_doorManagementMustBeClose) then { player nearEntities ["C
{
if (isPlayer _x) then {
_friendUID = [_x] call FNC_GetPlayerUID;
_friendUID = getPlayerUID _x;
_friendName = name _x;
_userList lbAdd _friendName;
_userList lbSetData [(lbSize _userList) -1,_friendUID];

View File

@@ -1,6 +1,6 @@
// If an array was passed redirect to vanilla player_build (Epoch items pass a string)
if (!isNil "_this" && {typeName _this == "ARRAY"} && {count _this > 0}) exitWith {_this spawn player_buildVanilla;};
private ["_abort","_reason","_distance","_isNear","_lockable","_isAllowedUnderGround","_offset","_classname","_zheightdirection","_zheightchanged","_rotate","_objectHelperPos","_objectHelperDir","_objHDiff","_position","_isOk","_dir","_vector","_cancel","_location2","_buildOffset","_location","_limit","_started","_finished","_animState","_isMedic","_proceed","_counter","_dis","_sfx","_combination_1_Display","_combination_1","_combination_2","_combination_3","_combination","_combinationDisplay","_combination_4","_playerUID","_num_removed","_tmpbuilt","_vUp","_classnametmp","_text","_ghost","_objectHelper","_location1","_object","_helperColor","_canDo","_pos","_onLadder","_vehicle","_inVehicle","_needNear","_canBuild"];
private ["_abort","_reason","_distance","_isNear","_lockable","_isAllowedUnderGround","_offset","_classname","_zheightdirection","_zheightchanged","_rotate","_objectHelperPos","_objectHelperDir","_objHDiff","_position","_isOk","_dir","_vector","_cancel","_location2","_buildOffset","_location","_limit","_started","_finished","_animState","_isMedic","_proceed","_counter","_dis","_sfx","_combination_1_Display","_combination_1","_combination_2","_combination_3","_combination","_combinationDisplay","_combination_4","_num_removed","_tmpbuilt","_vUp","_classnametmp","_text","_ghost","_objectHelper","_location1","_object","_helperColor","_canDo","_pos","_onLadder","_vehicle","_inVehicle","_needNear","_canBuild"];
//Check if building already in progress, exit if so.
if (DZE_ActionInProgress || {r_action_count > 0}) exitWith {localize "str_epoch_player_40" call dayz_rollingMessages;};
@@ -12,7 +12,6 @@ _onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animatio
_vehicle = vehicle player;
_inVehicle = (_vehicle != player);
_playerUID = [player] call FNC_GetPlayerUID;
DZE_Q = false;
DZE_Z = false;
@@ -531,12 +530,12 @@ if (_canBuild select 0) then {
//call publish precompiled function with given args and send public variable to server to save item to database
if (DZE_permanentPlot) then {
_tmpbuilt setVariable ["ownerPUID",_playerUID,true];
PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location,_playerUID, _vector], []];
_tmpbuilt setVariable ["ownerPUID",dayz_playerUID,true];
PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location,dayz_playerUID,_vector],[]];
if (_lockable == 3) then {
_friendsArr = [[_playerUID,toArray (name player)]];
_friendsArr = [[dayz_playerUID,toArray (name player)]];
_tmpbuilt setVariable ["doorfriends", _friendsArr, true];
PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location,_playerUID, _vector], _friendsArr];
PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location,dayz_playerUID,_vector],_friendsArr];
};
} else {
PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location, _vector],[]];
@@ -553,13 +552,13 @@ if (_canBuild select 0) then {
_tmpbuilt spawn player_fireMonitor;
} else {
if (DZE_permanentPlot) then {
_tmpbuilt setVariable ["ownerPUID",_playerUID,true];
_tmpbuilt setVariable ["ownerPUID",dayz_playerUID,true];
if (_canBuild select 1) then {
_friendsArr = [[_playerUID,toArray (name player)]];
_friendsArr = [[dayz_playerUID,toArray (name player)]];
_tmpbuilt setVariable ["plotfriends", _friendsArr, true];
PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location,_playerUID, _vector], _friendsArr];
PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location,dayz_playerUID,_vector],_friendsArr];
} else {
PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location,_playerUID, _vector], []];
PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location,dayz_playerUID,_vector],[]];
};
} else {
PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location, _vector],[]];

View File

@@ -4,7 +4,7 @@ if (!isNil "_this" && {typeName _this == "ARRAY"} && {count _this > 0}) exitWith
DayZ Base Building
Made for DayZ Epoch please ask permission to use/edit/distrubute email vbawol@veteranbastards.com.
*/
private ["_location","_pos","_dir","_classname","_item","_cancel","_reason","_started","_finished","_animState","_isMedic","_dis","_sfx","_tmpbuilt","_onLadder","_require","_text","_offset","_isOk","_location1","_location2","_counter","_limit","_proceed","_num_removed","_position","_object","_canBuildOnPlot","_distance","_classnametmp","_ghost","_lockable","_zheightchanged","_rotate","_combination_1","_combination_2","_combination_3","_combination_4","_combination","_combination_1_Display","_combinationDisplay","_zheightdirection","_abort","_isNear","_needNear","_vehicle","_inVehicle","_objHDiff","_isAllowedUnderGround","_playerUID","_canBuild"];
private ["_location","_pos","_dir","_classname","_item","_cancel","_reason","_started","_finished","_animState","_isMedic","_dis","_sfx","_tmpbuilt","_onLadder","_require","_text","_offset","_isOk","_location1","_location2","_counter","_limit","_proceed","_num_removed","_position","_object","_canBuildOnPlot","_distance","_classnametmp","_ghost","_lockable","_zheightchanged","_rotate","_combination_1","_combination_2","_combination_3","_combination_4","_combination","_combination_1_Display","_combinationDisplay","_zheightdirection","_abort","_isNear","_needNear","_vehicle","_inVehicle","_objHDiff","_isAllowedUnderGround","_canBuild"];
if (DZE_ActionInProgress || {r_action_count > 0}) exitWith {localize "str_epoch_player_40" call dayz_rollingMessages;};
DZE_ActionInProgress = true;
@@ -15,7 +15,6 @@ _onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animatio
_cancel = false;
_canBuildOnPlot = false;
_playerUID = [player] call FNC_GetPlayerUID;
_vehicle = vehicle player;
_inVehicle = (_vehicle != player);
@@ -439,12 +438,12 @@ if (_canBuild select 0) then {
_tmpbuilt setVariable ["CharacterID",_combination,true];
if (DZE_permanentPlot) then {
_tmpbuilt setVariable ["ownerPUID",_playerUID,true];
PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location,_playerUID],_classname];
_tmpbuilt setVariable ["ownerPUID",dayz_playerUID,true];
PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location,dayz_playerUID],_classname];
if (_lockable == 3) then {
_friendsArr = [[_playerUID,toArray (name player)]];
_friendsArr = [[dayz_playerUID,toArray (name player)]];
_tmpbuilt setVariable ["doorfriends", _friendsArr, true];
PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location,_playerUID, _vector], _friendsArr];
PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location,dayz_playerUID,_vector],_friendsArr];
};
} else {
PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location],[]];
@@ -461,13 +460,13 @@ if (_canBuild select 0) then {
_tmpbuilt spawn player_fireMonitor;
} else {
if (DZE_permanentPlot) then {
_tmpbuilt setVariable ["ownerPUID",_playerUID,true];
_tmpbuilt setVariable ["ownerPUID",dayz_playerUID,true];
if (_canBuild select 1) then {
_friendsArr = [[_playerUID,toArray (name player)]];
_friendsArr = [[dayz_playerUID,toArray (name player)]];
_tmpbuilt setVariable ["plotfriends", _friendsArr, true];
PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location,_playerUID],_friendsArr];
PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location,dayz_playerUID],_friendsArr];
} else {
PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location,_playerUID],_classname];
PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location,dayz_playerUID],_classname];
};
} else {
PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location],[]];

View File

@@ -10,8 +10,6 @@ DZE_ActionInProgress = true;
player removeAction s_player_downgrade_build;
s_player_downgrade_build = 1;
_playerUID = [player] call FNC_GetPlayerUID;
// get cursortarget from addaction
_obj = _this select 3;
@@ -108,7 +106,7 @@ if ((count _upgrade) > 0) then {
if (DZE_permanentPlot) then {
_ownerID = _obj getVariable["ownerPUID","0"];
_object setVariable ["ownerPUID",_ownerID,true];
PVDZE_obj_Swap = [_objectCharacterID,_object,[_dir,_location,_playerUID, _vector],_classname,_obj,player];
PVDZE_obj_Swap = [_objectCharacterID,_object,[_dir,_location,dayz_playerUID,_vector],_classname,_obj,player];
} else {
PVDZE_obj_Swap = [_objectCharacterID,_object,[_dir,_location, _vector],_classname,_obj,player];
};

View File

@@ -6,8 +6,8 @@ call fnc_usec_medic_removeActions;
r_action = false;
if (DZE_permanentPlot) then {
_callerID = [_caller] call FNC_GetPlayerUID;
_targetID = [_target] call FNC_GetPlayerUID;
_callerID = getPlayerUID _caller;
_targetID = getPlayerUID _target;
} else {
_callerID = _caller getVariable ["CharacterID", "0"];
_targetID = _target getVariable ["CharacterID", "0"];

View File

@@ -2,7 +2,7 @@
DayZ Base Building Upgrades
Made for DayZ Epoch please ask permission to use/edit/distrubute email vbawol@veteranbastards.com.
*/
private ["_location","_dir","_classname","_missing","_text","_proceed","_num_removed","_object","_missingQty","_itemIn","_countIn","_qty","_removed","_removed_total","_tobe_removed_total","_objectID","_objectUID","_temp_removed_array","_textMissing","_newclassname","_requirements","_obj","_upgrade","_lockable","_combination_1","_combination_2","_combination_3","_combination","_objectCharacterID","_ownerID","_playerUID"];
private ["_location","_dir","_classname","_missing","_text","_proceed","_num_removed","_object","_missingQty","_itemIn","_countIn","_qty","_removed","_removed_total","_tobe_removed_total","_objectID","_objectUID","_temp_removed_array","_textMissing","_newclassname","_requirements","_obj","_upgrade","_lockable","_combination_1","_combination_2","_combination_3","_combination","_objectCharacterID","_ownerID"];
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_52" call dayz_rollingMessages;};
DZE_ActionInProgress = true;
@@ -19,8 +19,6 @@ _objectID = _obj getVariable ["ObjectID","0"];
// Find objectUID
_objectUID = _obj getVariable ["ObjectUID","0"];
_playerUID = [player] call FNC_GetPlayerUID;
if (_objectID == "0" && _objectUID == "0") exitWith {DZE_ActionInProgress = false; s_player_upgrade_build = -1; localize "str_epoch_player_50" call dayz_rollingMessages;};
// Get classname
@@ -128,10 +126,10 @@ if ((count _upgrade) > 0) then {
};
if (DZE_permanentPlot) then {
_ownerID = _obj getVariable["ownerPUID","0"];
if (_ownerID == "0") then { _ownerID = _playerUID; }; //APFL is on but UID is 0 so we will claim it to record the ownership.
if (_ownerID == "0") then { _ownerID = dayz_playerUID; }; //APFL is on but UID is 0 so we will claim it to record the ownership.
_object setVariable ["ownerPUID",_ownerID,true];
if (_lockable == 3) then {
_friendsArr = [[_playerUID,toArray (name player)]];
_friendsArr = [[dayz_playerUID,toArray (name player)]];
_object setVariable ["doorfriends", _friendsArr, true];
PVDZE_obj_Swap = [_objectCharacterID,_object,[_dir,_location,_ownerID,_vector],_classname,_obj,player,_friendsArr];
} else {

View File

@@ -9,7 +9,7 @@ _closePeople = if (DZE_plotManagementMustBeClose) then { player nearEntities ["C
{
if (isPlayer _x) then {
_friendUID = [_x] call FNC_GetPlayerUID;
_friendUID = getPlayerUID _x;
_friendName = name _x;
_userList lbAdd _friendName;
_userList lbSetData [(lbSize _userList) -1,_friendUID];

View File

@@ -4,7 +4,7 @@ DZE_ActionInProgress = true;
delete object from db with extra waiting by [VB]AWOL
parameters: _obj
*/
private ["_activatingPlayer","_obj","_playerUID","_objectID","_objectUID","_started","_finished","_animState","_isMedic","_isOk","_proceed","_counter","_limit","_objType","_sfx","_dis","_itemOut","_countOut","_selectedRemoveOutput","_nearestPole","_ownerID","_refundpart","_isWreck","_IsNearPlot","_brokenTool","_removeTool","_isDestructable","_isRemovable","_objOwnerID","_isOwnerOfObj","_preventRefund","_ipos","_item","_radius","_isWreckBuilding","_nameVehicle","_isModular","_success"];
private ["_activatingPlayer","_obj","_objectID","_objectUID","_started","_finished","_animState","_isMedic","_isOk","_proceed","_counter","_limit","_objType","_sfx","_dis","_itemOut","_countOut","_selectedRemoveOutput","_nearestPole","_ownerID","_refundpart","_isWreck","_IsNearPlot","_brokenTool","_removeTool","_isDestructable","_isRemovable","_objOwnerID","_isOwnerOfObj","_preventRefund","_ipos","_item","_radius","_isWreckBuilding","_nameVehicle","_isModular","_success"];
player removeAction s_player_deleteBuild;
s_player_deleteBuild = 1;
@@ -12,13 +12,11 @@ s_player_deleteBuild = 1;
_obj = _this select 3;
_activatingPlayer = player;
_objOwnerID = "0";
_playerUID = "1";
_isOwnerOfObj = false;
if (DZE_permanentPlot) then {
_objOwnerID = _obj getVariable["ownerPUID","0"];
_playerUID = [player] call FNC_GetPlayerUID;
_isOwnerOfObj = (_objOwnerID == _playerUID);
_isOwnerOfObj = (_objOwnerID == dayz_playerUID);
} else {
_objOwnerID = _obj getVariable["CharacterID","0"];
_isOwnerOfObj = (_objOwnerID == dayz_characterID);

View File

@@ -4,8 +4,6 @@ private ["_part_out","_part_in","_qty_out","_qty_in","_textPartIn","_textPartOut
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;};
DZE_ActionInProgress = true;
//_activatingPlayer = [player] call FNC_GetPlayerUID;
_part_out = (_this select 3) select 0;
_part_in = (_this select 3) select 1;
_qty_out = (_this select 3) select 2;

View File

@@ -8,21 +8,15 @@ private ["_tent","_location","_isOk","_cancel","_location3","_location4","_locat
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_108" call dayz_rollingMessages;};
DZE_ActionInProgress = true;
//disableSerialization;
_playerPos = getPosATL player;
_playerPos = getPosATL player;
_item = _this;
_hastentitem = _this in magazines player;
_offset_x = 0;
_offset_y = 1.5;
_offset_z = 0;
_offset_z_attach = 0.5;
_location = player modeltoworld [_offset_x,_offset_y,_offset_z];
_playerUID = [player] call FNC_GetPlayerUID;
// Allow placement anywhere.
_isOk = true;
//diag_log ("Pitch Tent: " + str(_isok) );
@@ -36,8 +30,6 @@ if (!_hastentitem) exitWith {format[localize "str_player_31",_text,"pitch"] call
// Allow on concrete since we dont force to ground.
// if (["concrete",dayz_surfaceType] call fnc_inString) then { _isOk = true; diag_log ("surface concrete"); };
//diag_log ("Pitch Tent: " + str(_isok) );
_dir = getDir player;
@@ -45,13 +37,10 @@ _dir = getDir player;
_tmpvault = createVehicle ["VaultStorageLocked", _location, [], 0, "CAN_COLLIDE"];
_tmpvault setdir _dir;
_tmpvault attachTo [player,[_offset_x,_offset_y,_offset_z_attach]];
_cancel = false;
_counter = 0;
while {_isOk} do {
if(_counter == 0) then {
localize "str_epoch_player_109" call dayz_rollingMessages;
uiSleep 5;
@@ -82,11 +71,8 @@ while {_isOk} do {
};
detach _tmpvault;
_vault_location = (getPosATL _tmpvault);
// Make sure vault is not placed on road.
if (isOnRoad _vault_location) then { _isOk = true; };
// Make sure vault is not placed in trader citys
@@ -160,7 +146,7 @@ if(!_cancel) then {
_tent setVariable ["CharacterID",_combination,true];
_tent setVariable ["OEMPos",_location,true];
PVDZ_obj_Publish = [_combination,_tent,[_dir,_location, _playerUID],"VaultStorageLocked"];
PVDZ_obj_Publish = [_combination,_tent,[_dir,_location,dayz_playerUID],"VaultStorageLocked"];
publicVariableServer "PVDZ_obj_Publish";
format[localize "str_epoch_player_179",_combination] call dayz_rollingMessages;

View File

@@ -68,7 +68,7 @@ _targetType = if(typeOf _target in DZE_DoorsLocked) then { "DOOR"; } else { "GEN
// determine owner and player id
// and check if player is owner of target object
_playerUID = [_player] call FNC_GetPlayerUID;
_playerUID = getPlayerUID _player;
_characterID = dayz_characterID;
if(DZE_permanentPlot) then {
_targetOwnerUID = _target getVariable ["ownerPUID","0"];

View File

@@ -14,7 +14,7 @@ if ((vehicle player) == player) then {
if (DZE_BackpackAntiTheft) then {
_friendlies = player getVariable ["friendlies",[]];
_rID = if (DZE_permanentPlot) then { [_cTarget] call FNC_GetPlayerUID } else { _cTarget getVariable ["CharacterID","0"] };
_rID = if (DZE_permanentPlot) then { getPlayerUID _cTarget } else { _cTarget getVariable ["CharacterID","0"] };
if ((!canbuild or isInTraderCity) && {_cTarget isKindOf "Man"} && {alive _cTarget} && {isPlayer _cTarget} && {!(_rID in _friendlies)} && {(player distance _cTarget) < 12}) then {
localize "STR_EPOCH_PLAYER_316" call dayz_rollingMessages;
_display closeDisplay 1;

View File

@@ -265,7 +265,7 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur
_characterID = _cursorTarget getVariable ["CharacterID","0"];
if (DZE_permanentPlot) then {
_id = [player] call FNC_GetPlayerUID;
_id = dayz_playerUID;
_ownerID = _cursorTarget getVariable ["ownerPUID","0"];
} else {
_id = dayz_characterID;

View File

@@ -1,16 +0,0 @@
private ["_object","_version","_PID"];
_object = _this select 0;
_version = productVersion select 3;
if (DayZ_UseSteamID) then {
_PID = GetPlayerUID _object;
} else {
if (_version >= 125548) then {
_PID = call (compile "GetPlayerUIDOld _object");
} else {
_PID = GetPlayerUID _object;
diag_log format["Your game version, %1, is less than the required for the old UID system; using Steam ID system instead. Update to 1.63.125548 (or latest steam beta)", _version];
};
};
_PID

View File

@@ -11,7 +11,7 @@ if (dialog) then {closeDialog 0;};
if (visibleMap) then {openMap false;};
_body = player;
_playerID = [player] call FNC_GetPlayerUID;
_playerID = getPlayerUID player;
disableUserInput true;
//add weapon on back to player

View File

@@ -10,7 +10,7 @@ _position = player modeltoWorld [0,0,0];
_dir = getDir player;
_currentAnim = animationState player;
//_currentCamera = cameraView;
_playerUID = [player] call FNC_GetPlayerUID;
_playerUID = getPlayerUID player;
//BackUp Weapons and Mags
_weapons = weapons player;

View File

@@ -3,7 +3,7 @@
Usage: [_obj] spawn player_unlockVault;
Made for DayZ Epoch please ask permission to use/edit/distrubute email vbawol@veteranbastards.com.
*/
private ["_obj","_ownerID","_alreadyPacking","_playerNear","_playerID","_claimedBy","_text","_objType","_ComboMatch","_near"];
private ["_obj","_ownerID","_alreadyPacking","_playerNear","_claimedBy","_text","_objType","_ComboMatch","_near"];
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_21" call dayz_rollingMessages;};
DZE_ActionInProgress = true;
@@ -40,17 +40,16 @@ if (_alreadyPacking == 1) exitWith {DZE_ActionInProgress = false; format[localiz
if (_ComboMatch || (_ownerID == dayz_playerUID)) then {
// Check if any players are nearby if not allow player to claim item.
_playerNear = {isPlayer _x} count (player nearEntities ["CAManBase", 6]) > 1;
_playerID = [player] call FNC_GetPlayerUID;
// Only allow if not already claimed.
if (_claimedBy == "0" || !_playerNear) then {
// Since item was not claimed proceed with claiming it.
_obj setVariable["claimed",_playerID,true];
_obj setVariable["claimed",dayz_playerUID,true];
};
_claimedBy = _obj getVariable["claimed","0"];
if (_claimedBy == _playerID) then {
if (_claimedBy == dayz_playerUID) then {
if (!isNull _obj && alive _obj) then {
_obj setVariable["packing",1];
["Working",0,[3,2,8,0]] call dayz_NutritionSystem;

View File

@@ -255,10 +255,10 @@ if (!isNull _humanityTarget && {isPlayer _humanityTarget} && {alive _humanityTar
// Display name if player opt-in or if friend
_friendlies = player getVariable ["friendlies", []];
if (DZE_permanentPlot) then {
_id = [player] call FNC_GetPlayerUID;
_rID = [_humanityTarget] call FNC_GetPlayerUID;
_id = dayz_playerUID;
_rID = getPlayerUID _humanityTarget;
} else {
_id = player getVariable ["CharacterID","0"];
_id = dayz_characterID;
_rID = _humanityTarget getVariable ["CharacterID","0"];
};
_rfriendlies = _humanityTarget getVariable ["friendlies", []];

View File

@@ -161,10 +161,10 @@ if (!isNull _humanityTarget && {isPlayer _humanityTarget} && {alive _humanityTar
// Display name if player opt-in or if friend
_friendlies = player getVariable ["friendlies", []];
if (DZE_permanentPlot) then {
_id = [player] call FNC_GetPlayerUID;
_rID = [_humanityTarget] call FNC_GetPlayerUID;
_id = dayz_playerUID;
_rID = getPlayerUID _humanityTarget;
} else {
_id = player getVariable ["CharacterID","0"];
_id = dayz_characterID;
_rID = _humanityTarget getVariable ["CharacterID","0"];
};

View File

@@ -186,10 +186,10 @@ if (!isNull _humanityTarget && {isPlayer _humanityTarget} && {alive _humanityTar
// Display name if player opt-in or if friend
_friendlies = player getVariable ["friendlies", []];
if (DZE_permanentPlot) then {
_id = [player] call FNC_GetPlayerUID;
_rID = [_humanityTarget] call FNC_GetPlayerUID;
_id = dayz_playerUID;
_rID = getPlayerUID _humanityTarget;
} else {
_id = player getVariable ["CharacterID","0"];
_id = dayz_characterID;
_rID = _humanityTarget getVariable ["CharacterID","0"];
};
_rfriendlies = _humanityTarget getVariable ["friendlies", []];

View File

@@ -631,7 +631,6 @@ BIS_fnc_numberText = compile preprocessFileLineNumbers "\z\addons\dayz_code\comp
local_lockUnlock = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\local_lockUnlock.sqf"; //When vehicle is local to unit perform locking vehicle
local_gutObjectZ = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\local_gutObjectZ.sqf"; //Generated on the server (or local to unit) when gutting an object
local_spawnObjects = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\local_spawnObjects.sqf";
FNC_GetPlayerUID = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fnc_getPlayerUID.sqf";
FNC_GetSetPos = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fnc_getSetPos.sqf";
FNC_GetPos = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fnc_getPos.sqf";
dayz_EjectPlayer = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\dze_ejectPlayer.sqf";

View File

@@ -362,7 +362,7 @@ class FSM
"" \n
"dayz_loadScreenMsg = localize 'str_player_waiting_creation'; " \n
"" \n
"_playerUID = [player] call FNC_GetPlayerUID;" \n
"_playerUID = getPlayerUID player;" \n
"progressLoadingScreen 0.6;" \n
"if (_debug == 1) then {diag_log [diag_tickTime,'Collect'];};"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;

View File

@@ -19,7 +19,7 @@ _ownerID = _obj getVariable ["ownerPUID","0"];
if (isNull _player) then {diag_log "ERROR: server_handleSafeGear called with Null player object";};
_clientID = owner _player;
_puid = [_player] call FNC_GetPlayerUID;
_puid = getPlayerUID _player;
_statusText = switch (_status) do {
case 0: {"UNLOCKED"};

View File

@@ -1,4 +1,4 @@
private ["_playerObj","_myGroup","_playerUID","_playerPos","_playerName","_puid","_timeout","_message"];
private ["_playerObj","_myGroup","_playerUID","_playerPos","_playerName","_message"];
_playerUID = _this select 0;
_playerName = _this select 1;
@@ -7,8 +7,7 @@ _playerPos = [];
//Lets search all playerable units looking for the objects that matches our playerUID
{
_puid = [_x] call FNC_GetPlayerUID;
if (_puid == _playerUID) exitWith { _playerObj = _x; _playerPos = getPosATL _playerObj;};
if ((getPlayerUID _x) == _playerUID) exitWith { _playerObj = _x; _playerPos = getPosATL _playerObj;};
} forEach playableUnits;
//If for some reason the playerOBj does not exist lets exit the disconnect system.
@@ -16,8 +15,7 @@ if (isNil "_playerObj") exitWith {
diag_log format["%1: nil player object, _this:%2", __FILE__, _this];
};
_puid = [_playerObj] call FNC_GetPlayerUID;
//diag_log format["get: %1 (%2), sent: %3 (%4)",typeName _puid, _puid, typeName _playerUID, _playerUID];
//diag_log format["get: %1 (%2), sent: %3 (%4)",typeName (getPlayerUID _playerObj), getPlayerUID _playerObj, typeName _playerUID, _playerUID];
//If the the playerObj exists lets run all sync systems
@@ -32,7 +30,7 @@ diag_log format["INFO - Player: %3(UID:%1/CID:%2) as (%4), logged off at %5%6",
getPlayerUID _playerObj,
_characterID,
_playerObj call fa_plr2str,
typeOf _playerObj,
typeOf _playerObj,
(getPosATL _playerObj) call fa_coor2str,
if ((_lastDamage > 5 AND (_lastDamage < 30)) AND ((alive _playerObj) AND (_playerObj distance (getMarkerpos "respawn_west") >= 2000))) then {" while in combat ("+str(_lastDamage)+" seconds left)"} else {""}
];

View File

@@ -23,7 +23,7 @@ _playerCoins = 0;
_BankCoins = 0;
if (_playerID == "") then {
_playerID = [_playerObj] call FNC_GetPlayerUID;
_playerID = getPlayerUID _playerObj;
};
if ((_playerID == "") or (isNil "_playerID")) exitWith {

View File

@@ -3,7 +3,7 @@ private ["_characterID","_playerObj","_playerID","_dummy","_worldspace","_state"
_characterID = _this select 0;
_playerObj = _this select 1;
_spawnSelection = _this select 3;
_playerID = [_playerObj] call FNC_GetPlayerUID;
_playerID = getPlayerUID _playerObj;
#include "\z\addons\dayz_server\compile\server_toggle_debug.hpp"
@@ -12,7 +12,7 @@ if (isNull _playerObj) exitWith {
};
if (_playerID == "") then {
_playerID = [_playerObj] call FNC_GetPlayerUID;
_playerID = getPlayerUID _playerObj;
};
if (_playerID == "") exitWith {
@@ -20,7 +20,7 @@ if (_playerID == "") exitWith {
};
private "_dummy";
_dummy = [_playerObj] call FNC_GetPlayerUID;
_dummy = getPlayerUID _playerObj;
if (_playerID != _dummy) then {
diag_log format["DEBUG: _playerID miscompare with UID! _playerID:%1",_playerID];
_playerID = _dummy;

View File

@@ -1,16 +1,12 @@
private ["_activatingplayerUID","_class","_uid","_charID","_object","_worldspace","_key","_allowed","_obj","_inv","_objectID","_objectUID","_proceed","_activatingplayer"];
private ["_class","_uid","_charID","_object","_worldspace","_key","_allowed","_obj","_inv","_objectID","_objectUID","_proceed","_activatingplayer"];
//[dayz_characterID,_tent,[_dir,_location],"TentStorage"]
_charID = _this select 0;
_object = _this select 1;
_worldspace = _this select 2;
_class = _this select 3;
_obj = _this select 4;
_activatingplayer = _this select 5;
_activatingplayerUID = [_activatingplayer] call FNC_GetPlayerUID;
_inv = [];
if ((count _this) > 6) then {
_inv = _this select 6;
};
_activatingplayer = _this select 5;
_inv = if (count _this > 6) then {_this select 6} else {[]};
_proceed = false;
_objectID = "0";
@@ -45,7 +41,7 @@ if (!_allowed || !_proceed) exitWith {
if(!isNull(_object)) then {
deleteVehicle _object;
};
diag_log ("Invalid object swap by playerUID:"+ str(_activatingplayerUID));
diag_log ("Invalid object swap by playerUID:" + (getPlayerUID _activatingplayer));
};
// Publish variables

View File

@@ -22,7 +22,7 @@ _clientID = owner _player;
if (typeName _price == "SCALAR") then { _price = format ["%1x%2",_price,_currency]; } else { _price = format ["%1",_price]; };
_name = if (alive _player) then { name _player; } else { "Dead Player"; };
_PUID = [_player] call FNC_GetPlayerUID;
_PUID = getPlayerUID _player;
if (_buyorsell == 0) then { //Buy
diag_log format["%8: %9: %1 (%2) bought %6 x %3 into %7 at %4 for %5", _name, _PUID, _classname, _traderCity, _price, _quantity,_container,localize "STR_EPOCH_PLAYER_289",localize "STR_EPOCH_PLAYER"];