From 9a1193eacc7fdf1c6878ca7f54960f0903bf01ec Mon Sep 17 00:00:00 2001 From: "[VB]AWOL" Date: Fri, 29 Nov 2013 13:41:48 -0600 Subject: [PATCH] fixed #813 and cutext confirmation fixes --- SQF/dayz_code/actions/player_tagFriendly.sqf | 7 ++++--- SQF/dayz_code/init/compiles.sqf | 6 ++++++ SQF/dayz_code/init/publicEH.sqf | 4 ++-- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/SQF/dayz_code/actions/player_tagFriendly.sqf b/SQF/dayz_code/actions/player_tagFriendly.sqf index ba8693499..b5589f072 100644 --- a/SQF/dayz_code/actions/player_tagFriendly.sqf +++ b/SQF/dayz_code/actions/player_tagFriendly.sqf @@ -3,7 +3,8 @@ _target = _this select 0; _caller = _this select 1; _action = _this select 2; -_caller removeAction _action; +call fnc_usec_medic_removeActions; +r_action = false; _callerID = _caller getVariable "CharacterID"; _targetID = _target getVariable "CharacterID"; @@ -16,8 +17,8 @@ _rfriendlies = _target getVariable ["friendlies", []]; if (!(_callerID in _rfriendlies)) then { // caller - titleText [format["You have tagged a player as friendly. Waiting for other player to accept.",(name _target)], "PLAIN DOWN"]; + titleText ["You have tagged a player as friendly. Waiting for other player to accept.", "PLAIN DOWN"]; // TODO: localize // target - PVDZE_plr_FriendRQ = format[(localize "str_epoch_player_2"), (name _caller)]; + PVDZE_plr_FriendRQ = _target; publicVariable "PVDZE_plr_FriendRQ"; }; \ No newline at end of file diff --git a/SQF/dayz_code/init/compiles.sqf b/SQF/dayz_code/init/compiles.sqf index e6d5f55fc..40a766851 100644 --- a/SQF/dayz_code/init/compiles.sqf +++ b/SQF/dayz_code/init/compiles.sqf @@ -329,6 +329,12 @@ if (!isDedicated) then { }; }; + player_tagFriendlyMsg = { + if(player == _this) then { + cutText[(localize "str_epoch_player_2"),"PLAIN DOWN"]; + }; + }; + player_serverModelChange = { private["_object","_model"]; _object = _this select 0; diff --git a/SQF/dayz_code/init/publicEH.sqf b/SQF/dayz_code/init/publicEH.sqf index ae900a567..c5887fc34 100644 --- a/SQF/dayz_code/init/publicEH.sqf +++ b/SQF/dayz_code/init/publicEH.sqf @@ -77,9 +77,9 @@ if (!isDedicated) then { "PVDZE_plr_Morph2" addPublicVariableEventHandler {(_this select 1) call player_serverModelChange}; "PVDZE_plr_Morph" addPublicVariableEventHandler {(_this select 1) call server_switchPlayer}; "PVDZE_obj_Fire" addPublicVariableEventHandler {nul=(_this select 1) spawn BIS_Effects_Burn}; - "PVDZE_plr_FriendRQ" addPublicVariableEventHandler {cutText[(_this select 1),"PLAIN DOWN"];}; + "PVDZE_plr_FriendRQ" addPublicVariableEventHandler {(_this select 1) call player_tagFriendlyMsg}; - "PVDZE_obj_Debris" addPublicVariableEventHandler {(_this select 1) call local_roadDebris}; + // "PVDZE_obj_Debris" addPublicVariableEventHandler {(_this select 1) call local_roadDebris}; "norrnRaDrag" addPublicVariableEventHandler {(_this select 1) execVM "\z\addons\dayz_code\medical\publicEH\animDrag.sqf"}; "norrnRnoAnim" addPublicVariableEventHandler {(_this select 1) execVM "\z\addons\dayz_code\medical\publicEH\noAnim.sqf"};