From 2ff259a85ad6615893afe2cf78cd6e2b4b3f93fd Mon Sep 17 00:00:00 2001 From: Zepheris Date: Sat, 3 Mar 2018 15:22:27 -0700 Subject: [PATCH] Setup Exile Revive --- Exile Auto Start.bat | 2 +- mpmissions/Exile.Altis.pbo | Bin 2787729 -> 2788699 bytes mpmissions/Exile.Altis/CfgExileCustomCode.cpp | 12 +- mpmissions/Exile.Altis/config.cpp | 9 ++ .../custom/EnigmaRevive/Enigma_RevivePlyr.sqf | 119 ++++++++++++++++++ ...t_object_player_death_startBleedingOut.sqf | 97 ++++++++++++++ ..._object_player_event_onInventoryOpened.sqf | 63 ++++++++++ .../custom/EnigmaRevive/compiles.sqf | 27 ++++ .../Exile.Altis/custom/EnigmaRevive/init.sqf | 105 ++++++++++++++++ mpmissions/Exile.Altis/init.sqf | 5 +- 10 files changed, 430 insertions(+), 9 deletions(-) create mode 100644 mpmissions/Exile.Altis/custom/EnigmaRevive/Enigma_RevivePlyr.sqf create mode 100644 mpmissions/Exile.Altis/custom/EnigmaRevive/ExileClient_object_player_death_startBleedingOut.sqf create mode 100644 mpmissions/Exile.Altis/custom/EnigmaRevive/ExileClient_object_player_event_onInventoryOpened.sqf create mode 100644 mpmissions/Exile.Altis/custom/EnigmaRevive/compiles.sqf create mode 100644 mpmissions/Exile.Altis/custom/EnigmaRevive/init.sqf diff --git a/Exile Auto Start.bat b/Exile Auto Start.bat index 193238b..f2c22b5 100644 --- a/Exile Auto Start.bat +++ b/Exile Auto Start.bat @@ -8,7 +8,7 @@ echo Launching Server F: cd %ARMA% echo Exile Server Monitor... Active ! -start /affinity 0x3 /abovenormal "Arma3" arma3server_SC.exe "-mod=@exile;Kart;Mark;Heli;@lsd_nvg;@CBA_A3;" "-servermod=@exileserver;@asm;@marma;@A3XAI;@ASR_AI3;" -config=%ARMA%\@ExileServer\config.cfg -port=2302 -profiles=SC -cfg=%ARMA%\@ExileServer\basic.cfg -name=SC -autoinit -Loadmissiontomemory -hugepages +start /affinity 0x3 /abovenormal "Arma3" arma3server_SC.exe "-mod=@exile;Kart;Mark;Heli;@lsd_nvg;@CBA_A3;" "-servermod=@exileserver;@asm;@marma;@A3XAI;@ASR_AI3;@Enigma;" -config=%ARMA%\@ExileServer\config.cfg -port=2302 -profiles=SC -cfg=%ARMA%\@ExileServer\basic.cfg -name=SC -autoinit -Loadmissiontomemory -hugepages start /affinity 0xC /abovenormal "Arma3_HC" arma3server_HC.exe -client -connect=127.0.0.1 -password=joejer "-mod=@exile;Kart;Mark;Heli;@A3XAI_HC;@asm;@ASR_AI3;@CBA_A3;" -profiles=HC -name=HC REM ping 127.0.0.1 -n 15 >NUL diff --git a/mpmissions/Exile.Altis.pbo b/mpmissions/Exile.Altis.pbo index bfad2c6b1932a9efe734bce46db02ff25a2745da..1e765a6d02b09dcad9d91da53e6821e013f825b9 100644 GIT binary patch delta 919 zcma*l-%C?b8~||dbhFLwto$`K?dz)jxD2NcJ&gqxDka!bDwvFM<~`Gk_wLSn=Z~vM zM$iu=XpB0s=bnTfY=S5VJ_ONANiPNKK_BWbkRTB1d+!wT%?qCc_uTXSalTu=u*#K- ztK3V;HocXfins??xGMA6-73ZhSMuxM_`}LZ)tAj;{IK+fyBjZkNUYVBevXy7(u{Ol z3-KbSkHT&f`@xQcl$j>zi5C`D(eQF&>3p>sH6LMrqD! zP$Bb@GNV{Ua8NjU_sL#cZ{}VyTQHZU$VTxu=ZH0!KU+B5KQGC& z^4Fm}i}~%~l5k4h`gGbGVUIlaJ8UOrvp+o;u%T*HgUojaszqmz6S+_wI*WMZM)l|% zI*%@(2God}P%~;l9@L83P&>MaI#4INgaCCRFS?AbpsUD-{3w8e8wUfz^Bawui=k(G T?qA*~p4Z*GU+rt}93R;~-<>ud delta 285 zcmXBIJxc;{0LO9vmzrgF`P7r8Sy^ZG651MXNd<$>sVT%w@D(^*Q*<0Xa6>P^^@vXuhwst@jM`)t9~h5IViH zbWJSSMCn8$5MzhLO;!+A5o+e=d^B+MJ zi-=(f%ZOtIG8C*Lfh1B$BZD=pV*{JmLKfTDK@NHBqJTZ@;{Zh*;s`2AICeel W_<1acuYc94{~3(Owc*u3uKfWuLwD=| diff --git a/mpmissions/Exile.Altis/CfgExileCustomCode.cpp b/mpmissions/Exile.Altis/CfgExileCustomCode.cpp index ce69c19..29ddf42 100644 --- a/mpmissions/Exile.Altis/CfgExileCustomCode.cpp +++ b/mpmissions/Exile.Altis/CfgExileCustomCode.cpp @@ -3,12 +3,6 @@ //Extended Base Mod ExileClient_system_lootmanager_thread_spawn = "EBM\exileclient_system_lootmanager_thread_spawn.sqf"; - - -//Exile Revive -ExileClient_object_player_death_startBleedingOut = "custom\EnigmaRevive\ExileClient_object_player_death_startBleedingOut.sqf"; //Happys Revive -ExileClient_object_player_event_onInventoryOpened = "custom\EnigmaRevive\ExileClient_object_player_event_onInventoryOpened.sqf"; //Happys Revive AntiDupe ---NEW with v0.65 - //enhancedMovement ExileClient_system_thread_initialize = "custom\enhancedMovement\ExileClient_system_thread_initialize.sqf"; @@ -60,4 +54,8 @@ ExileClient_gui_constructionMode_update = "eXpochVectorBldg\ExileClient_gui_cons ExileClient_util_world_canBuildHere = "eXpochVectorBldg\ExileClient_util_world_canBuildHere.sqf"; //Persistent Tree -ExileServer_object_tree_network_chopTreeRequest="Custom\persistantTree\ExileServer_object_tree_network_chopTreeRequest.sqf"; \ No newline at end of file +ExileServer_object_tree_network_chopTreeRequest="Custom\persistantTree\ExileServer_object_tree_network_chopTreeRequest.sqf"; + +//Exile Revive +ExileClient_object_player_death_startBleedingOut = "custom\EnigmaRevive\ExileClient_object_player_death_startBleedingOut.sqf"; //Happys Revive +ExileClient_object_player_event_onInventoryOpened = "custom\EnigmaRevive\ExileClient_object_player_event_onInventoryOpened.sqf"; //Happys Revive AntiDupe ---NEW with v0.65 \ No newline at end of file diff --git a/mpmissions/Exile.Altis/config.cpp b/mpmissions/Exile.Altis/config.cpp index 9212b40..96a2a58 100644 --- a/mpmissions/Exile.Altis/config.cpp +++ b/mpmissions/Exile.Altis/config.cpp @@ -1008,6 +1008,15 @@ class CfgInteractionMenus condition = "!(alive ExileClientInteractionObject)"; action = "_this call ExileClient_object_player_identifyBody"; }; + + //////////////Added by [_ZEN_]happydayz///////////////// + + class Revive: ExileAbstractAction + { + title = "Perform CPR"; + condition = "(!(alive ExileClientInteractionObject) && (ExileClientInteractionObject getVariable ['EnigmaRevivePermitted', true]) && (magazines player find 'Exile_Item_Defibrillator' >= 0))"; + action = "_this spawn Enigma_RevivePlyr"; + }; class HideCorpse: ExileAbstractAction { diff --git a/mpmissions/Exile.Altis/custom/EnigmaRevive/Enigma_RevivePlyr.sqf b/mpmissions/Exile.Altis/custom/EnigmaRevive/Enigma_RevivePlyr.sqf new file mode 100644 index 0000000..edd2af3 --- /dev/null +++ b/mpmissions/Exile.Altis/custom/EnigmaRevive/Enigma_RevivePlyr.sqf @@ -0,0 +1,119 @@ +/* +Enigma_RevivePlyr.sqf +[_ZEN_] Happydayz +© 2016 Enigma Team +*/ + +private ["_target","_targetname", "_bodypos1", "_bodypos2", "_bodypos3", "_healPlace", "_action", "_bodypos", "_animstate", "_primaryw", "_timer", "_Anims", "_defibpos", "_defibangle", "_posh", "_posi", "_dy", "_dx", "_dir", "_position", "_lootHolder", "_targetsbleedoutcountdown", "_secondsRemaining"]; + +_target = _this select 0; +_targetname = name _target; +_bodypos1 = [0.75,0.15,0]; +_bodypos2 = [-0.75,0.1,0]; +_bodypos3 = [0,0.08,0]; +_healPlace = "_bodypos1"; +_action = "medicStartRightSide"; +_bodypos = _bodypos1; +_animstate = animationState _target; +_primaryw = primaryWeapon player; +_timer = 6; +_Anims = ["ainvpknlmstpsnonwrfldnon_ainvpknlmstpsnonwrfldnon_medic","ainvpknlmstpsnonwrfldnon_medic","ainvpknlmstpsnonwrfldr_medic0s","ainvpknlmstpsnonwrfldnon_medic0s","ainvpknlmstpsnonwrfldr_medic0","ainvpknlmstpsnonwrfldnon_medic0","ainvpknlmstpsnonwrfldr_medic1","ainvpknlmstpsnonwrfldnon_medic1","ainvpknlmstpsnonwrfldr_medic2","ainvpknlmstpsnonwrfldnon_medic2","ainvpknlmstpsnonwrfldr_medic3","ainvpknlmstpsnonwrfldnon_medic3","ainvpknlmstpsnonwrfldr_medic4","ainvpknlmstpsnonwrfldnon_medic4","ainvpknlmstpsnonwrfldr_medic5","ainvpknlmstpsnonwrfldnon_medic5"]; +_defibpos = [0.4,0.9,0]; +_defibangle = 30; + +if !(isPlayer _target) exitWith {systemChat Format ["Theres no pulse..."]}; + +if (_target getVariable "EnigmaRevivePermitted") then +{ + + if (magazines player find "Exile_Item_Defibrillator" >= 0) then + { + + + if ((player distance (_target modelToWorld _bodypos2))<((_target modelToWorld _bodypos1) distance player)) then + { + _healPlace = "_bodypos2"; + _action = "medicStart"; + _bodypos = _bodypos2; + _defibpos = [0,0.9,0]; + _defibangle = 180; + }; + + player attachTo [_target, _bodypos]; + + _posh = player modelToWorld [0,0,0]; + _posi = _target modelToWorld _bodypos3; + _dy = (_posh select 1) - (_posi select 1); + _dx = (_posh select 0) - (_posi select 0); + _dir = getDir player; + player setDir (270 - (_dy atan2 _dx) - direction _target); + + sleep 0.001; + + player removeMagazine "Exile_Item_Defibrillator"; + _position = _target modelToWorld _defibpos; + _lootHolder = createVehicle ["LootWeaponHolder", _position, [], 0, "CAN_COLLIDE"]; + _lootHolder setPosATL _position; + _lootHolder addItemCargoGlobal ["Exile_Item_Defibrillator",1]; + _lootHolder setDir ((getDir _target) + _defibangle); + + + if (_primaryw == "") then + { + + _target switchMove "AinjPpneMstpSnonWrflDnon"; + sleep 0.2; + player playMove "AinvPknlMstpSlayWrflDnon_medic"; + + } + else + { + if (currentWeapon player != _primaryw) then + { + player selectWeapon _primaryw; + sleep 2; + }; + + player playActionNow _action; + _timer = 15; + waitUntil { animationState player in _Anims }; + }; + + sleep _timer; + detach player; + + if (_primaryw == "") then + { + player switchmove ""; + } + else + { + player switchAction "medicStart"; + player playActionNow "medicStop"; + }; + + if (_target getVariable["REVIVE", true]) then + { + _targetsbleedoutcountdown = _target getVariable "BleedoutCountDownEnd"; + _secondsRemaining = _targetsbleedoutcountdown - time; + if (_secondsRemaining >= 17) then + { + _target setVariable["antidupe", -1, true]; + ENIGMA_revivePlayer = [_target,player,1]; + publicVariableServer "ENIGMA_revivePlayer"; + } + else + { + systemChat Format ["RIP %1! They are too far gone!",_targetname]; + }; + } + else + { + systemChat Format ["RIP %1! They suffered a fatal injury!",_targetname]; + }; + }; +} +else +{ + systemChat Format ["RIP %1! They suffered a fatal injury!",_targetname]; +}; \ No newline at end of file diff --git a/mpmissions/Exile.Altis/custom/EnigmaRevive/ExileClient_object_player_death_startBleedingOut.sqf b/mpmissions/Exile.Altis/custom/EnigmaRevive/ExileClient_object_player_death_startBleedingOut.sqf new file mode 100644 index 0000000..003d46a --- /dev/null +++ b/mpmissions/Exile.Altis/custom/EnigmaRevive/ExileClient_object_player_death_startBleedingOut.sqf @@ -0,0 +1,97 @@ +private["_respawnDelay","_layer","_descriptions"]; + +_respawnDelay = _this; +oldgroup = group player; + +if (player getVariable["REVIVE", true]) then +{ + + _descriptions = + [ + "KNOCKED OUT", + "CRITICALLY WOUNDED", + "BLEEDING OUT", + "ON DEATHS DOOR" + ]; + + player setVariable ['EnigmaRevivePermitted', true, true]; +} +else +{ + _descriptions = + [ + "WRECKED", + "REKT", + "STOMPED", + "WASTED", + "SCREWED", + "TOASTED", + "REST IN PIECES", + "TERMINATED", + "KILLED", + "EXILED", + "ANNIHILATED", + "HAMMERED", + "NEUTRALIZED", + "DUMPED", + "ZAPPED", + "SLAIN", + "FRIED", + "WIPED OUT", + "VANQUISHED", + "BUSTED", + "PULVERIZED", + "SMASHED", + "SHREDDED", + "CRUSHED" + ]; +}; + +// SPLASH +[100] call BIS_fnc_bloodEffect; + +// Fade to gray instantly +//ExileClientPostProcessingColorCorrections ppEffectAdjust [1, 1.1, -0.05, [0.4, 0.2, 0.3, -0.1], [0.79, 0.72, 0.62, 0], [0.5,0.5,0.5,0], [0,0,0,0,0,0,4]]; +ExileClientPostProcessingColorCorrections ppEffectAdjust [1, 1, 0, [0, 0, 0, 0], [0.39, 0.32, 0.25, 0], [0.5,0.5,0.5,0], [0,0,0,0,0,0,4]]; +ExileClientPostProcessingColorCorrections ppEffectCommit 0; + +// Fade to red slowy +//ExileClientPostProcessingColorCorrections ppEffectAdjust [1, 1.1, -0.05, [0.4, 0.2, 0.3, -0.1], [0.3, 0.05, 0, 0], [0.5,0.5,0.5,0], [0,0,0,0,0,0,4]]; +ExileClientPostProcessingColorCorrections ppEffectAdjust [1, 1, 0, [0.4, 0.2, 0.3, 0], [0.3, 0.05, 0, 0], [0.5,0.5,0.5,0], [0,0,0,0,0,0,4]]; +ExileClientPostProcessingColorCorrections ppEffectCommit _respawnDelay; + +// Enable blur +ExileClientPostProcessingBackgroundBlur ppEffectAdjust [0]; +ExileClientPostProcessingBackgroundBlur ppEffectCommit 0; +ExileClientPostProcessingBackgroundBlur ppEffectEnable true; +ExileClientPostProcessingBackgroundBlur ppEffectAdjust [2]; +ExileClientPostProcessingBackgroundBlur ppEffectCommit _respawnDelay; + +// Our count down +ExileClientBleedOutHeartbeatPlaying = false; +ExileClientBleedOutCountDownDuration = _respawnDelay; +ExileClientBleedOutCountDownEnd = time + _respawnDelay; +player setVariable ["BleedoutCountDownEnd", ExileClientBleedOutCountDownEnd, true]; +// BIS count down GUI +_layer = "BIS_fnc_respawnCounter" call bis_fnc_rscLayer; +_layer cutText ["", "plain"]; + +missionnamespace setvariable ["RscRespawnCounter_description", format ["%1",selectRandom _descriptions]]; +missionnamespace setvariable ["RscRespawnCounter_colorID", 0]; +missionnamespace setvariable ["RscRespawnCounter_Custom", _respawnDelay]; + +_layer cutRsc ["RscRespawnCounter", "plain"]; + +// Force enable chat +showChat true; + +"Start bleeding out..." call ExileClient_util_log; + +// Bleed to death (every 2 seconds) +if(ExileClientBleedOutThread isEqualTo -1)then +{ + ExileClientBleedOutThread = [2, ExileClient_object_player_thread_bleedToDeath, [], true] call ExileClient_system_thread_addtask; +}; + + +true diff --git a/mpmissions/Exile.Altis/custom/EnigmaRevive/ExileClient_object_player_event_onInventoryOpened.sqf b/mpmissions/Exile.Altis/custom/EnigmaRevive/ExileClient_object_player_event_onInventoryOpened.sqf new file mode 100644 index 0000000..eaea28e --- /dev/null +++ b/mpmissions/Exile.Altis/custom/EnigmaRevive/ExileClient_object_player_event_onInventoryOpened.sqf @@ -0,0 +1,63 @@ +/** + * ExileClient_object_player_event_onInventoryOpened + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +_cancelEvent = false; +_container = _this select 1; + +try +{ + if (ExileIsPlayingRussianRoulette) then + { + throw true; + }; + + if (ExileClientIsHandcuffed) then + { + throw true; + }; + + if (ExileClientActionDelayShown) then + { + throw true; + }; + + // Dont double-place walls while in construction mode + if (ExileClientIsInConstructionMode) then + { + throw true; + }; + + // Cannot access locked vehicles + if ((locked _container) isEqualTo 2) then + { + throw true; + }; + + // Cannot access locked containers + if (_container getVariable ["ExileIsLocked", 1] isEqualTo -1) then + { + throw true; + }; + // Cannot access in progress revive player inventories + if ((_container getVariable["antidupe", 1]) isEqualTo -1) then + { + throw true; + }; + + ExileClientInventoryOpened = true; + ExileClientCurrentInventoryContainer = _container; +} +catch +{ + _cancelEvent = _exception; +}; + +_cancelEvent \ No newline at end of file diff --git a/mpmissions/Exile.Altis/custom/EnigmaRevive/compiles.sqf b/mpmissions/Exile.Altis/custom/EnigmaRevive/compiles.sqf new file mode 100644 index 0000000..3a265e1 --- /dev/null +++ b/mpmissions/Exile.Altis/custom/EnigmaRevive/compiles.sqf @@ -0,0 +1,27 @@ +/* +Enigma Exile Revive Compiles +[_ZEN_] Happydayz +© 2016 Enigma Team +*/ + +if (!hasInterface && isServer) exitWith { +Diag_log "Initializing Enigma Revive Compiles!"; +}; + +private ['_code', '_function', '_file']; + +{ + _code = ''; + _function = _x select 0; + _file = _x select 1; + _code = compileFinal (preprocessFileLineNumbers _file); + missionNamespace setVariable [_function, _code]; +} +forEach +[ + ['Enigma_RevivePlyr', 'Custom\EnigmaRevive\Enigma_RevivePlyr.sqf'] +]; + +true + + diff --git a/mpmissions/Exile.Altis/custom/EnigmaRevive/init.sqf b/mpmissions/Exile.Altis/custom/EnigmaRevive/init.sqf new file mode 100644 index 0000000..818e05c --- /dev/null +++ b/mpmissions/Exile.Altis/custom/EnigmaRevive/init.sqf @@ -0,0 +1,105 @@ +/* +Enigma Exile Revive Initialization +[_ZEN_] Happydayz +© 2016 Enigma Team +*/ + + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////Custom Settings////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +if (!hasInterface && isServer) exitWith { + + +GR8HumanityInstalled = false; //If you are running GR8's Humanity script set this to true! + +MaxRevivesAllowed = 3; //Set the max number of revives permitted per life. I recomend you keep it at 1. Just saying... + +DamageWhenRevived = 0.35; //Set to a percentage. 0.95 = 95% damage.... or 5% health + +FatiguewhenRevived = 0; //Set to a percentage. 1 = 100% fatigued and can only walk. + + +//NOTE: this has been designed to only allow 1 revive. I havent put in any checks to prevent players using this to gain respect by killing each other and reviving again!!! +//You have been warned! + + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////DO NOT MODIFY BELOW THIS LINE/////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////////////Server Settings///////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +ReviveChk_cache = []; +ReviveChk_cache = [[0000,0]]; +Diag_log "Initializing Enigma Revive!"; +}; +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////Client Settings////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +if (hasInterface) then { +[] execVM "Custom\EnigmaRevive\compiles.sqf"; +player setVariable ['EnigmaRevivePermitted', false, true]; +player setVariable["antidupe", 1, true]; +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////EventHandlers////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +"EnigmaRevive" addPublicVariableEventHandler { + private["_newPlayerObject","_oldPlayerObject","_packet","_weapon","_reviver"]; + _packet = _this select 1; + _newPlayerObject = _packet select 0; + cutText ["","BLACK IN",20]; + [100] call BIS_fnc_bloodEffect; + "Reviving player..." call ExileClient_util_log; + _layer = "BIS_fnc_respawnCounter" call bis_fnc_rscLayer; + _layer cutText ["", "plain"]; + "Removing bleed out thread..." call ExileClient_util_log; + [ExileClientBleedOutThread] call ExileClient_system_thread_removeTask; + ExileClientBleedOutThread = -1; + player setVariable ['EnigmaRevivePermitted', false, true]; + false call ExileClient_gui_postProcessing_toggleDialogBackgroundBlur; + true call ExileClient_gui_hud_toggle; + ["endBambiStateRequest"] call ExileClient_system_network_send; //remove bambi status (changed in some previous version to clientside control) + [ExileClientEndBambiStateThread] call ExileClient_system_thread_removeTask; + ExileClientPlayerIsBambi = false; + false call ExileClient_gui_hud_toggleBambiIcon; + player setVariable["antidupe", 1, true]; //remove the antidupe from the revived player! +}; + +"EnigmaReviveFail" addPublicVariableEventHandler { + _packet = _this select 1; + _requestingPlayer = _packet select 0; + _revivername = _packet select 1; + systemChat Format ["%1 bungled your revive and killed you!",_revivername]; + player setVariable["antidupe", 1, true]; //remove the antidupe from the revived player! + [] call ExileClient_gui_escape_respawn; //force kill player +}; + +"EnigmaReviveMSG" addPublicVariableEventHandler { + _packet = _this select 1; + _msg = _packet select 0; + systemChat Format ["%1",_msg]; + }; + waitUntil { uiSleep 0.5; !isNull(findDisplay 46); }; + sleep 10; + systemChat "Loading: Enigma Exile Revive"; //Please leave this line as a way of saying thanks to me! :D HAPPYD +}; \ No newline at end of file diff --git a/mpmissions/Exile.Altis/init.sqf b/mpmissions/Exile.Altis/init.sqf index a67d1bc..eede579 100644 --- a/mpmissions/Exile.Altis/init.sqf +++ b/mpmissions/Exile.Altis/init.sqf @@ -17,4 +17,7 @@ if (isServer) then { if (hasInterface) then { call compile preprocessFileLineNumbers "Custom\st_map_gestures\clientInit.sqf"; -}; \ No newline at end of file +}; + +//Exile Revive +[] execVM "Custom\EnigmaRevive\init.sqf"; \ No newline at end of file