mirror of
https://github.com/hpy/Enigma_Exile_Revive.git
synced 2024-08-30 16:52:15 +00:00
this should work with 1.0.1
This commit is contained in:
parent
f2ea160938
commit
60d0c12b20
Binary file not shown.
@ -89,9 +89,7 @@ if (!local _requestingPlayer) then
|
|||||||
|
|
||||||
|
|
||||||
_accountData = format["getAccountStats:%1", _requestingPlayerUID] call ExileServer_system_database_query_selectSingle;
|
_accountData = format["getAccountStats:%1", _requestingPlayerUID] call ExileServer_system_database_query_selectSingle;
|
||||||
_group = call ExileServer_system_group_getOrCreateLoneWolfGroup;
|
_bambiPlayer = (createGroup independent) createUnit ["Exile_Unit_Player", [0,0,0], [], 0, "CAN_COLLIDE"];
|
||||||
|
|
||||||
_bambiPlayer = _group createUnit["Exile_Unit_Player", _location, [], 0, "CAN_COLLIDE"];
|
|
||||||
removeHeadgear _bambiPlayer;
|
removeHeadgear _bambiPlayer;
|
||||||
_bambiPlayer allowDammage false;
|
_bambiPlayer allowDammage false;
|
||||||
_clanID = (_accountData select 3);
|
_clanID = (_accountData select 3);
|
||||||
@ -343,17 +341,4 @@ call ExileServer_system_network_send_to;
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
//test to see if this stops duping
|
|
||||||
|
|
||||||
|
|
||||||
[] spawn
|
|
||||||
{
|
|
||||||
uiSleep 4;
|
|
||||||
if (isNull _player) then
|
|
||||||
{
|
|
||||||
diag_log "EnigmaRevive - Something went horribly wrong!";
|
|
||||||
[_player] joinSilent ExileServerGraveyardGroup;
|
|
||||||
deleteVehicle _player;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
@ -1,15 +1,5 @@
|
|||||||
/**
|
|
||||||
* ExileClient_object_player_death_startBleedingOut
|
|
||||||
*
|
|
||||||
* 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/.
|
|
||||||
*/
|
|
||||||
|
|
||||||
private["_respawnDelay","_layer","_descriptions"];
|
private["_respawnDelay","_layer","_descriptions"];
|
||||||
|
|
||||||
_respawnDelay = _this;
|
_respawnDelay = _this;
|
||||||
oldgroup = group player;
|
oldgroup = group player;
|
||||||
|
|
||||||
@ -57,32 +47,51 @@ else
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
[100] call BIS_fnc_bloodEffect;
|
// SPLASH
|
||||||
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]];
|
[100] call BIS_fnc_bloodEffect;
|
||||||
ExileClientPostProcessingColorCorrections ppEffectCommit 0;
|
|
||||||
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]];
|
// Fade to gray instantly
|
||||||
ExileClientPostProcessingColorCorrections ppEffectCommit _respawnDelay;
|
//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]];
|
||||||
ExileClientPostProcessingBackgroundBlur ppEffectAdjust [0];
|
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]];
|
||||||
ExileClientPostProcessingBackgroundBlur ppEffectCommit 0;
|
ExileClientPostProcessingColorCorrections ppEffectCommit 0;
|
||||||
ExileClientPostProcessingBackgroundBlur ppEffectEnable true;
|
|
||||||
ExileClientPostProcessingBackgroundBlur ppEffectAdjust [2];
|
// Fade to red slowy
|
||||||
ExileClientPostProcessingBackgroundBlur ppEffectCommit _respawnDelay;
|
//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]];
|
||||||
ExileClientBleedOutHeartbeatPlaying = false;
|
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]];
|
||||||
ExileClientBleedOutCountDownDuration = _respawnDelay;
|
ExileClientPostProcessingColorCorrections ppEffectCommit _respawnDelay;
|
||||||
ExileClientBleedOutCountDownEnd = time + _respawnDelay;
|
|
||||||
player setVariable ["BleedoutCountDownEnd", ExileClientBleedOutCountDownEnd, true];
|
// Enable blur
|
||||||
_layer = "BIS_fnc_respawnCounter" call bis_fnc_rscLayer;
|
ExileClientPostProcessingBackgroundBlur ppEffectAdjust [0];
|
||||||
_layer cutText ["", "plain"];
|
ExileClientPostProcessingBackgroundBlur ppEffectCommit 0;
|
||||||
missionnamespace setvariable ["RscRespawnCounter_description", format ["<t size='2' align='center'>%1</t>",selectRandom _descriptions]];
|
ExileClientPostProcessingBackgroundBlur ppEffectEnable true;
|
||||||
missionnamespace setvariable ["RscRespawnCounter_colorID", 0];
|
ExileClientPostProcessingBackgroundBlur ppEffectAdjust [2];
|
||||||
missionnamespace setvariable ["RscRespawnCounter_Custom", _respawnDelay];
|
ExileClientPostProcessingBackgroundBlur ppEffectCommit _respawnDelay;
|
||||||
_layer cutRsc ["RscRespawnCounter", "plain"];
|
|
||||||
showChat true;
|
// Our count down
|
||||||
"Start bleeding out..." call ExileClient_util_log;
|
ExileClientBleedOutHeartbeatPlaying = false;
|
||||||
if(ExileClientBleedOutThread isEqualTo -1)then
|
ExileClientBleedOutCountDownDuration = _respawnDelay;
|
||||||
{
|
ExileClientBleedOutCountDownEnd = time + _respawnDelay;
|
||||||
|
|
||||||
|
// BIS count down GUI
|
||||||
|
_layer = "BIS_fnc_respawnCounter" call bis_fnc_rscLayer;
|
||||||
|
_layer cutText ["", "plain"];
|
||||||
|
|
||||||
|
missionnamespace setvariable ["RscRespawnCounter_description", format ["<t size='2' align='center'>%1</t>",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;
|
ExileClientBleedOutThread = [2, ExileClient_object_player_thread_bleedToDeath, [], true] call ExileClient_system_thread_addtask;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
true
|
true
|
@ -9,44 +9,55 @@
|
|||||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private["_cancelEvent","_container"];
|
|
||||||
_cancelEvent = false;
|
_cancelEvent = false;
|
||||||
_container = _this select 1;
|
_container = _this select 1;
|
||||||
if (ExileClientIsHandcuffed) then
|
|
||||||
{
|
try
|
||||||
_cancelEvent = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
|
if (ExileIsPlayingRussianRoulette) then
|
||||||
|
{
|
||||||
|
throw true;
|
||||||
|
};
|
||||||
|
|
||||||
|
if (ExileClientIsHandcuffed) then
|
||||||
|
{
|
||||||
|
throw true;
|
||||||
|
};
|
||||||
|
|
||||||
if (ExileClientActionDelayShown) then
|
if (ExileClientActionDelayShown) then
|
||||||
{
|
{
|
||||||
_cancelEvent = true;
|
throw true;
|
||||||
}
|
};
|
||||||
else
|
|
||||||
{
|
// Dont double-place walls while in construction mode
|
||||||
if (ExileClientIsInConstructionMode) then
|
if (ExileClientIsInConstructionMode) then
|
||||||
{
|
{
|
||||||
_cancelEvent = true;
|
throw true;
|
||||||
}
|
};
|
||||||
else
|
|
||||||
{
|
// Cannot access locked vehicles
|
||||||
if ((locked _container) isEqualTo 2) then
|
if ((locked _container) isEqualTo 2) then
|
||||||
{
|
{
|
||||||
_cancelEvent = true;
|
throw true;
|
||||||
}
|
};
|
||||||
else
|
|
||||||
|
// Cannot access locked containers
|
||||||
|
if (_container getVariable ["ExileIsLocked", 1] isEqualTo -1) then
|
||||||
{
|
{
|
||||||
if ((_container getVariable ["ExileIsLocked", 1] isEqualTo -1) || (_container getVariable["antidupe", 1]) isEqualTo -1) then //added revive dupe test -- happdayz
|
throw true;
|
||||||
{
|
};
|
||||||
_cancelEvent = true;
|
// Cannot access in progress revive player inventories
|
||||||
}
|
if ((_container getVariable["antidupe", 1]) isEqualTo -1) then
|
||||||
else
|
|
||||||
{
|
{
|
||||||
|
throw true;
|
||||||
|
};
|
||||||
|
|
||||||
ExileClientInventoryOpened = true;
|
ExileClientInventoryOpened = true;
|
||||||
ExileClientCurrentInventoryContainer = _container;
|
ExileClientCurrentInventoryContainer = _container;
|
||||||
};
|
}
|
||||||
};
|
catch
|
||||||
};
|
{
|
||||||
};
|
_cancelEvent = _exception;
|
||||||
};
|
};
|
||||||
_cancelEvent // OKAY!
|
|
||||||
|
_cancelEvent
|
@ -64,10 +64,12 @@ player setVariable["antidupe", 1, true];
|
|||||||
//////////////////////////////////////////////////////////////////////////////////////EventHandlers//////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////EventHandlers//////////////////////////////////////////////////////////////////////////////////////
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
"EnigmaRevive" addPublicVariableEventHandler {
|
"EnigmaRevive" addPublicVariableEventHandler {
|
||||||
private["_newPlayerObject","_oldPlayerObject","_packet","_weapon","_reviver"];
|
private["_newPlayerObject","_oldPlayerObject","_packet","_weapon","_reviver"];
|
||||||
_packet = _this select 1;
|
_packet = _this select 1;
|
||||||
_newPlayerObject = _packet select 0;
|
_newPlayerObject = _packet select 0;
|
||||||
if (alive _newPlayerObject) then
|
if (alive _newPlayerObject) then
|
||||||
|
{
|
||||||
|
if (isPlayer _newPlayerObject) then
|
||||||
{
|
{
|
||||||
cutText ["","BLACK IN",20];
|
cutText ["","BLACK IN",20];
|
||||||
[100] call BIS_fnc_bloodEffect;
|
[100] call BIS_fnc_bloodEffect;
|
||||||
@ -85,14 +87,20 @@ player setVariable["antidupe", 1, true];
|
|||||||
ExileClientPlayerIsBambi = false;
|
ExileClientPlayerIsBambi = false;
|
||||||
false call ExileClient_gui_hud_toggleBambiIcon;
|
false call ExileClient_gui_hud_toggleBambiIcon;
|
||||||
player setVariable["antidupe", 1, true]; //remove the antidupe from the revived player!
|
player setVariable["antidupe", 1, true]; //remove the antidupe from the revived player!
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
call ExileClient_object_player_death_forceRespawn;
|
call ExileClient_object_player_death_forceRespawn;
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
call ExileClient_object_player_death_forceRespawn;
|
||||||
};
|
};
|
||||||
|
|
||||||
"EnigmaReviveFail" addPublicVariableEventHandler {
|
"EnigmaReviveFail" addPublicVariableEventHandler
|
||||||
|
{
|
||||||
_packet = _this select 1;
|
_packet = _this select 1;
|
||||||
_requestingPlayer = _packet select 0;
|
_requestingPlayer = _packet select 0;
|
||||||
_revivername = _packet select 1;
|
_revivername = _packet select 1;
|
||||||
@ -101,7 +109,8 @@ player setVariable["antidupe", 1, true];
|
|||||||
call ExileClient_object_player_death_forceRespawn; //force kill player
|
call ExileClient_object_player_death_forceRespawn; //force kill player
|
||||||
};
|
};
|
||||||
|
|
||||||
"EnigmaReviveMSG" addPublicVariableEventHandler {
|
"EnigmaReviveMSG" addPublicVariableEventHandler
|
||||||
|
{
|
||||||
_packet = _this select 1;
|
_packet = _this select 1;
|
||||||
_msg = _packet select 0;
|
_msg = _packet select 0;
|
||||||
systemChat Format ["%1",_msg];
|
systemChat Format ["%1",_msg];
|
||||||
|
Loading…
Reference in New Issue
Block a user