1.7.5.M1D9 + tag friend system from

This commit is contained in:
A Clark
2013-01-12 15:24:48 -06:00
parent 8c735ce9c2
commit 7e52d6ee28
21 changed files with 121 additions and 34 deletions

View File

@@ -6,6 +6,8 @@ if (_onLadder) exitWith {cutText [(localize "str_player_21") , "PLAIN DOWN"]};
if (vehicle player != player) exitWith {cutText ["You may not drink while in a vehicle", "PLAIN DOWN"]};
if (dayz_thirst == 0) exitWith {cutText ["I am not thirsty", "PLAIN DOWN"]};
_item = _this;
_hasdrinkitem = _this in magazines player;

View File

@@ -6,6 +6,8 @@ if (_onLadder) exitWith {cutText [(localize "str_player_21") , "PLAIN DOWN"]};
if (vehicle player != player) exitWith {cutText ["You may not eat while in a vehicle", "PLAIN DOWN"]};
if (dayz_hunger == 0) exitWith {cutText ["I am not hungry", "PLAIN DOWN"]};
_item = _this;
_hasfoodmag = _this in magazines player;
@@ -19,6 +21,8 @@ player playActionNow "PutDown";
player removeMagazine _item;
sleep 1;
_regen = round(random _regen);
r_player_blood = r_player_blood + _regen;
if (r_player_blood > r_player_bloodTotal) then {
r_player_blood = r_player_bloodTotal;

View File

@@ -0,0 +1,22 @@
private["_target", "_caller", "_action", "_callerID", "_targetID", "_friendlies", "_rfriendlies"];
_target = _this select 0;
_caller = _this select 1;
_action = _this select 2;
_caller removeAction _action;
_callerID = _caller getVariable "characterID";
_targetID = _target getVariable "characterID";
_friendlies = _caller getVariable ["friendlies", []];
_friendlies set [count _friendlies, _targetID];
_caller setVariable ["friendlies", _friendlies, true];
_rfriendlies = _target getVariable ["friendlies", []];
if (!(_callerID in _rfriendlies)) then {
// caller
titleText [format["You have tagged %1 as friendly. Waiting for %2 to accept that.",(name _target),(name _target)]];
// target
[_caller,_target,"loc",rTITLETEXT,format["%1 wants to tag you as friendly. To accept, tag %2 as friendly.", (name _caller),(name _caller)],"PLAIN DOWN"] call RE;
};