mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
Store plot and door friends names as array
Avoids setVariable value restrictions for players with special characters in their name. Also avoids issues with storing non-ASCII characters from player names in DB inventory field.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
private ["_friends"];
|
||||
private "_friends";
|
||||
|
||||
lbClear 7102;
|
||||
_friends = TheDoor getVariable ["doorfriends",[]];
|
||||
{
|
||||
lbAdd [7102, (_x select 1)];
|
||||
lbAdd [7102, toString (_x select 1)];
|
||||
} forEach _friends;
|
||||
|
||||
@@ -8,7 +8,7 @@ Humans = [];
|
||||
if (isPlayer _x) then {
|
||||
_friendUID = [_x] call FNC_GetPlayerUID;
|
||||
_friendName = name _x;
|
||||
Humans set [count Humans, [_friendUID,_friendName]];
|
||||
Humans set [count Humans, [_friendUID,toArray _friendName]];
|
||||
lbAdd [7101, _friendName];
|
||||
};
|
||||
} forEach _closePeople;
|
||||
|
||||
@@ -534,7 +534,7 @@ if (_canBuild select 0) then {
|
||||
_tmpbuilt setVariable ["ownerPUID",_playerUID,true];
|
||||
PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location,_playerUID, _vector], []];
|
||||
if (_lockable == 3) then {
|
||||
_friendsArr = [[_playerUID,(name player)]];
|
||||
_friendsArr = [[_playerUID,toArray (name player)]];
|
||||
_tmpbuilt setVariable ["doorfriends", _friendsArr, true];
|
||||
PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location,_playerUID, _vector], _friendsArr];
|
||||
};
|
||||
@@ -555,7 +555,7 @@ if (_canBuild select 0) then {
|
||||
if (DZE_permanentPlot) then {
|
||||
_tmpbuilt setVariable ["ownerPUID",_playerUID,true];
|
||||
if (_canBuild select 1) then {
|
||||
_friendsArr = [[_playerUID,(name player)]];
|
||||
_friendsArr = [[_playerUID,toArray (name player)]];
|
||||
_tmpbuilt setVariable ["plotfriends", _friendsArr, true];
|
||||
PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location,_playerUID, _vector], _friendsArr];
|
||||
} else {
|
||||
|
||||
@@ -442,7 +442,7 @@ if (_canBuild select 0) then {
|
||||
_tmpbuilt setVariable ["ownerPUID",_playerUID,true];
|
||||
PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location,_playerUID],_classname];
|
||||
if (_lockable == 3) then {
|
||||
_friendsArr = [[_playerUID,(name player)]];
|
||||
_friendsArr = [[_playerUID,toArray (name player)]];
|
||||
_tmpbuilt setVariable ["doorfriends", _friendsArr, true];
|
||||
PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location,_playerUID, _vector], _friendsArr];
|
||||
};
|
||||
@@ -463,7 +463,7 @@ if (_canBuild select 0) then {
|
||||
if (DZE_permanentPlot) then {
|
||||
_tmpbuilt setVariable ["ownerPUID",_playerUID,true];
|
||||
if (_canBuild select 1) then {
|
||||
_friendsArr = [[_playerUID,(name player)]];
|
||||
_friendsArr = [[_playerUID,toArray (name player)]];
|
||||
_tmpbuilt setVariable ["plotfriends", _friendsArr, true];
|
||||
PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location,_playerUID],_friendsArr];
|
||||
} else {
|
||||
|
||||
@@ -131,7 +131,7 @@ if ((count _upgrade) > 0) then {
|
||||
if (_ownerID == "0") then { _ownerID = _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,(name player)]];
|
||||
_friendsArr = [[_playerUID,toArray (name player)]];
|
||||
_object setVariable ["doorfriends", _friendsArr, true];
|
||||
PVDZE_obj_Swap = [_objectCharacterID,_object,[_dir,_location,_ownerID,_vector],_classname,_obj,player,_friendsArr];
|
||||
} else {
|
||||
|
||||
@@ -5,7 +5,7 @@ _plots = nearestObjects [[player] call FNC_getPos, ["Plastic_Pole_EP1_DZ"],15];
|
||||
_thePlot = _plots select 0;
|
||||
_friendlies = _thePlot getVariable ["plotfriends", []];
|
||||
{
|
||||
lbAdd [7002, (_x select 1)];
|
||||
lbAdd [7002, toString (_x select 1)];
|
||||
} forEach _friendlies; // count causes Error Type Number, expected Bool here
|
||||
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ Humans = [];
|
||||
if (isPlayer _x) then {
|
||||
_friendUID = [_x] call FNC_GetPlayerUID;
|
||||
_friendName = name _x;
|
||||
Humans = Humans + [[_friendUID,_friendName]];
|
||||
Humans = Humans + [[_friendUID,toArray _friendName]];
|
||||
lbAdd [7001, _friendName];
|
||||
};
|
||||
} forEach _closePeople; // count causes Error Type Number, expected Bool here
|
||||
@@ -8,7 +8,7 @@
|
||||
1 "switch" !="\"switchmove\""
|
||||
1 "hide" !"hideObject"
|
||||
1 "icon"
|
||||
1 "marker"
|
||||
1 "marker" !"PPMarker"
|
||||
1 "server"
|
||||
5 "compile"
|
||||
5 "loadFile"
|
||||
|
||||
Reference in New Issue
Block a user