Add variable

This commit is contained in:
icomrade
2014-06-30 12:46:06 -04:00
parent 6f8efd8428
commit 3491e4462d
16 changed files with 38 additions and 32 deletions

View File

@@ -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"]; }; if(DZE_ActionInProgress) exitWith { cutText [(localize "str_epoch_player_103") , "PLAIN DOWN"]; };
DZE_ActionInProgress = true; DZE_ActionInProgress = true;
//_activatingPlayer = GetPlayerUIDOld player; //_activatingPlayer = if (DayZ_UseSteamID) then {GetPlayerUID player;} else {GetPlayerUIDOld player;};
_part_out = (_this select 3) select 0; _part_out = (_this select 3) select 0;
_part_in = (_this select 3) select 1; _part_in = (_this select 3) select 1;

View File

@@ -12,7 +12,7 @@ if (dialog) then {closeDialog 0;};
if (visibleMap) then {openMap false;}; if (visibleMap) then {openMap false;};
_body = player; _body = player;
_playerID = GetPlayerUIDOld player; _playerID = if (DayZ_UseSteamID) then {GetPlayerUID player;} else {GetPlayerUIDOld player;};
disableUserInput true; disableUserInput true;
//add weapon on back to player... //add weapon on back to player...

View File

@@ -5,7 +5,7 @@ _position = getPosATL player;
_dir = getDir player; _dir = getDir player;
_currentAnim = animationState player; _currentAnim = animationState player;
_tagSetting = player getVariable["DZE_display_name",false]; _tagSetting = player getVariable["DZE_display_name",false];
_playerUID = GetPlayerUIDOld player; _playerUID = if (DayZ_UseSteamID) then {GetPlayerUID player;} else {GetPlayerUIDOld player;};
_weapons = weapons player; _weapons = weapons player;
_countMags = call player_countMagazines; _countMags = call player_countMagazines;
_magazines = _countMags select 0; _magazines = _countMags select 0;
@@ -163,7 +163,7 @@ if (_tagSetting) then {
DZE_ForceNameTags = true; DZE_ForceNameTags = true;
}; };
_playerUID = GetPlayerUIDOld player; _playerUID = if (DayZ_UseSteamID) then {GetPlayerUID player;} else {GetPlayerUIDOld player;};
_playerObjName = format["PVDZE_player%1",_playerUID]; _playerObjName = format["PVDZE_player%1",_playerUID];
call compile format["%1 = player;",_playerObjName]; call compile format["%1 = player;",_playerObjName];
publicVariableServer _playerObjName; //Outcommit in DayZ 1.8 No clue for what this is - Skaronator publicVariableServer _playerObjName; //Outcommit in DayZ 1.8 No clue for what this is - Skaronator

View File

