Epoch/Sources/epoch_code/compile/traders/EPOCH_takeCrypto.sqf
vbawol e2d621a4c8 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)
2016-08-08 14:24:47 -05:00

17 lines
466 B
Plaintext

private["_getCrypto"];
if !(isNil "EPOCH_takeCryptoLock") exitWith {};
EPOCH_takeCryptoLock = true;
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;
} else {
["No Krypto found", 5] call Epoch_message;
};
};
[] spawn{
uiSleep 2;
EPOCH_takeCryptoLock = nil;
};