Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ////////// Grave Cross v2.0 Skin Mod /////
- // Grave Cross script by feindfluglp /////
- // Take Clothes script by Zabn ///////////
- // Clothes Drop modded in by Vampire /////
- // If you reuse this script please post //
- // Credits to Zabn and feindfluglp. //////
- //////////////////////////////////////////
- private ["_display","_body","_playerID","_array","_source","_method","_canHitFree","_isBandit","_punishment","_humanityHit","_myKills","_humanity","_kills","_killsV","_myGroup"];
- disableSerialization;
- if (deathHandled) exitWith {};
- deathHandled = true;
- // #################################### grave cross script start ####################################
- // --------------------player items setparameter
- _playerWeapons = weapons _body;
- _playerMagazines = getMagazineCargo _body;
- // #################################### script ####################################
- removeAllWeapons _body;
- clearMagazineCargo _body;
- hidebody _body;
- // --------------------Create the tombstone objects.
- _graveBase = createVehicle ["GraveCrossHelmet_EP1", position _body, [], 0, "NO_COLLIDE"];
- _graveBase setPosATL position _body; // setPos again because arma.
- _graveBase setDir _playerDir;
- // --------------------Create a loot container inside the grave.
- _tempContainer = createVehicle ["weaponHolder", getPosATL _graveBase, [], 0, "can_collide"];
- _containerLoc = getPosATL _tempContainer;
- _containerLoc = [((_containerLoc select 0) + 0),((_containerLoc select 1) + 0),0];
- _tempContainer setPosATL _containerLoc;
- // #### PLAYER items to weaponholder start ####
- // player add weapons
- {
- _tempContainer addWeaponCargoGlobal [_x,1];
- } forEach _playerWeapons;
- // player add items
- {
- _tempContainer addMagazineCargoGlobal [_x,1];
- } forEach _playerMagazines;
- // #### PLAYER items to weaponholder stop ####
- // #### BACKPACK items to weaponsholder start ####
- if (!isNil "_newBackpackType") then {
- if (_newBackpackType != "") then {
- _backpackWpnTypes = [];
- _backpackWpnQtys = [];
- if (count _backpackWpn > 0) then {
- _backpackWpnTypes = _backpackWpn select 0;
- _backpackWpnQtys = _backpackWpn select 1;
- };
- _countr = 0;
- {
- _tempContainer addWeaponCargoGlobal [_x,(_backpackWpnQtys select _countr)];
- _countr = _countr + 1;
- } forEach _backpackWpnTypes;
- _backpackmagTypes = [];
- _backpackmagQtys = [];
- if (count _backpackmag > 0) then {
- _backpackmagTypes = _backpackMag select 0;
- _backpackmagQtys = _backpackMag select 1;
- };
- _countr = 0;
- {
- _tempContainer addmagazineCargoGlobal [_x,(_backpackmagQtys select _countr)];
- _countr = _countr + 1;
- } forEach _backpackmagTypes;
- };
- };
- // #### BACKPACK items to weaponsholder stop ####
- // #### BACKPACK to weaponsholder start ####
- // ### vanilla dayz ###
- _class = typeOf _backpack;
- if (_class == "CZ_VestPouch_EP1") then {createVehicle ["CZ_VestPouch_EP1", position _body, [], 2, "can_collide"];};
- _class = typeOf _backpack;
- if (_class == "DZ_Patrol_Pack_EP1") then {createVehicle ["DZ_Patrol_Pack_EP1", position _body, [], 2, "can_collide"];};
- _class = typeOf _backpack;
- if (_class == "DZ_Assault_Pack_EP1") then {createVehicle ["DZ_Assault_Pack_EP1", position _body, [], 2, "can_collide"];};
- _class = typeOf _backpack;
- if (_class == "DZ_CivilBackpack_EP1") then {createVehicle ["DZ_CivilBackpack_EP1", position _body, [], 2, "can_collide"];};
- _class = typeOf _backpack;
- if (_class == "DZ_ALICE_Pack_EP1") then {createVehicle ["DZ_ALICE_Pack_EP1", position _body, [], 2, "can_collide"];};
- _class = typeOf _backpack;
- if (_class == "DZ_Backpack_EP1") then {createVehicle ["DZ_Backpack_EP1", position _body, [], 2, "can_collide"];};
- _class = typeOf _backpack;
- if (_class == "DZ_British_ACU") then {createVehicle ["DZ_British_ACU", position _body, [], 2, "can_collide"];};
- _class = typeOf _backpack;
- if (_class == "DZ_Czech_Vest_Puch") then {createVehicle ["DZ_Czech_Vest_Puch", position _body, [], 2, "can_collide"];};
- [_graveBase, _tempContainer] spawn {
- };
- hideBody _body;
- // #################################### grave cross script stop ####################################
- //Death
- //Prevent client freezes
- _display = findDisplay 49;
- if(!isNull _display) then {_display closeDisplay 0;};
- if (dialog) then {closeDialog 0;};
- if (visibleMap) then {openMap false;};
- _body = player;
- _playerID = getPlayerUID player;
- disableUserInput true;
- //add weapon on back to player...
- if (dayz_onBack != "") then {
- _body addWeapon dayz_onBack;
- };
- //Send Death Notice
- //["PVDZ_plr_Death",[dayz_characterID,0,_body,_playerID,dayz_playerName]] call callRpcProcedure;
- PVDZ_plr_Death = [dayz_characterID,0,_body,_playerID];
- publicVariableServer "PVDZ_plr_Death";
- _id = [player,20,true,getPosATL player] call player_alertZombies;
- sleep 0.5;
- player setDamage 1;
- 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];
- //remove combat timer on death
- player setVariable ["startcombattimer", 0];
- r_player_unconscious = false;
- r_player_cardiac = false;
- _array = _this;
- if (count _array > 0) then {
- _source = _array select 0;
- _method = _array select 1;
- if ((!isNull _source) and (_source != player)) then {
- _canHitFree = player getVariable ["freeTarget",false];
- _isBandit = (player getVariable["humanity",0]) <= -2000;
- _punishment = _canHitFree or _isBandit; //if u are bandit or start first - player will not recieve humanity drop
- _humanityHit = 0;
- if (!_punishment) then {
- //i'm "not guilty" - kill me and be punished
- _myKills = ((player getVariable ["humanKills",0]) / 30) * 1000;
- _humanityHit = -(2000 - _myKills);
- _kills = _source getVariable ["humanKills",0];
- _source setVariable ["humanKills",(_kills + 1),true];
- PVDZ_send = [_source,"Humanity",[_source,_humanityHit,300]];
- publicVariableServer "PVDZ_send";
- } else {
- //i'm "guilty" - kill me as bandit
- _killsV = _source getVariable ["banditKills",0];
- _source setVariable ["banditKills",(_killsV + 1),true];
- };
- };
- _body setVariable ["deathType",_method,true];
- };
- terminate dayz_musicH;
- //terminate dayz_lootCheck;
- terminate dayz_slowCheck;
- terminate dayz_animalCheck;
- terminate dayz_monitor1;
- terminate dayz_medicalH;
- terminate dayz_gui;
- //terminate dayz_zedCheck;
- terminate dayz_locationCheck;
- //terminate dayz_combatCheck;
- //terminate dayz_spawnCheck;
- //Reset (just in case)
- //deleteVehicle dayz_playerTrigger;
- //disableUserInput false;
- r_player_dead = true;
- "dynamicBlur" ppEffectEnable true;"dynamicBlur" ppEffectAdjust [4]; "dynamicBlur" ppEffectCommit 0.2;
- "colorCorrections" ppEffectEnable true;
- "colorCorrections" ppEffectAdjust [1, 1, 0, [1, 1, 1, 0.0], [1, 1, 1, 0.01], [1, 1, 1, 0.0]];
- "colorCorrections" ppEffectCommit 1;
- //Player is Dead!
- 3 fadeSound 0;
- sleep 1;
- dayz_originalPlayer enableSimulation true;
- addSwitchableUnit dayz_originalPlayer;
- setPlayable dayz_originalPlayer;
- selectPlayer dayz_originalPlayer;
- _myGroup = group _body;
- [_body] joinSilent dayz_firstGroup;
- deleteGroup _myGroup;
- // #################################### grave cross script start ####################################
- // --------------------player items setparameter
- _playerWeapons = weapons _body;
- _playerMagazines = _magazines;
- _playerSkin = (typeOf _body);
- // ############# script ##############
- removeAllWeapons _body;
- clearMagazineCargo _body;
- hidebody _body;
- // --------------------Create a loot container inside the grave.
- _tempContainer = createVehicle ["weaponHolder", getPosATL _body, [], 0, "can_collide"];
- _containerLoc = getPosATL _tempContainer;
- _containerLoc = [((_containerLoc select 0) + 0),((_containerLoc select 1) + 0),0];
- _tempContainer setPosATL _containerLoc;
- // #### PLAYER items to weaponholder start ####
- // player add weapons
- {
- _tempContainer addWeaponCargoGlobal [_x,1];
- } forEach _playerWeapons;
- // player add items
- {
- _tempContainer addMagazineCargoGlobal [_x,1];
- } forEach _playerMagazines;
- // #### PLAYER items to weaponholder stop ####
- // #### PLAYER skin to weaponsholder start ####
- switch (_playerSkin) do {
- case "Survivor3_DZ": {
- _playerSkin = "Survivor2_DZ";
- };
- case "Bandit1_DZ": {
- _playerSkin = "Survivor2_DZ";
- };
- };
- _skinItem = "Skin_" + _playerSkin;
- _okSkin = isClass (configFile >> "CfgMagazines" >> _skinItem);
- if(_okSkin) then {
- _tempContainer addMagazineCargoGlobal [_skinItem,1];
- };
- // #### PLAYER skin to weaponsholder stop ####
- // #### BACKPACK items to weaponsholder start ####
- if (!isNil "_newBackpackType") then {
- if (_newBackpackType != "") then {
- _backpackWpnTypes = [];
- _backpackWpnQtys = [];
- if (count _backpackWpn > 0) then {
- _backpackWpnTypes = _backpackWpn select 0;
- _backpackWpnQtys = _backpackWpn select 1;
- };
- _countr = 0;
- {
- _tempContainer addWeaponCargoGlobal [_x,(_backpackWpnQtys select _countr)];
- _countr = _countr + 1;
- } forEach _backpackWpnTypes;
- _backpackmagTypes = [];
- _backpackmagQtys = [];
- if (count _backpackmag > 0) then {
- _backpackmagTypes = _backpackMag select 0;
- _backpackmagQtys = _backpackMag select 1;
- };
- _countr = 0;
- {
- _tempContainer addmagazineCargoGlobal [_x,(_backpackmagQtys select _countr)];
- _countr = _countr + 1;
- } forEach _backpackmagTypes;
- };
- };
- // #### BACKPACK items to weaponsholder stop ####
- // #### BACKPACK to weaponsholder start ####
- // help from opendayz: AlienX (simpler code)
- _allowedBackpacks = ["CZ_VestPouch_EP1", "DZ_Patrol_Pack_EP1", "DZ_Assault_Pack_EP1", "DZ_CivilBackpack_EP1",
- "DZ_ALICE_Pack_EP1", "DZ_Backpack_EP1", "DZ_British_ACU", "DZ_Czech_Vest_Puch"];
- _class = typeOf _backpack;
- if (_class in _allowedBackpacks) then { createVehicle [_class, position _body, [], 4, "can_collide"]; };
- // #### BACKPACK to weaponsholder stop ####
- // ### PERMALOOT start ###
- _tempContainer setVariable["permaLoot", true];
- // ### PERMALOOT stop ###
- // --------------------Create the tombstone objects.
- _graveBase = createVehicle ["GraveCrossHelmet_EP1", position _tempContainer, [], 0, "NO_COLLIDE"];
- _graveBase setPosATL position _tempContainer; // setPos again because arma.
- _graveBase setDir _playerDir;
- [_graveBase, _tempContainer] spawn {
- };
- hidebody _body;
- // #################################### grave cross script stop ####################################
- 3 cutRsc ["default", "PLAIN",3];
- 4 cutRsc ["default", "PLAIN",3];
- _body setVariable["combattimeout", 0, true];
- //["dayzFlies",player] call broadcastRpcCallAll;
- sleep 2;
- 1 cutRsc ["DeathScreen_DZ","BLACK OUT",3];
- playMusic "dayz_track_death_1";
- "dynamicBlur" ppEffectAdjust [0]; "dynamicBlur" ppEffectCommit 5;
- "colorCorrections" ppEffectAdjust [1, 1, 0, [1, 1, 1, 0.0], [1, 1, 1, 1], [1, 1, 1, 1]];"colorCorrections" ppEffectCommit 5;
- sleep 2;
- for "_x" from 5 to 1 step -1 do {
- titleText [format[localize "str_return_lobby", _x], "PLAIN DOWN", 1];
- sleep 1;
- };
- PVDZ_Server_Simulation = [_body, false];
- publicVariableServer "PVDZ_Server_Simulation";
- endMission "END1";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement