mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-20 02:16:29 +03:00
Add variable
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
private ["_invehicle","_isplayernearby","_playerObj","_myGroup","_id","_playerUID","_playerName","_characterID","_timeout","_message","_magazines","_playerPos"];
|
||||
private ["_invehicle","_isplayernearby","_playerObj","_myGroup","_PUID","_id","_playerUID","_playerName","_characterID","_timeout","_message","_magazines","_playerPos"];
|
||||
_playerUID = _this select 0;
|
||||
_playerName = _this select 1;
|
||||
_playerObj = nil;
|
||||
_playerPos = [];
|
||||
{
|
||||
if ((GetPlayerUIDOld _x) == _playerUID) exitWith {_playerObj = _x;};
|
||||
_PUID = if (DayZ_UseSteamID) then {GetPlayerUID _x;} else {GetPlayerUIDOld _x;};
|
||||
if (_PUID == _playerUID) exitWith {_playerObj = _x;};
|
||||
} count playableUnits;
|
||||
|
||||
if (isNil "_playerObj") then {
|
||||
@@ -17,8 +18,8 @@ if (isNil "_playerObj") then {
|
||||
if (isNil "_playerObj") exitWith {
|
||||
diag_log format["%1: nil player object, _this:%2", __FILE__, _this];
|
||||
};
|
||||
|
||||
diag_log format["get: %1 (%2), sent: %3 (%4)",typeName (GetPlayerUIDOld _playerObj), GetPlayerUIDOld _playerObj, typeName _playerUID, _playerUID];
|
||||
_PUID = if (DayZ_UseSteamID) then {GetPlayerUID _playerObj;} else {GetPlayerUIDOld _playerObj;};
|
||||
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 = GetPlayerUIDOld _playerObj;
|
||||
_playerID = if (DayZ_UseSteamID) then {GetPlayerUID _playerObj;} else {GetPlayerUIDOld _playerObj;};
|
||||
};
|
||||
|
||||
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 = GetPlayerUIDOld _playerObj;
|
||||
_playerID = if (DayZ_UseSteamID) then {GetPlayerUID _playerObj;} else {GetPlayerUIDOld _playerObj;};
|
||||
|
||||
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 = GetPlayerUIDOld _playerObj;
|
||||
_playerID = if (DayZ_UseSteamID) then {GetPlayerUID _playerObj;} else {GetPlayerUIDOld _playerObj;};
|
||||
};
|
||||
|
||||
if (_playerID == "") exitWith {
|
||||
@@ -23,7 +23,7 @@ if (_playerID == "") exitWith {
|
||||
};
|
||||
|
||||
private["_dummy"];
|
||||
_dummy = GetPlayerUIDOld _playerObj;
|
||||
_dummy = if (DayZ_UseSteamID) then {GetPlayerUID _playerObj;} else {GetPlayerUIDOld _playerObj;};
|
||||
if ( _playerID != _dummy ) then {
|
||||
diag_log format["DEBUG: _playerID miscompare with UID! _playerID:%1",_playerID];
|
||||
_playerID = _dummy;
|
||||
|
||||
@@ -6,8 +6,7 @@ _worldspace = _this select 2;
|
||||
_class = _this select 3;
|
||||
_obj = _this select 4;
|
||||
_activatingplayer = _this select 5;
|
||||
_activatingplayerUID = (GetPlayerUIDOld _activatingplayer);
|
||||
|
||||
_activatingplayerUID = if (DayZ_UseSteamID) then {GetPlayerUID _activatingplayer;} else {GetPlayerUIDOld _activatingplayer;};
|
||||
_proceed = false;
|
||||
|
||||
_objectID = "0";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
private ["_player","_name","_traderid","_buyorsell","_data","_result","_key","_outcome","_clientID"];
|
||||
private ["_player","_PUID","_name","_traderid","_buyorsell","_data","_result","_key","_outcome","_clientID"];
|
||||
|
||||
_player = _this select 0;
|
||||
_traderID = _this select 1;
|
||||
@@ -10,11 +10,12 @@ _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;};
|
||||
|
||||
if (_buyorsell == 0) then { //Buy
|
||||
diag_log format["EPOCH SERVERTRADE: Player: %1 (%2) bought a %3 in/at %4 for %5", _name, (GetPlayerUIDOld _player), _classname, _traderCity, _price];
|
||||
diag_log format["EPOCH SERVERTRADE: Player: %1 (%2) bought a %3 in/at %4 for %5", _name, _PUID, _classname, _traderCity, _price];
|
||||
} else { //SELL
|
||||
diag_log format["EPOCH SERVERTRADE: Player: %1 (%2) sold a %3 in/at %4 for %5",_name, (GetPlayerUIDOld _player), _classname, _traderCity, _price];
|
||||
diag_log format["EPOCH SERVERTRADE: Player: %1 (%2) sold a %3 in/at %4 for %5",_name, _PUID, _classname, _traderCity, _price];
|
||||
};
|
||||
|
||||
if (DZE_ConfigTrader) then {
|
||||
|
||||
@@ -99,7 +99,7 @@ _object_damage = {
|
||||
};
|
||||
|
||||
_object_killed = {
|
||||
private["_hitpoints","_array","_hit","_selection","_key","_damage"];
|
||||
private["_hitpoints","_array","_hit","_PUID","_selection","_key","_damage"];
|
||||
_hitpoints = _object call vehicle_getHitpoints;
|
||||
//_damage = damage _object;
|
||||
_damage = 1;
|
||||
@@ -126,9 +126,10 @@ _object_killed = {
|
||||
_objID = _object getVariable['ObjectID','0'];
|
||||
_objUID = _object getVariable['ObjectUID','0'];
|
||||
_worldSpace = getPosATL _object;
|
||||
if (GetPlayerUIDOld _killer != "") then {
|
||||
_PUID = if (DayZ_UseSteamID) then {GetPlayerUID _killer;} else {GetPlayerUIDOld _killer;};
|
||||
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, (GetPlayerUIDOld _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];
|
||||
} else {
|
||||
diag_log format["Vehicle killed: Vehicle %1 (TYPE: %2), CharacterID: %3, ObjectID: %4, ObjectUID: %5, Position: %6", _object, (typeOf _object), _charID, _objID, _objUID, _worldSpace];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user