Новости

SMF - Just Installed!

[Инструкция] Анимированный экран смерти

ReloadeD · 2007

ReloadeD

  • Administrator
  • Новенький
  • *****
    • Сообщений: 17
    • Рейтинг: 15
    • Просмотр профиля
compiles.sqf
	player_death =				compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_death.sqf"; //найти
player_death = compile preprocessFileLineNumbers "custom\player_death.sqf"; //заменить

AH.sqf
					[] spawn (compile preprocessFileLineNumbers '\z\addons\dayz_code\compile\player_death.sqf'); //найти
[] spawn (compile preprocessFileLineNumbers 'custom\player_death.sqf'); //заменить

player_death.sqf
private ["_display","_body","_playerID","_array","_source","_method","_canHitFree","_isBandit","_punishment","_humanityHit","_myKills","_humanity","_kills","_killsV","_myGroup"];
disableSerialization;
if (deathHandled) exitWith {};
deathHandled = true;
if ((alive player) && {isNil {dayz_playerName}}) then {
dayz_playerName = name player;
};
//Prevent client freezes
_display = findDisplay 49;
if(!isNull _display) then {_display closeDisplay 0;};
if (dialog) then {closeDialog 0;};
if (visibleMap) then {openMap false;};
disableUserInput true;

_body = player;
if (alive _body) then {
_body2 = _body;
_body2 setDamage 1;
};

_body spawn {
"colorCorrections" ppEffectEnable true;"colorCorrections" ppEffectAdjust [1, 1, 0, [1, 1, 1, 0.0], [1, 1, 1, 0.1],  [1, 1, 1, 0.0]];
"colorCorrections" ppEffectCommit 0;
"dynamicBlur" ppEffectEnable true;
"dynamicBlur" ppEffectAdjust [2];
"dynamicBlur" ppEffectCommit 0;
showCinemaBorder true;
camUseNVG false;
_dead_s = "camera" camCreate [(getPosATL _this select 0), (getPosATL _this select 1),(getPosATL _this select 2)+4];
_dead_s cameraEffect ["internal","back"];

_dead_s camSetFOV 2;
_dead_s camSetTarget (vehicle _this);
_dead_s camCommit 0;
waitUntil {camCommitted _dead_s};
sleep 3;
_dead_s camSetTarget [(getPosATL _this select 0), (getPosATL _this select 1),(getPosATL _this select 2)+800];
_dead_s camSetRelPos [0,5,0];
_dead_s camCommit 80;
};
_playerID = getPlayerUID player;
_infected = 0;

PVDZE_plr_Died = [dayz_characterID,0,_body,_playerID,_infected, dayz_playerName];
publicVariableServer "PVDZE_plr_Died";

_id = [player,20,true,getPosATL player] call player_alertZombies;

sleep 0.5;

0.1 fadeSound 0;
 
player setVariable ["NORRN_unconscious", false, true];
player setVariable ["unconsciousTime", 0, true];
player setVariable ["USEC_isCardiac",false,true];
player setVariable ["medForceUpdate",true,true];
player setVariable ["startcombattimer", 0];
r_player_unconscious = false;
r_player_cardiac = false;
if (Rangenveh > 0) then {
Rangenveh = 0;
    VEHSAFE setVariable["Rangenveh",0,true];
};

_array = _this;
if (count _array > 0) then {
_source = _array select 0;
_method = _array select 1;
if ((!isNull _source) && (_source != player)) then {
_humanity = 0;
_wait = 0.1;
_DeadBandit = false;
_KillerBandit = false;
_Deadherou = false;
_Dead_kepka = false;
_Killerherou = false;
_Killer_kepka = false;
_DeadHumanity = player getVariable["humanity",0];
if (_DeadHumanity <= -2500) then {_DeadBandit = true;};
if (_DeadHumanity >= 3000) then {_Deadherou = true;};
if ((!_DeadBandit) && (!_Deadherou)) then {_Dead_kepka = true;};

_KillerHumanity = _source getVariable["humanity",0];
if (_KillerHumanity <= -2500) then {_KillerBandit = true;};
if (_KillerHumanity >= 3000) then {_Killerherou = true;};
if ((!_KillerBandit) && (!_Killerherou)) then {_Killer_kepka = true;};

if (_DeadBandit) then
{
_kills = _source getVariable ["banditKills",0];
_source setVariable ["banditKills",(_kills + 1),true];
}
else
{
_kills = _source getVariable ["humanKills",0];
_source setVariable ["humanKills",(_kills + 1),true];
};


if (_Deadherou) then { //убили героя
// убийца герой
if (_Killerherou) then {
             _humanity = -4000;
_i = -((_DeadHumanity / 1000) * 1.6);
_humanity = round(_humanity + _i);
};

// убийца бандит
    if (_KillerBandit) then {
            _humanity = -3000;
};

// убийца кепка
    if (_Killer_kepka) then {
            _humanity = -3500;
_i = -((_DeadHumanity / 1000) * 1.6);
_humanity = round(_humanity + _i);
};

};

if (_DeadBandit) then { //убили бандита
// убийца герой
if (_Killerherou) then {
             _humanity = 400;
_i = -((_DeadHumanity / 1000) * 1.6);
_humanity = round(_humanity + _i);
};
// убийца бандит
if (_KillerBandit) then {
            _humanity = 600;
_i = -((_DeadHumanity / 1000) * 1.2);
_humanity = round(_humanity + _i);
};
// убийца кепка
if (_Killer_kepka) then {
            _humanity = 500;
_i = -((_DeadHumanity / 1000) * 1.6);
_humanity = round(_humanity + _i);
};
};

if (_Dead_kepka) then { //убили кепку
// убийца герой
if (_Killerherou) then {
             _humanity = -3000;

};
// убийца бандит
if (_KillerBandit) then {
            _humanity = -2000;

};
// убийца кепка
if (_Killer_kepka) then {
            _humanity = -2500;

};
};

PVDZE_send = [_source,"Humanity",[_source,_humanity,_wait]];
publicVariableServer "PVDZE_send";



};
_body setVariable ["deathType",_method,true];
};