@@ -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. // Check if any players are nearby if not allow player to claim item.
_playerNear = {isPlayer _x} count (player nearEntities ["CAManBase", 6]) > 1; _playerNear = {isPlayer _x} count (player nearEntities ["CAManBase", 6]) > 1;
_playerID = GetPlayerUIDOld player; _playerID = if (DayZ_UseSteamID) then {GetPlayerUID player;} else {GetPlayerUIDOld player;};
// Only allow if not already claimed. // Only allow if not already claimed.
if (_claimedBy == "0" || !_playerNear) then { if (_claimedBy == "0" || !_playerNear) then {

View File

@@ -17,7 +17,6 @@ if (isServer) then {
PVDZE_veh_Update = [_unit, "killed",_killer]; PVDZE_veh_Update = [_unit, "killed",_killer];
_killerVeh = if (vehicle _killer != _killer) then { format["[KILLER IN VEHICLE %1 OF TYPE %2]", (vehicle _killer), (typeOf (vehicle _killer))]; } else {""}; _killerVeh = if (vehicle _killer != _killer) then { format["[KILLER IN VEHICLE %1 OF TYPE %2]", (vehicle _killer), (typeOf (vehicle _killer))]; } else {""};
_name = if (alive _killer) then { name _killer; } else { format["OBJECT %1", _killer]; }; _name = if (alive _killer) then { name _killer; } else { format["OBJECT %1", _killer]; };
// diag_log format["DAMAGE: Vehicle %1 (TYPE: %2) Killed by player %3 (UID: %4) %5",_unit, (typeOf _unit), _name, (GetPlayerUIDOld _killer), _killerVeh];
} else { } else {
PVDZE_veh_Update = [_unit, "killed"]; PVDZE_veh_Update = [_unit, "killed"];
}; };

View File

@@ -39,10 +39,11 @@ if (!isDedicated) then {
}; };
player_login = { player_login = {
private ["_unit","_detail"]; private ["_unit","_detail","_PUID"];
_unit = _this select 0; _unit = _this select 0;
_detail = _this select 1; _detail = _this select 1;
if(_unit == GetPlayerUIDOld player) then { _PUID = if (DayZ_UseSteamID) then {GetPlayerUID player;} else {GetPlayerUIDOld player;};
if(_unit == _PUID) then {
player setVariable["publish",_detail]; player setVariable["publish",_detail];
}; };
}; };

View File

@@ -1,5 +1,7 @@
disableSerialization; disableSerialization;
if (isNil "DayZ_UseSteamID") then {
DayZ_UseSteamID = true;
};
//Model Variables //Model Variables
Bandit1_DZ = "Bandit1_DZ"; Bandit1_DZ = "Bandit1_DZ";
Bandit2_DZ = "Bandit2_DZ"; Bandit2_DZ = "Bandit2_DZ";

View File

@@ -2,14 +2,14 @@
Anti-Teleport - Created By Razor / Refactored By Alby & CopyPasted to Epoch by Skaronator Anti-Teleport - Created By Razor / Refactored By Alby & CopyPasted to Epoch by Skaronator
*/ */
private ["_log","_playerName","_playerUID","_al1veOnce","_debug","_lastpos","_lastheight","_lasttime","_lastVehicle","_v","_h","_topv","_toph","_curpos","_distance","_acceptableDistance","_curtime","_difftime","_plant","_curheight","_speed","_topSpeed","_terrainHeight","_differenceCheck","_lastPosVar","_safetyVehicle","_curPos"]; private ["_log","_playerName","_playerUID","_PUID","_al1veOnce","_debug","_lastpos","_lastheight","_lasttime","_lastVehicle","_v","_h","_topv","_toph","_curpos","_distance","_acceptableDistance","_curtime","_difftime","_plant","_curheight","_speed","_topSpeed","_terrainHeight","_differenceCheck","_lastPosVar","_safetyVehicle","_curPos"];
waitUntil {vehicle player == player}; waitUntil {vehicle player == player};
[] spawn { [] spawn {
private ["_playerName","_playerUID"]; private ["_playerName","_playerUID"];
_playerName = name player; _playerName = name player;
_playerUID = GetPlayerUIDOld player; _playerUID = if (DayZ_UseSteamID) then {GetPlayerUID player;} else {GetPlayerUIDOld player;};
while {1 == 1} do { while {1 == 1} do {
if (typeName player != "OBJECT") then { if (typeName player != "OBJECT") then {
PVDZE_atp = format["WARNING typename error for player UID#%1", _playerUID]; PVDZE_atp = format["WARNING typename error for player UID#%1", _playerUID];
@@ -24,7 +24,7 @@ waitUntil {vehicle player == player};
[] spawn { [] spawn {
_playerName = name player; _playerName = name player;
_playerUID = GetPlayerUIDOld player; _playerUID = if (DayZ_UseSteamID) then {GetPlayerUID player;} else {GetPlayerUIDOld player;};
while {true} do { while {true} do {
sleep 5; sleep 5;
}; };
@@ -93,7 +93,8 @@ while {1 == 1} do {
if (_lastVehicle == vehicle player) then { 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 { 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; (vehicle player) setposATL _lastpos;
PVDZE_atp = format["TELEPORT REVERT for player UID#%1 from %2 to %3, %4 meters, now at %5", GetPlayerUIDOld player, _lastpos, _curPos, round(_lastpos distance _curpos), getPosATL player]; _PUID = if (DayZ_UseSteamID) then {GetPlayerUID player;} else {GetPlayerUIDOld player;};
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"; publicVariableServer "PVDZE_atp";
} else { } else {
_lastpos = _curpos; _lastpos = _curpos;

View File

@@ -408,7 +408,7 @@ class FSM
"" \n "" \n
"progressLoadingScreen 0.3;" \n "progressLoadingScreen 0.3;" \n
"" \n "" \n
"_playerUID = GetPlayerUIDOld player;"/*%FSM</STATEINIT""">*/; "_playerUID = if (DayZ_UseSteamID) then {GetPlayerUID player;} else {GetPlayerUIDOld player;};"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/; precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links class Links
{ {

View File

@@ -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; _playerUID = _this select 0;
_playerName = _this select 1; _playerName = _this select 1;
_playerObj = nil; _playerObj = nil;
_playerPos = []; _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; } count playableUnits;
if (isNil "_playerObj") then { if (isNil "_playerObj") then {
@@ -17,8 +18,8 @@ if (isNil "_playerObj") then {
if (isNil "_playerObj") exitWith { if (isNil "_playerObj") exitWith {
diag_log format["%1: nil player object, _this:%2", __FILE__, _this]; diag_log format["%1: nil player object, _this:%2", __FILE__, _this];
}; };
_PUID = if (DayZ_UseSteamID) then {GetPlayerUID _playerObj;} else {GetPlayerUIDOld _playerObj;};
diag_log format["get: %1 (%2), sent: %3 (%4)",typeName (GetPlayerUIDOld _playerObj), GetPlayerUIDOld _playerObj, typeName _playerUID, _playerUID]; diag_log format["get: %1 (%2), sent: %3 (%4)",typeName _PUID, _PUID, typeName _playerUID, _playerUID];
if (!isNull _playerObj) then { if (!isNull _playerObj) then {

View File

@@ -28,7 +28,7 @@ _isInfected = 0;
_model = ""; _model = "";
if (_playerID == "") then { if (_playerID == "") then {
_playerID = GetPlayerUIDOld _playerObj; _playerID = if (DayZ_UseSteamID) then {GetPlayerUID _playerObj;} else {GetPlayerUIDOld _playerObj;};
}; };
if ((_playerID == "") || (isNil "_playerID")) exitWith { if ((_playerID == "") || (isNil "_playerID")) exitWith {

View File

@@ -4,7 +4,7 @@ private ["_characterID","_playerObj","_playerID","_dummy","_worldspace","_state"
_characterID = _this select 0; _characterID = _this select 0;
_playerObj = _this select 1; _playerObj = _this select 1;
_playerID = GetPlayerUIDOld _playerObj; _playerID = if (DayZ_UseSteamID) then {GetPlayerUID _playerObj;} else {GetPlayerUIDOld _playerObj;};
if (isNull _playerObj) exitWith { if (isNull _playerObj) exitWith {
diag_log ("SETUP INIT FAILED: Exiting, player object null: " + str(_playerObj)); 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;}]; _playerObj addMPEventHandler ["MPHit", {_this spawn fnc_plyrHit;}];
if (_playerID == "") then { if (_playerID == "") then {
_playerID = GetPlayerUIDOld _playerObj; _playerID = if (DayZ_UseSteamID) then {GetPlayerUID _playerObj;} else {GetPlayerUIDOld _playerObj;};
}; };
if (_playerID == "") exitWith { if (_playerID == "") exitWith {
@@ -23,7 +23,7 @@ if (_playerID == "") exitWith {
}; };
private["_dummy"]; private["_dummy"];
_dummy = GetPlayerUIDOld _playerObj; _dummy = if (DayZ_UseSteamID) then {GetPlayerUID _playerObj;} else {GetPlayerUIDOld _playerObj;};
if ( _playerID != _dummy ) then { if ( _playerID != _dummy ) then {
diag_log format["DEBUG: _playerID miscompare with UID! _playerID:%1",_playerID]; diag_log format["DEBUG: _playerID miscompare with UID! _playerID:%1",_playerID];
_playerID = _dummy; _playerID = _dummy;

View File

@@ -6,8 +6,7 @@ _worldspace = _this select 2;
_class = _this select 3; _class = _this select 3;
_obj = _this select 4; _obj = _this select 4;
_activatingplayer = _this select 5; _activatingplayer = _this select 5;
_activatingplayerUID = (GetPlayerUIDOld _activatingplayer); _activatingplayerUID = if (DayZ_UseSteamID) then {GetPlayerUID _activatingplayer;} else {GetPlayerUIDOld _activatingplayer;};
_proceed = false; _proceed = false;
_objectID = "0"; _objectID = "0";

View File

@@ -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; _player = _this select 0;
_traderID = _this select 1; _traderID = _this select 1;
@@ -10,11 +10,12 @@ _qty = _this select 6;
_clientID = owner _player; _clientID = owner _player;
_price = format ["%2x %1",_currency,_qty]; _price = format ["%2x %1",_currency,_qty];
_name = if (alive _player) then { name _player; } else { "Dead Player"; }; _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 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 } 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 { if (DZE_ConfigTrader) then {

View File

@@ -99,7 +99,7 @@ _object_damage = {
}; };
_object_killed = { _object_killed = {
private["_hitpoints","_array","_hit","_selection","_key","_damage"]; private["_hitpoints","_array","_hit","_PUID","_selection","_key","_damage"];
_hitpoints = _object call vehicle_getHitpoints; _hitpoints = _object call vehicle_getHitpoints;
//_damage = damage _object; //_damage = damage _object;
_damage = 1; _damage = 1;
@@ -126,9 +126,10 @@ _object_killed = {
_objID = _object getVariable['ObjectID','0']; _objID = _object getVariable['ObjectID','0'];
_objUID = _object getVariable['ObjectUID','0']; _objUID = _object getVariable['ObjectUID','0'];
_worldSpace = getPosATL _object; _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]; }; _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 { } 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]; diag_log format["Vehicle killed: Vehicle %1 (TYPE: %2), CharacterID: %3, ObjectID: %4, ObjectUID: %5, Position: %6", _object, (typeOf _object), _charID, _objID, _objUID, _worldSpace];
}; };

View File

@@ -902,7 +902,7 @@ server_spawnCleanAnimals = {
}; };
server_logUnlockLockEvent = { server_logUnlockLockEvent = {
private["_player", "_obj", "_objectID", "_objectUID", "_statusText", "_status"]; private["_player", "_obj", "_objectID", "_objectUID", "_statusText", "_PUID", "_status"];
_player = _this select 0; _player = _this select 0;
_obj = _this select 1; _obj = _this select 1;
_status = _this select 2; _status = _this select 2;
@@ -914,6 +914,7 @@ server_logUnlockLockEvent = {
[_obj, "gear"] call server_updateObject; [_obj, "gear"] call server_updateObject;
_statusText = "LOCKED"; _statusText = "LOCKED";
}; };
diag_log format["SAFE %5: ID:%1 UID:%2 BY %3(%4)", _objectID, _objectUID, (name _player), (GetPlayerUIDOld _player), _statusText]; _PUID = if (DayZ_UseSteamID) then {GetPlayerUID _killer;} else {GetPlayerUIDOld _killer;};
diag_log format["SAFE %5: ID:%1 UID:%2 BY %3(%4)", _objectID, _objectUID, (name _player), _PUID, _statusText];
}; };
}; };