mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
fix for name function error (untested)
17:00:15 WARNING: Function 'name' - PLAYER is dead
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
private "_name";
|
||||
//Let Zeds know
|
||||
[player,4,true,(getPosATL player)] spawn player_alertZombies;
|
||||
|
||||
//display gui (temp hint)
|
||||
|
||||
_name = if (alive player) then {name player;} else {"Dead Player";};
|
||||
hintSilent parseText format ["
|
||||
<t size='1.20' font='Bitstream' color='#5882FA'>%1</t><br/><br/>
|
||||
<t size='1.20' font='Bitstream' color='#5882FA'>Survived %7 Days</t><br/><br/>
|
||||
@@ -11,7 +12,7 @@ hintSilent parseText format ["
|
||||
<t size='1.15' font='Bitstream' align='left'>Murders: </t><t size='1.15' font='Bitstream' align='right'>%4</t><br/>
|
||||
<t size='1.15' font='Bitstream' align='left'>Bandits Killed: </t><t size='1.15' font='Bitstream' align='right'>%5</t><br/><br/>
|
||||
<t size='1.15' font='Bitstream' align='left'>Humanity: </t><t size='1.15' font='Bitstream' align='right'>%6</t><br/><br/>",
|
||||
(name player),
|
||||
(_name),
|
||||
(player getVariable['zombieKills', 0]),
|
||||
(player getVariable['headShots', 0]),
|
||||
(player getVariable['humanKills', 0]),
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
private ["_display","_ctrlBlood","_ctrlBleed","_bloodVal","_ctrlFood","_ctrlThirst","_thirstVal","_foodVal","_ctrlTemp","_tempVal","_combatVal","_array","_ctrlEar","_ctrlEye","_ctrlCombat","_ctrlFracture","_visualText","_visual","_audibleText","_audible","_blood","_thirstLvl","_foodLvl","_tempImg","_thirst","_food","_temp","_bloodLvl","_tempLvl","_color","_string","_humanity","_size","_friendlies","_charID","_rcharID","_rfriendlies","_rfriendlyTo","_distance","_targetControl","_humanityTarget"];
|
||||
private ["_display","_ctrlBlood","_ctrlBleed","_bloodVal","_humanityName","_ctrlFood","_ctrlThirst","_thirstVal","_foodVal","_ctrlTemp","_tempVal","_combatVal","_array","_ctrlEar","_ctrlEye","_ctrlCombat","_ctrlFracture","_visualText","_visual","_audibleText","_audible","_blood","_thirstLvl","_foodLvl","_tempImg","_thirst","_food","_temp","_bloodLvl","_tempLvl","_color","_string","_humanity","_size","_friendlies","_charID","_rcharID","_rfriendlies","_rfriendlyTo","_distance","_targetControl","_humanityTarget"];
|
||||
disableSerialization;
|
||||
|
||||
_foodVal = 1 - (dayz_hunger / SleepFood);
|
||||
@@ -173,7 +173,8 @@ if (!isNull _humanityTarget and isPlayer _humanityTarget and alive _humanityTarg
|
||||
// <br /><t %2 align='center' size='0.7'>Humanity: %3</t>
|
||||
|
||||
_color = "color='#339933'";
|
||||
_string = format["<t %2 align='center' size='%3'>%1</t>",(name _humanityTarget),_color,_size];
|
||||
_humanityName = if (alive _humanityTarget) then {name _humanityTarget; } else { "Dead Player";};
|
||||
_string = format["<t %2 align='center' size='%3'>%1</t>",_humanityName,_color,_size];
|
||||
|
||||
} else {
|
||||
|
||||
@@ -189,7 +190,8 @@ if (!isNull _humanityTarget and isPlayer _humanityTarget and alive _humanityTarg
|
||||
};
|
||||
};
|
||||
if((_humanityTarget getVariable ["DZE_display_name", false]) or (DZE_ForceNameTagsInTrader && isInTraderCity)) then {
|
||||
_string = format["<t %2 align='center' size='%3'>%1</t>",(name _humanityTarget),_color,_size];
|
||||
_humanityName = if (alive _humanityTarget) then {name _humanityTarget; } else { "Dead Player";};
|
||||
_string = format["<t %2 align='center' size='%3'>%1</t>",_humanityName,_color,_size];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -4,7 +4,7 @@ _attacker = _this select 1;
|
||||
_damage = _this select 2;
|
||||
|
||||
if (!isPlayer _victim || !isPlayer _attacker) exitWith {};
|
||||
if ((name _victim) == (name _attacker)) exitWith {};
|
||||
if ((owner _victim) == (owner _attacker)) exitWith {};
|
||||
|
||||
_weapon = weaponState _attacker;
|
||||
if (_weapon select 0 == "Throw") then
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Maintain Area - written by Skaronator */
|
||||
private ["_player","_ObjArray","_uniqueID","_objects","_key"];
|
||||
private ["_player","_name","_ObjArray","_uniqueID","_objects","_key"];
|
||||
_player = _this select 0;
|
||||
_option = _this select 1;
|
||||
/*
|
||||
@@ -27,8 +27,8 @@ if (_option == 1) then {
|
||||
};
|
||||
};
|
||||
} forEach _objects;
|
||||
|
||||
diag_log format ["MAINTAIN AREA BY %1 - %2 Objects at %3", name _player, count _objects, position _player];
|
||||
_name = if (alive _player) then { name _player; } else { "Dead Player"; };
|
||||
diag_log format ["MAINTAIN AREA BY %1 - %2 Objects at %3", _name, count _objects, position _player];
|
||||
};
|
||||
if (_option == 2) then {
|
||||
if (damage _targetObj >= DZE_DamageBeforeMaint) then {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
private ["_empty","_playerwasNearby","_character","_magazines","_force","_characterID","_charPos","_isInVehicle","_timeSince","_humanity","_debug","_distance","_isNewMed","_isNewPos","_isNewGear","_playerPos","_playerGear","_playerBackp","_medical","_distanceFoot","_lastPos","_backpack","_kills","_killsB","_killsH","_headShots","_lastTime","_timeGross","_timeLeft","_currentWpn","_currentAnim","_config","_onLadder","_isTerminal","_currentModel","_modelChk","_muzzles","_temp","_currentState","_array","_key","_pos","_forceGear","_friendlies"];
|
||||
private ["_empty","_name","_playerwasNearby","_character","_magazines","_force","_characterID","_charPos","_isInVehicle","_timeSince","_humanity","_debug","_distance","_isNewMed","_isNewPos","_isNewGear","_playerPos","_playerGear","_playerBackp","_medical","_distanceFoot","_lastPos","_backpack","_kills","_killsB","_killsH","_headShots","_lastTime","_timeGross","_timeLeft","_currentWpn","_currentAnim","_config","_onLadder","_isTerminal","_currentModel","_modelChk","_muzzles","_temp","_currentState","_array","_key","_pos","_forceGear","_friendlies"];
|
||||
|
||||
_character = _this select 0;
|
||||
_magazines = _this select 1;
|
||||
@@ -23,24 +23,24 @@ _timeSince = 0;
|
||||
_humanity = 0;
|
||||
|
||||
//diag_log ("DW_DEBUG: (isnil _characterID): " + str(isnil "_characterID"));
|
||||
|
||||
_name = if (alive _character) then { name _character; } else { "Dead Player"; };
|
||||
if (_character isKindOf "Animal") exitWith {
|
||||
diag_log ("ERROR: Cannot Sync Character " + (name _character) + " is an Animal class");
|
||||
diag_log ("ERROR: Cannot Sync Character " + (_name) + " is an Animal class");
|
||||
};
|
||||
|
||||
if (isnil "_characterID") exitWith {
|
||||
diag_log ("ERROR: Cannot Sync Character " + (name _character) + " has nil characterID");
|
||||
diag_log ("ERROR: Cannot Sync Character " + (_name) + " has nil characterID");
|
||||
};
|
||||
|
||||
if (_characterID == "0") exitWith {
|
||||
diag_log ("ERROR: Cannot Sync Character " + (name _character) + " as no characterID");
|
||||
diag_log ("ERROR: Cannot Sync Character " + (_name) + " as no characterID");
|
||||
};
|
||||
|
||||
private["_debug","_distance"];
|
||||
_debug = getMarkerpos "respawn_west";
|
||||
_distance = _debug distance _charPos;
|
||||
if (_distance < 2000) exitWith {
|
||||
diag_log format["ERROR: server_playerSync: Cannot Sync Player %1 [%2]. Position in debug! %3",name _character,_characterID,_charPos];
|
||||
diag_log format["ERROR: server_playerSync: Cannot Sync Player %1 [%2]. Position in debug! %3",_name,_characterID,_charPos];
|
||||
};
|
||||
|
||||
//Check for server initiated updates
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
private ["_character","_traderid","_buyorsell","_data","_result","_key","_outcome","_clientID"];
|
||||
private ["_character","_name","_traderid","_buyorsell","_data","_result","_key","_outcome","_clientID"];
|
||||
|
||||
_player = _this select 0;
|
||||
_traderID = _this select 1;
|
||||
@@ -9,11 +9,12 @@ _currency = _this select 5;
|
||||
_qty = _this select 6;
|
||||
_clientID = owner _player;
|
||||
_price = format ["%2x %1",_currency,_qty];
|
||||
_name = if (alive _character) then { name _character; } else { "Dead Player"; };
|
||||
|
||||
if (_buyorsell == 0) then { //Buy
|
||||
diag_log format["EPOCH SERVERTRADE: Player: %1 (%2) bought a %3 in/at %4 for %5", (name _player), (getPlayerUID _player), _classname, _traderCity, _price];
|
||||
diag_log format["EPOCH SERVERTRADE: Player: %1 (%2) bought a %3 in/at %4 for %5", _name, (getPlayerUID _player), _classname, _traderCity, _price];
|
||||
} else { //SELL
|
||||
diag_log format["EPOCH SERVERTRADE: Player: %1 (%2) sold a %3 in/at %4 for %5",(name _player), (getPlayerUID _player), _classname, _traderCity, _price];
|
||||
diag_log format["EPOCH SERVERTRADE: Player: %1 (%2) sold a %3 in/at %4 for %5",_name, (getPlayerUID _player), _classname, _traderCity, _price];
|
||||
};
|
||||
|
||||
if (DZE_ConfigTrader) then {
|
||||
|
||||
Reference in New Issue
Block a user