terminate dayz_musicH;
terminate dayz_slowCheck;
terminate dayz_animalCheck;
terminate dayz_monitor1;
terminate dayz_medicalH;
terminate dayz_gui;

r_player_dead = true;

//Player is Dead!
3 fadeSound 0;
sleep 1;

dayz_originalPlayer enableSimulation true;

addSwitchableUnit dayz_originalPlayer;
setPlayable dayz_originalPlayer;
selectPlayer dayz_originalPlayer;

//deleteGroup _myGroup;
1 cutRsc ["default", "PLAIN",3];
2 cutRsc ["default", "PLAIN",3];
3 cutRsc ["default", "PLAIN",3];
4 cutRsc ["default", "PLAIN",3];

_body setVariable["combattimeout", 0, true];

//["dayzFlies",player] call broadcastRpcCallAll;
sleep 2;

//1 cutRsc ["DeathScr","BLACK OUT",3];

playMusic "dayz_track_death_1";

"colorCorrections" ppEffectEnable true;"colorCorrections" ppEffectAdjust [1, 1, 0, [1, 1, 1, 0.0], [1, 1, 1, 0.1],  [1, 1, 1, 0.0]];
"colorCorrections" ppEffectCommit 0;
"dynamicBlur" ppEffectEnable true;
"dynamicBlur" ppEffectAdjust [2];
"dynamicBlur" ppEffectCommit 0; "colorCorrections" ppEffectEnable true;"colorCorrections" ppEffectAdjust [1, 1, 0, [1, 1, 1, 0.0], [1, 1, 1, 0.1],  [1, 1, 1, 0.0]];
"colorCorrections" ppEffectCommit 0;
"dynamicBlur" ppEffectEnable true;
"dynamicBlur" ppEffectAdjust [2];
"dynamicBlur" ppEffectCommit 0;
_listsT = [
"Name Server" //Текст внизу экрана
];
_memberFunction = _listsT call BIS_fnc_selectRandom;

_finalText = format ["<t color='#999999'  size='0.9' align='center'>%1</t>", _memberFunction];
[_finalText, 0,(safezoneY + safezoneH * 0.75), 20, 0, 0, 31] spawn BIS_fnc_dynamicText;

_finalText2 ="<t size='2.2' color='#FF0000'>Вы мертвы</t>"; //Текст в центре экрана
[_finalText2,0,(safezoneY + safezoneH * 0.43),5,1,0,32] spawn BIS_fnc_dynamicText;

_finalText3 = "<t size='1.5' font='TahomaB' color='#FFFFFF'>vk.com/groupname</t>"; //Текст сверху экрана
[_finalText3,0,(safezoneY + safezoneH * 0.05),300,1,0,33] spawn BIS_fnc_dynamicText;

for  "_x" from 16 to 1 step -1 do {
_finalText4 = format["<t size='0.8' color='#FFFFFF'>Выход через %1 сек.</t>",_x];
[_finalText4,0,(safezoneY + safezoneH * 0.9),3,0,0,34] spawn BIS_fnc_dynamicText;
sleep 1;
};

PVDZE_Server_Simulation = [_body, false];
publicVariableServer "PVDZE_Server_Simulation";

endMission "END1";
« Последнее редактирование: Января 31, 2016, 11:58:35 am от ReloadeD »