mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 11:42:38 +03:00
GetPlayerUID compile, update skin change
This commit is contained in:
@@ -4,7 +4,7 @@ private ["_part_out","_part_in","_qty_out","_qty_in","_textPartIn","_textPartOut
|
||||
if(DZE_ActionInProgress) exitWith { cutText [(localize "str_epoch_player_103") , "PLAIN DOWN"]; };
|
||||
DZE_ActionInProgress = true;
|
||||
|
||||
//_activatingPlayer = if (DayZ_UseSteamID) then {GetPlayerUID player;} else {GetPlayerUIDOld player;};
|
||||
//_activatingPlayer = [player] call FNC_GetPlayerUID;
|
||||
|
||||
_part_out = (_this select 3) select 0;
|
||||
_part_in = (_this select 3) select 1;
|
||||
|
||||
@@ -12,7 +12,7 @@ if (dialog) then {closeDialog 0;};
|
||||
if (visibleMap) then {openMap false;};
|
||||
|
||||
_body = player;
|
||||
_playerID = if (DayZ_UseSteamID) then {GetPlayerUID player;} else {GetPlayerUIDOld player;};
|
||||
_playerID = [player] call FNC_GetPlayerUID;
|
||||
|
||||
disableUserInput true;
|
||||
//add weapon on back to player...
|
||||
|
||||
@@ -5,7 +5,7 @@ _position = getPosATL player;
|
||||
_dir = getDir player;
|
||||
_currentAnim = animationState player;
|
||||
_tagSetting = player getVariable["DZE_display_name",false];
|
||||
_playerUID = if (DayZ_UseSteamID) then {GetPlayerUID player;} else {GetPlayerUIDOld player;};
|
||||
_playerUID = [player] call FNC_GetPlayerUID;
|
||||
_weapons = weapons player;
|
||||
_countMags = call player_countMagazines;
|
||||
_magazines = _countMags select 0;
|
||||
@@ -147,7 +147,7 @@ if (!isNil "_newBackpackType") then {
|
||||
};
|
||||
};
|
||||
} count _backpackMag;
|
||||
(findDisplay 106) ctrlActivate 2;
|
||||
(findDisplay 106) closeDisplay 0;
|
||||
if (gear_done) then {sleep 0.001; disableUserInput false;};
|
||||
_countr = 0;
|
||||
{
|
||||
|
||||
@@ -39,7 +39,7 @@ if ((_ownerID == dayz_combination) || (_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 = if (DayZ_UseSteamID) then {GetPlayerUID player;} else {GetPlayerUIDOld player;};
|
||||
_playerID = [player] call FNC_GetPlayerUID;
|
||||
|
||||
// Only allow if not already claimed.
|
||||
if (_claimedBy == "0" || !_playerNear) then {
|
||||
|
||||
@@ -42,7 +42,7 @@ if (!isDedicated) then {
|
||||
private ["_unit","_detail","_PUID"];
|
||||
_unit = _this select 0;
|
||||
_detail = _this select 1;
|
||||
_PUID = if (DayZ_UseSteamID) then {GetPlayerUID player} else {GetPlayerUIDOld player};
|
||||
_PUID = [player] call FNC_GetPlayerUID;
|
||||
if(_unit == _PUID) then {
|
||||
player setVariable["publish",_detail];
|
||||
};
|
||||
@@ -534,6 +534,22 @@ if (!isDedicated) then {
|
||||
spawn_loot = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\spawn_loot.sqf";
|
||||
spawn_loot_small = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\spawn_loot_small.sqf";
|
||||
// player_projectileNear = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_projectileNear.sqf";
|
||||
FNC_GetPlayerUID = {
|
||||
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;
|
||||
};
|
||||
FNC_GetSetPos = { //DO NOT USE IF YOU NEED ANGLE COMPENSATION!!!!
|
||||
private "_pos";
|
||||
_thingy = _this select 0;
|
||||
|
||||
@@ -9,7 +9,7 @@ waitUntil {vehicle player == player};
|
||||
[] spawn {
|
||||
private ["_playerName","_playerUID"];
|
||||
_playerName = name player;
|
||||
_playerUID = if (DayZ_UseSteamID) then {GetPlayerUID player;} else {GetPlayerUIDOld player;};
|
||||
_playerUID = [player] call FNC_GetPlayerUID;
|
||||
while {1 == 1} do {
|
||||
if (typeName player != "OBJECT") then {
|
||||
PVDZE_atp = format["WARNING typename error for player UID#%1", _playerUID];
|
||||
@@ -24,7 +24,7 @@ waitUntil {vehicle player == player};
|
||||
|
||||
[] spawn {
|
||||
_playerName = name player;
|
||||
_playerUID = if (DayZ_UseSteamID) then {GetPlayerUID player;} else {GetPlayerUIDOld player;};
|
||||
_playerUID = [player] call FNC_GetPlayerUID;
|
||||
while {true} do {
|
||||
sleep 5;
|
||||
};
|
||||
@@ -93,7 +93,7 @@ while {1 == 1} do {
|
||||
if (_lastVehicle == vehicle player) then {
|
||||
if ((_speed > _topSpeed) && (alive player) && ((driver (vehicle player) == player) || (isNull (driver (vehicle player)))) && (_debug distance _lastpos > 3000) && !((vehicle player == player) && (_curheight < _lastheight) && ((_curheight - _terrainHeight) > 1))) then {
|
||||
(vehicle player) setposATL _lastpos;
|
||||
_PUID = if (DayZ_UseSteamID) then {GetPlayerUID player;} else {GetPlayerUIDOld player;};
|
||||
_PUID = [player] call FNC_GetPlayerUID;
|
||||
PVDZE_atp = format["TELEPORT REVERT for player UID#%1 from %2 to %3, %4 meters, now at %5", _PUID, _lastpos, _curPos, round(_lastpos distance _curpos), getPosATL player];
|
||||
publicVariableServer "PVDZE_atp";
|
||||
} else {
|
||||
|
||||
@@ -408,7 +408,7 @@ class FSM
|
||||
"" \n
|
||||
"progressLoadingScreen 0.3;" \n
|
||||
"" \n
|
||||
"_playerUID = if (DayZ_UseSteamID) then {GetPlayerUID player;} else {GetPlayerUIDOld player;};"/*%FSM</STATEINIT""">*/;
|
||||
"_playerUID = [player] call FNC_GetPlayerUID;"/*%FSM</STATEINIT""">*/;
|
||||
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||||
class Links
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@ _playerName = _this select 1;
|
||||
_playerObj = nil;
|
||||
_playerPos = [];
|
||||
{
|
||||
_PUID = if (DayZ_UseSteamID) then {GetPlayerUID _x;} else {GetPlayerUIDOld _x;};
|
||||
_PUID = [_x] call FNC_GetPlayerUID;
|
||||
if (_PUID == _playerUID) exitWith {_playerObj = _x;};
|
||||
} count playableUnits;
|
||||
|
||||
@@ -18,7 +18,7 @@ if (isNil "_playerObj") then {
|
||||
if (isNil "_playerObj") exitWith {
|
||||
diag_log format["%1: nil player object, _this:%2", __FILE__, _this];
|
||||
};
|
||||
_PUID = if (DayZ_UseSteamID) then {GetPlayerUID _playerObj;} else {GetPlayerUIDOld _playerObj;};
|
||||
_PUID = [_playerObj] call FNC_GetPlayerUID;
|
||||
diag_log format["get: %1 (%2), sent: %3 (%4)",typeName _PUID, _PUID, typeName _playerUID, _playerUID];
|
||||
|
||||
if (!isNull _playerObj) then {
|
||||
|
||||
@@ -28,7 +28,7 @@ _isInfected = 0;
|
||||
_model = "";
|
||||
|
||||
if (_playerID == "") then {
|
||||
_playerID = if (DayZ_UseSteamID) then {GetPlayerUID _playerObj;} else {GetPlayerUIDOld _playerObj;};
|
||||
_playerID = [_playerObj] call FNC_GetPlayerUID;
|
||||
};
|
||||
|
||||
if ((_playerID == "") || (isNil "_playerID")) exitWith {
|
||||
|
||||
@@ -4,7 +4,7 @@ private ["_characterID","_playerObj","_playerID","_dummy","_worldspace","_state"
|
||||
|
||||
_characterID = _this select 0;
|
||||
_playerObj = _this select 1;
|
||||
_playerID = if (DayZ_UseSteamID) then {GetPlayerUID _playerObj;} else {GetPlayerUIDOld _playerObj;};
|
||||
_playerID = [_playerObj] call FNC_GetPlayerUID;
|
||||
|
||||
if (isNull _playerObj) exitWith {
|
||||
diag_log ("SETUP INIT FAILED: Exiting, player object null: " + str(_playerObj));
|
||||
@@ -15,7 +15,7 @@ if (isNull _playerObj) exitWith {
|
||||
_playerObj addMPEventHandler ["MPHit", {_this spawn fnc_plyrHit;}];
|
||||
|
||||
if (_playerID == "") then {
|
||||
_playerID = if (DayZ_UseSteamID) then {GetPlayerUID _playerObj;} else {GetPlayerUIDOld _playerObj;};
|
||||
_playerID = [_playerObj] call FNC_GetPlayerUID;
|
||||
};
|
||||
|
||||
if (_playerID == "") exitWith {
|
||||
@@ -23,7 +23,7 @@ if (_playerID == "") exitWith {
|
||||
};
|
||||
|
||||
private["_dummy"];
|
||||
_dummy = if (DayZ_UseSteamID) then {GetPlayerUID _playerObj;} else {GetPlayerUIDOld _playerObj;};
|
||||
_dummy = [_playerObj] call FNC_GetPlayerUID;
|
||||
if ( _playerID != _dummy ) then {
|
||||
diag_log format["DEBUG: _playerID miscompare with UID! _playerID:%1",_playerID];
|
||||
_playerID = _dummy;
|
||||
|
||||
@@ -6,7 +6,7 @@ _worldspace = _this select 2;
|
||||
_class = _this select 3;
|
||||
_obj = _this select 4;
|
||||
_activatingplayer = _this select 5;
|
||||
_activatingplayerUID = if (DayZ_UseSteamID) then {GetPlayerUID _activatingplayer;} else {GetPlayerUIDOld _activatingplayer;};
|
||||
_activatingplayerUID = [_activatingplayer] call FNC_GetPlayerUID;
|
||||
_proceed = false;
|
||||
|
||||
_objectID = "0";
|
||||
|
||||
@@ -10,7 +10,7 @@ _qty = _this select 6;
|
||||
_clientID = owner _player;
|
||||
_price = format ["%2x %1",_currency,_qty];
|
||||
_name = if (alive _player) then { name _player; } else { "Dead Player"; };
|
||||
_PUID = if (DayZ_UseSteamID) then {GetPlayerUID _player;} else {GetPlayerUIDOld _player;};
|
||||
_PUID = [_player] call FNC_GetPlayerUID;
|
||||
|
||||
if (_buyorsell == 0) then { //Buy
|
||||
diag_log format["EPOCH SERVERTRADE: Player: %1 (%2) bought a %3 in/at %4 for %5", _name, _PUID, _classname, _traderCity, _price];
|
||||
|
||||
@@ -126,7 +126,7 @@ _object_killed = {
|
||||
_objID = _object getVariable['ObjectID','0'];
|
||||
_objUID = _object getVariable['ObjectUID','0'];
|
||||
_worldSpace = getPosATL _object;
|
||||
_PUID = if (DayZ_UseSteamID) then {GetPlayerUID _killer;} else {GetPlayerUIDOld _killer;};
|
||||
_PUID = [_killer] call FNC_GetPlayerUID;
|
||||
if (_PUID != "") then {
|
||||
_name = if (alive _killer) then { name _killer; } else { format["OBJECT %1", _killer]; };
|
||||
diag_log format["Vehicle killed: Vehicle %1 (TYPE: %2), CharacterID: %3, ObjectID: %4, ObjectUID: %5, Position: %6, Killer: %7 (UID: %8)", _object, (typeOf _object), _charID, _objID, _objUID, _worldSpace, _name, _PUID];
|
||||
|
||||
@@ -914,7 +914,7 @@ server_logUnlockLockEvent = {
|
||||
[_obj, "gear"] call server_updateObject;
|
||||
_statusText = "LOCKED";
|
||||
};
|
||||
_PUID = if (DayZ_UseSteamID) then {GetPlayerUID _killer;} else {GetPlayerUIDOld _killer;};
|
||||
_PUID = [_killer] call FNC_GetPlayerUID;
|
||||
diag_log format["SAFE %5: ID:%1 UID:%2 BY %3(%4)", _objectID, _objectUID, (name _player), _PUID, _statusText];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -11,6 +11,7 @@ dayZ_instance = 11; //The instance
|
||||
dayzHiveRequest = [];
|
||||
initialized = false;
|
||||
dayz_previousID = 0;
|
||||
DayZ_UseSteamID = false;
|
||||
|
||||
//disable greeting menu
|
||||
player setVariable ["BIS_noCoreConversations", true];
|
||||
|
||||
Reference in New Issue
Block a user