add no Krypto found message

changed logic of dyna_isDeadPlayer to only allow typeOf Epoch_Male_F or
Epoch_Female_F as isKindOf Man without the isplayer check would have
returned for traders incorrectly. (unless we want killing traders to
come with a Krypto payout)
This commit is contained in:
vbawol 2016-08-08 14:24:47 -05:00
parent 4ea5404cd5
commit e2d621a4c8
3 changed files with 5 additions and 3 deletions

View File

@ -5,7 +5,9 @@ if (!isNull _this) then {
_getCrypto = _this getVariable["Crypto", 0];
if (_getCrypto > 0) then {
[player, Epoch_personalToken, _this] remoteExec ["EPOCH_server_takeCrypto",2];
[format["You found %1 Krypto.", _getCrypto], 5] call Epoch_message;
[format["You found %1 Krypto", _getCrypto], 5] call Epoch_message;
} else {
["No Krypto found", 5] call Epoch_message;
};
};
[] spawn{

View File

@ -28,7 +28,7 @@ class CfgActionMenu
dyna_isVehicle = "if (!(isNull dyna_cursorTarget) && alive dyna_cursorTarget) then {((dyna_cursorTarget isKindOf 'LandVehicle') || (dyna_cursorTarget isKindOf 'Air') || (dyna_cursorTarget isKindOf 'Ship') || (dyna_cursorTarget isKindOf 'Tank'))} else {false}";
dyna_isTrader = "if (!(isNull dyna_cursorTarget) && alive dyna_cursorTarget) then {((dyna_cursorTarget isKindOf 'Man') && (dyna_cursorTarget != player) && (!isPlayer dyna_cursorTarget) && ((dyna_cursorTarget getVariable['AI_SLOT', -1]) != -1))} else {false}";
dyna_isPlayer = "if (!(isNull dyna_cursorTarget) && alive dyna_cursorTarget) then {((dyna_cursorTarget isKindOf 'Man') && (dyna_cursorTarget != player) && (isPlayer dyna_cursorTarget))} else {false}";
dyna_isDeadPlayer = "if (!(isNull dyna_cursorTarget) && !(alive dyna_cursorTarget)) then {((dyna_cursorTarget isKindOf 'Man') && (dyna_cursorTarget != player))} else {false}";
dyna_isDeadPlayer = "if (!(isNull dyna_cursorTarget) && !(alive dyna_cursorTarget)) then {(dyna_cursorTargetType in ['Epoch_Male_F','Epoch_Female_F'])} else {false}";
dyna_canAcceptTrade = "if (!(isNull EPOCH_pendingP2ptradeTarget) && alive EPOCH_pendingP2ptradeTarget) then {((EPOCH_pendingP2ptradeTarget isKindOf 'Man') && (dyna_cursorTarget isEqualTo EPOCH_pendingP2ptradeTarget))} else {false}";
dyna_locked = "locked dyna_cursorTarget in [2,3]";
dyna_lockedInVehicle = "locked vehicle player in [2,3]";

View File

@ -79,7 +79,7 @@ class tra_shop
class player_takeCrypto
{
condition = "dyna_isDeadPlayer && (dyna_cursorTarget getVariable ['Crypto',0]) > 0";
condition = "dyna_isDeadPlayer";
action = "dyna_cursorTarget call EPOCH_takeCrypto;";
icon = "x\addons\a3_epoch_code\Data\UI\buttons\krypto.paa";
tooltip = "Take Krypto";