Jump to content

Hooty

Member
  • Posts

    432
  • Joined

  • Last visited

  • Days Won

    4

Posts posted by Hooty

  1. 1 minute ago, DieTanx said:

    Awesome!

     

    Have you had issues with dead bodies clean up to quick before players collect gear again?

    Yes I did I increased the timer on the cleans. From 120 = 2 mins to 300 = 5 mins. Not a problem since. I think 5 mins is plenty of time to get back to your dead body. I also have a lot of spawn selects to get there faster as well. 

  2. On 3/23/2017 at 7:28 AM, juandayz said:

    @theduke  whats about if u add the hooker ... pay sex with drugs

    hookers.sqf (mpmissions\your instance\hookers\ )

      Reveal hidden contents

    private [ "_camera", "_Message", "_camDistance","_hasitem"];
    _Message = format["Wow this lady is fking awesome! %1,",format["%1", name player]];
    _camDistance = 60;

    _hasitem = "ItemKiloHemp" in magazines player;
     
      if (!_hasitem) exitWith {cutText [format["first give me something to smoke"], "PLAIN DOWN"];};

       showCinemaBorder true;
       camUseNVG false;               
       _camera = "camera" camCreate [(position player select 0)-2, position player select 1,(position player select 2)+_camDistance];
       _camera cameraEffect ["internal","back"];
       
       _camera camSetFOV 2.000;
       _camera camCommit 0;
       waitUntil {camCommitted _camera};
       playsound "sex";
     
       _camera camSetTarget vehicle player;
       _camera camSetRelPos [0,0,2];
       _camera camCommit 12;
     
       cutText [_Message, "PLAIN DOWN"];

       waitUntil {camCommitted _camera};
     
      _camera cameraEffect ["terminate","back"];
      camDestroy _camera;

    sex.ogg (sound)  (same location)

    http://www.mediafire.com/file/rr9kio9q9lwkiop/sex.ogg

    into description.ext

      Hide contents

    Find:

    
    
    aiKills = 1;
    diagRadio = 1;
    diagHit = 1;

    below paste:
     

    
    
    class CfgSounds
    {
    hookers[] =
        {
        sex
        };
        class sex
        {
        name="sex";
        sound[]={hookers\sex.ogg,0.9,1};
        titles[] = {};
        };       
    };

     

    in a custom fn_selfactions.. and very bottom

      Hide contents

    /////////////sex//
    private["_playerPos","_neartrader"];

    _playerPos = getPosATL player;
    _neartrader = count nearestObjects [_playerPos, ["Hooker1"], 3] > 0;
     
    if (_neartrader) then {
            if (s_player_sex2 < 0) then {
                s_player_sex2 = player addaction[("<t color=""#F7D708"">" + ("Sex for Drugs") +"</t>"),"hookers\hooker.sqf"];
            };
        } else {
            player removeAction s_player_sex2;
            s_player_sex2 = -1;
        };

    Now add the Ai "Hooker1" in somewhere on the map

    for example in stary

    
    ["Hooker1", [6293.7876, 7837.8843, 3.0517578e-005],0],

     

    Oh snap i did not see this. I have all the hookers on my server 1-4 as risky traders no safezones this is getting aded now thanks. lol

  3. 1 hour ago, juandayz said:

    @Voltan @gernika  for release zeds from vehicles you can test it plepase?

    create detachzed_veh.sqf

      Hide contents
    
    
    private ["_zbody","_ppos","_zombies","_zombie","_random"];
    
    
    //player addMagazine "equip_rope";
    
    area = 2;
    _ppos = getPos player;
    _zombies = _ppos nearEntities ["zZombie_Base",area];
    _count = count _zombies;
     
    for "_i" from 0 to (_count -1) do {
                _zombie = _zombies select _i;			
                 detach _zombie;
    			_random = round(random(3));
    		switch (_random) do { 
    		case 0 :{
           	_zombie setpos [(_ppos select 0) + 2, (_ppos select 1)+2,0];
            };
            case 1 :{
            _zombie setpos [(_ppos select 0) + 1, (_ppos select 1)+2,0];
            };
            case 2 :{
            _zombie setpos [(_ppos select 0) + 2, (_ppos select 1)+1,0]; 
            };
            case 3 :{
            _zombie setpos [(_ppos select 0) + 3, (_ppos select 1)+1,0];   
            };
            case 4 :{
             _zombie setpos [(_ppos select 0) + 1, (_ppos select 1)+3,0]; 
            };
    		};
    			
    			_zombie setVariable["zattached",false,false]; 
    			systemChat("Zed release");           
            };

     

    fn_selfactin.sqf

      Hide contents

    find:

    
    
    if (_canPickLight && !dayz_hasLight && !_isPZombie) then {
    	if (s_player_grabflare < 0) then {
    		_text = getText (configFile >> "CfgAmmo" >> (typeOf _nearLight) >> "displayName");
    		s_player_grabflare = player addAction [format[localize "str_actions_medical_15",_text], "\z\addons\dayz_code\actions\flare_pickup.sqf",_nearLight, 1, false, true];
    		s_player_removeflare = player addAction [format[localize "str_actions_medical_17",_text], "\z\addons\dayz_code\actions\flare_remove.sqf",_nearLight, 1, false, true];
    	};
    } else {
    	player removeAction s_player_grabflare;
    	player removeAction s_player_removeflare;
    	s_player_grabflare = -1;
    	s_player_removeflare = -1;
    };

    below paste:

    
    
    _allowedVehiclesA = typeOf _vehicle in[
    "hilux1_civil_3_open_DZE",
    "datsun1_civil_3_open_DZE",
    "hilux1_civil_1_open_DZE",
    "datsun1_civil_1_open_DZE",
    "V3S_Open_TK_CIV_EP1",
    "V3S_Open_TK_EP1",
    "KamazOpen_DZE"
    ];
    
    
    if (_inVehicle and _allowedVehiclesA and (driver _vehicle == player)) then {
            dayz_addrelease = _vehicle;
        if (s_player_zedsr < 0) then {
          s_player_zedsr = dayz_addrelease addaction[("<t color=""#F7D708"">" + ("Release Zeds") +"</t>"),"attachzeds\detachzed_veh.sqf"]; 
            };
        } else {
            dayz_addrelease removeAction s_player_zedsr;
            s_player_zedsr = -1;
    
        };

     

     

    Idk if anyone tested this yet. I not i will tomorrow. How fun would it be to drop zed heads from a heli onto players lol

  4. This is what i did xD

    Spoiler

    _allowedVehicles = [
        "2s6m_tunguska",
        "aav",
        "armoredsuv_pmc",
        "ArmoredSUV_PMC_DZE3", 
        "armoredsuv_pmc_dze",
        "atv_cz_ep1",
        "atv_us_ep1",
        "av8b",
        "av8b2",
        "baf_atv_d",
        "baf_atv_w",
        "baf_fv510_d",
        "baf_fv510_w",
        "baf_jackal2_gmg_d",
        "baf_jackal2_gmg_w",
        "baf_jackal2_l2a1_d",
        "baf_jackal2_l2a1_w",
        "baf_merlin_dze",
        "baf_offroad_d",
        "baf_offroad_w",
        "bmp2_ambul_cdf",
        "bmp2_ambul_ins",
        "bmp2_cdf",
        "bmp2_gue",
        "bmp2_hq_cdf",
        "bmp2_hq_ins",
        "bmp2_hq_tk_ep1",
        "bmp2_ins",
        "bmp2_tk_ep1",
        "bmp2_un_ep1",
        "bmp3",
        "brdm2_atgm_cdf",
        "brdm2_atgm_ins",
        "brdm2_atgm_tk_ep1",
        "brdm2_atgm_tk_gue_ep1",
        "brdm2_cdf",
        "brdm2_gue",
        "brdm2_hq_gue",
        "brdm2_hq_tk_gue_ep1",
        "brdm2_ins",
        "brdm2_tk_ep1",
        "brdm2_tk_gue_ep1",
        "btr40_mg_tk_gue_ep1",
        "btr40_mg_tk_ins_ep1",
        "btr40_tk_gue_ep1",
        "btr40_tk_ins_ep1",
        "btr60_tk_ep1",
        "btr90",
        "btr90_hq",
        "car_hatchback",
        "car_sedan",
        "chukar",
        "chukar_ep1",
        "datsun1_civil_1_open_DZE",
        "datsun1_civil_2_covered_DZE",
        "datsun1_civil_3_open_DZE",
        "fishing_boat",
        "gaz_vodnik",
        "gaz_vodnik_dz",
        "gaz_vodnik_dz_lm",
        "gaz_vodnik_dz_vlm",
        "gaz_vodnik_dze",
        "gaz_vodnik_hmg",
        "gaz_vodnik_medevac",
        "glt_m300_lt",
        "glt_m300_st",
        "gnt_c185",
        "gnt_c185c",
        "gnt_c185e",
        "gnt_c185f",
        "gnt_c185r",
        "gnt_c185t",
        "gnt_c185u",
        "grad_cdf",
        "grad_ins",
        "grad_ru",
        "grad_tk_ep1",
        "hilux1_civil_1_open_DZE",
        "hilux1_civil_2_covered_DZE",
        "hilux1_civil_3_open_DZE",
        "hilux1_civil_3_open_ep1",
        "hmmwv",
        "hmmwv_ambulance",
        "hmmwv_ambulance_cz_des_ep1",
        "hmmwv_ambulance_des_ep1",
        "hmmwv_armored",
        "hmmwv_avenger",
        "hmmwv_avenger_des_ep1",
        "hmmwv_des_ep1",
        "hmmwv_dz",
        "hmmwv_m1035_des_ep1",
        "hmmwv_m1151_m2_cz_des_ep1",
        "hmmwv_m1151_m2_cz_des_ep1_dz",
        "hmmwv_m1151_m2_cz_des_ep1_dze",
        "hmmwv_m1151_m2_des_ep1",
        "hmmwv_m2",
        "hmmwv_m998_crows_m2_des_ep1",
        "hmmwv_m998_crows_mk19_des_ep1",
        "hmmwv_m998a2_sov_des_ep1",
        "hmmwv_m998a2_sov_des_ep1_dz",
        "hmmwv_m998a2_sov_des_ep1_dze",
        "hmmwv_mk19",
        "hmmwv_mk19_des_ep1",
        "hmmwv_terminal_ep1",
        "hmmwv_tow",
        "hmmwv_tow_des_ep1",
        "ikarus",
        "ikarus_tk_civ_ep1",
        "jetskiyanahui_blue",
        "jetskiyanahui_green",
        "jetskiyanahui_red",
        "jetskiyanahui_yellow",
        "Kamaz_DZE",
        "kamazopen",
        "kamazreammo",
        "kamazrefuel",
        "kamazrefuel_dz",
        "kamazrepair",
        "lada1",
        "lada1_gdr",
        "lada1_tk_civ_ep1",
        "lada2",
        "lada2_gdr",
        "lada2_tk_civ_ep1",
        "lada4_gdr",
        "lada5_gdr",
        "lada_base",
        "ladalm",
        "landrover_cz_ep1",
        "landrover_mg_tk_ep1",
        "landrover_mg_tk_ep1_dz",
        "landrover_mg_tk_ep1_dze",
        "landrover_mg_tk_ins_ep1",
        "landrover_special_cz_ep1",
        "landrover_special_cz_ep1_dz",
        "landrover_special_cz_ep1_dze",
        "landrover_spg9_tk_ep1",
        "landrover_spg9_tk_ins_ep1",
        "landrover_tk_civ_ep1",
        "lav25",
        "lav25_hq",
        "m1030",
        "m1030_us_des_ep1",
        "m1126_icv_m2_ep1",
        "m1126_icv_mk19_ep1",
        "m1128_mgs_ep1",
        "m1129_mc_ep1",
        "m1130_cv_ep1",
        "m1133_mev_ep1",
        "m1135_atgmv_ep1",
        "m113_tk_ep1",
        "m113_un_ep1",
        "m113ambul_tk_ep1",
        "m113ambul_tk_ep1_dz",
        "m113ambul_un_ep1",
        "m113ambul_un_ep1_dz",
        "m1a1",
        "m1a1_us_des_ep1",
        "m1a2_tusk_mg",
        "m1a2_us_tusk_mg_ep1",
        "m2a2_ep1",
        "m2a3_ep1",
        "m6_ep1",
        "maz_543_scud_tk_ep1",
        "mlrs",
        "mlrs_des_ep1",
        "mmt_civ",
        "mmt_usmc",
        "mq9predatorb_us_ep1",
        "mtvr",
        "mtvr_des_ep1",
        "mtvrreammo",
        "mtvrreammo_des_ep1",
        "mtvrrefuel",
        "mtvrrefuel_des_ep1",
        "mtvrrefuel_des_ep1_dz",
        "mtvrrepair",
        "mtvrrepair_des_ep1",
        "mtvrsalvage_des_ep1",
        "mtvrsupply_des_ep1",
        "offroad_dshkm_gue",
        "offroad_dshkm_gue_dz",
        "offroad_dshkm_gue_dze",
        "offroad_dshkm_gue_dze1",
        "offroad_dshkm_gue_dze2",
        "offroad_dshkm_gue_dze3",
        "offroad_dshkm_gue_dze4",
        "offroad_dshkm_ins",
        "offroad_dshkm_tk_gue_ep1",
        "offroad_spg9_gue",
        "offroad_spg9_tk_gue_ep1",
        "old_bike_tk_civ_ep1",
        "old_bike_tk_ins_ep1",
        "old_moto_tk_civ_ep1",
        "papercar",
        "pbx",
        "pchela1t",
        "pickup_pk_gue",
        "pickup_pk_gue_dz",
        "pickup_pk_gue_dze",
        "pickup_pk_ins",
        "pickup_pk_ins_dz",
        "pickup_pk_ins_dze",
        "pickup_pk_tk_gue_ep1",
        "pickup_pk_tk_gue_ep1_dz",
        "pickup_pk_tk_gue_ep1_dze",
        "policecar",
        "rhib",
        "rhib2turret",
        "s1203_ambulance_ep1",
        "s1203_tk_civ_ep1",
        "seafox",
        "seafox_ep1",
        "skoda",
        "skodablue",
        "skodagreen",
        "skodared",
        "smallboat_1",
        "smallboat_2",
        "suv_blue",
        "suv_camo",
        "suv_charcoal",
        "suv_dz",
        "suv_green",
        "suv_orange",
        "suv_pink",
        "suv_pmc",
        "suv_pmc_baf",
        "suv_red",
        "suv_silver",
        "suv_tk_civ_ep1",
        "suv_tk_ep1",
        "suv_un_ep1",
        "suv_white",
        "suv_yellow",
        "t34",
        "t34_tk_ep1",
        "t34_tk_gue_ep1",
        "t55_tk_ep1",
        "t55_tk_gue_ep1",
        "t72_cdf",
        "t72_gue",
        "t72_ins",
        "t72_ru",
        "t72_tk_ep1",
        "t90",
        "towingtractor",
        "tractor",
        "tractorold",
        "tt650_civ",
        "tt650_gue",
        "tt650_ins",
        "tt650_tk_civ_ep1",
        "tt650_tk_ep1",
        "uaz_ags30_cdf",
        "uaz_ags30_ins",
        "uaz_ags30_ru",
        "uaz_ags30_tk_ep1",
        "uaz_cdf",
        "uaz_ins",
        "uaz_mg_cdf",
        "uaz_mg_cdf",
        "uaz_mg_cdf_dz_lm",
        "uaz_mg_cdf_dz_vlm",
        "uaz_mg_ins",
        "uaz_mg_ins_dz_lm",
        "uaz_mg_ins_dz_vlm",
        "uaz_mg_tk_ep1",
        "uaz_mg_tk_ep1_dz",
        "uaz_mg_tk_ep1_dze",
        "uaz_ru",
        "uaz_spg9_ins",
        "uaz_unarmed_tk_civ_ep1",
        "uaz_unarmed_tk_ep1",
        "uaz_unarmed_un_ep1",
        "ural_cdf",
        "ural_ins",
        "ural_tk_civ_ep1",
        "ural_un_ep1",
        "ural_zu23_cdf",
        "ural_zu23_gue",
        "ural_zu23_ins",
        "ural_zu23_tk_ep1",
        "ural_zu23_tk_gue_ep1",
        "uralcivil",
        "uralcivil2",
        "uralopen_cdf",
        "uralopen_ins",
        "uralreammo_cdf",
        "uralreammo_ins",
        "uralreammo_tk_ep1",
        "uralrefuel_cdf",
        "uralrefuel_ins",
        "uralrefuel_tk_ep1",
        "uralrefuel_tk_ep1_dz",
        "uralrepair_cdf",
        "uralrepair_ins",
        "uralrepair_tk_ep1",
        "uralsalvage_tk_ep1",
        "uralsupply_tk_ep1",
        "v3s_civ",
        "v3s_gue",
        "v3s_open_tk_civ_ep1",
        "v3s_open_tk_ep1",
        "v3s_reammo_tk_gue_ep1",
        "v3s_refuel_tk_gue_ep1",
        "v3s_refuel_tk_gue_ep1_dz",
        "v3s_repair_tk_gue_ep1",
        "v3s_salvage_tk_gue_ep1",
        "v3s_supply_tk_gue_ep1",
        "v3s_tk_ep1",
        "v3s_tk_gue_ep1",
        "volha_1_tk_civ_ep1",
        "volha_2_tk_civ_ep1",
        "volhalimo_tk_civ_ep1",
        "vwgolf",
        "warfarereammotruck_cdf",
        "warfarereammotruck_gue",
        "warfarereammotruck_ins",
        "warfarereammotruck_ru",
        "warfarereammotruck_usmc",
        "warfarerepairtruck_gue",
        "warfaresalvagetruck_cdf",
        "warfaresalvagetruck_gue",
        "warfaresalvagetruck_ins",
        "warfaresalvagetruck_ru",
        "warfaresalvagetruck_usmc",
        "warfaresupplytruck_cdf",
        "warfaresupplytruck_gue",
        "warfaresupplytruck_ins",
        "warfaresupplytruck_ru",
        "warfaresupplytruck_usmc",
        "zodiac",
        "zsu_cdf",
        "zsu_ins",
        "zsu_tk_ep1",
        "a10",
        "a10_us_ep1",
        "ah64d_ep1",
        "AH1Z",
        "AH64D_Sidewinders",
        "AW159_Lynx_BAF",
        "ah6j_ep1",
        "ah6x_dz",
        "an2_1_tk_civ_ep1",
        "an2_2_tk_civ_ep1",
        "an2_dz",
        "an2_tk_ep1",
        "baf_merlin_dze",
        "BAF_Apache_AH1_D",
        "c130j",
        "c130j_us_ep1",
        "c130j_us_ep1_dz",
        "ch53_dze",
        "ch_47f_baf",
        "ch_47f_ep1",
        "ch_47f_ep1_dz",
        "ch_47f_ep1_dze",
        "csj_gyroc",
        "csj_gyrocover",
        "csj_gyrop",
        "f35b",
        "Ka52Black",
        "l39_tk_ep1",
        "m6_ep1",
        "mh6j_dz",
        "mi17_civilian_dz",
        "mi17_dze",
        "mq9predatorb_us_ep1",
        "mv22_dz",
        "su25_cdf",
        "su25_ins",
        "su25_tk_ep1",
        "su34",
        "su39",
        "uh1h_dze",
        "uh1h_tk_ep1",
        "uh1y",
        "uh1y_dze",
        "Mi171Sh_rockets_CZ_EP1",
        "uh60m_ep1_dze"
    ];

     

  5. 5 hours ago, EditedSnowHD said:

    I have it placed in my @Dayz_Epoch_Server .pbo

    path in the pbo: \z\addons\dayz_server\mapaddons - here i placed the NorthWestAirfield.sqf file

    Ok so at the bottom of your server_functions.sqf add 

    execVM"z\addons\dayz_server\mapaddons\NorthWestAirfield.sqf";

    should work just fine .

     

    Heres what mine looks like for an example.

    Spoiler

    // Precise base building 1.0.5
    call compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\kk_functions.sqf";
    #include "spawn_config.sqf"
    [] execVM "\z\addons\dayz_server\a2_infiSTAR\AH.sqf";
    execVM"z\addons\dayz_server\map\afterwipe.sqf";
    execVM"z\addons\dayz_server\map\Chernarus.sqf";
    execVM"z\addons\dayz_server\map\safezone.sqf";
    "CD_LOG" addPublicVariableEventHandler {(_this select 1) call fnc_Log;};
    [] execVM "\z\addons\dayz_server\init\yRunCleanup.sqf"

     

  6. On 4/30/2017 at 0:18 PM, DAmNRelentless said:

    I would be careful with deleting dead so fast. I hear the humanity is stored on it until the player respawns. And some players are leaving when they day and don't create a new character.

    Just deletes the dead body not anything to do with database.

  7. I have plenty of sql events working but need something instant I have it working now thanks to a friend of mine. 

    Here it is I call it yRunCleanup.sqf change to whatever you like

    Spoiler

    YRUNpurge = {
        if(!isNull(_this)) then {
            _this enableSimulation false;
            _this removeAllMPEventHandlers "mpkilled";
            _this removeAllMPEventHandlers "mphit";
            _this removeAllMPEventHandlers "mprespawn";
            _this removeAllEventHandlers "FiredNear";
            _this removeAllEventHandlers "HandleDamage";
            _this removeAllEventHandlers "Killed";
            _this removeAllEventHandlers "Fired";
            _this removeAllEventHandlers "GetOut";
            _this removeAllEventHandlers "GetIn";
            _this removeAllEventHandlers "Local";
            clearVehicleInit _this;
            deleteVehicle _this;
            deleteGroup (group _this);
            _this = nil;
        };
    };
     
    objectDelete = {
     
        _objectID     = _this getVariable ['ObjectID','0'];
        _objectUID     = _this getVariable ['ObjectUID','0'];
        if (isNil '_objectID') exitWith {};
        if (isNil '_objectUID') exitWith {};
     
     
        [_objectID,_objectUID,player] call server_deleteObj;
     
     
        if !(isNull _this) then {deleteVehicle _this};
     
    };
     
     
    if (isServer) then {
        [] spawn {
            private["_lastbikeClean","_lastLootClean","_lastZombieClean","_lastGroupClean","_lastSeagullClean","_countCleaned","_countTotal","_lootPiles","_seagulls","_zombies","_nearby","_pos","_keep","_ammobox","_lastvehiclecleanup","_lastservercleancheck"];
            waitUntil {!(isNil "sm_done");};
            diag_log text "CLEANUP: Initialized...";
     
            _lastZombieClean = diag_tickTime;
            _lastGroupClean = diag_tickTime;
            _lastSeagullClean = diag_tickTime;
            _lastvehiclecleanup = diag_tickTime;
            _lastservercleancheck = diag_tickTime;
            _lastbikeClean = diag_tickTime;
     
            while {true} do {
           
                if ((diag_tickTime - _lastbikeClean) > 120) then {
                    _lastbikeClean = diag_tickTime;
                    _bikes = entities 'MMT_Civ';
                    _deleted = 0;
                    {
                        _obj = _x;
                        if(!isNull _obj)then
                        {
                            _count = {isPlayer _x} count (_obj nearEntities 100);
                            if(_count == 0)then
                            {
                                _deleted = _deleted + 1;deleteVehicle _obj;
                            };
                        };
                    } forEach _bikes;
                };
           
                if ((diag_tickTime - _lastZombieClean) > 120) then {
                    _lastZombieClean = diag_tickTime;
                    _zombies = entities "zZombie_Base";
                    _countTotal = count _zombies;
                    _countCleaned = 0;
                    {
                        if(!(isNull _x)) then {
                            if (local _x) then {
                                _x call YRUNpurge;
                                _countCleaned = _countCleaned + 1;
                            } else {
                                if (!alive _x) then {
                                    _pos = getPosATL _x;
                                    if (count _pos > 0) then {
                                        _nearby = {(isPlayer _x) and (alive _x)} count (_pos nearEntities [["CAManBase","AllVehicles"], 130]);
                                        if (_nearby==0) then {
                                            _x call YRUNpurge;
                                            _countCleaned = _countCleaned + 1;
                                        };
                                    };
                                };
                            };
                        };
                        sleep 0.001;
                    } forEach _zombies;
                };
               
                if (((diag_tickTime - _lastvehiclecleanup) > 120)) then
                {
                _lastvehiclecleanup = diag_tickTime;
                private ["_YRUNVC","_vehs","_garage"];
                    _YRUNVC = 0;
                    _vehs = [];
                    {
                        _garage = (getPosATL _x) nearObjects ["Land_sara_hasic_zbroj",7];
                        if !((count _garage) > 1) then {
                            if (((damage _x)>0.99)&&!(_x isKindOf "MAN")&&!(_x isKindOf "CAAnimalBase")&&!(_x isKindOf "zZombie_Base")&&!(_x isKindOf "static")&&!(_x isKindOf "building")) then {
                                if (typeOf _x != "SHEEP") then {
                                    _x spawn objectDelete;
                                    _YRUNVC = _YRUNVC + 1;
                                    _vehs = _vehs + [typeOf _x];
                                };
                            };
                        };
                    } forEach (vehicles);
                };
               
                if (((diag_tickTime - _lastservercleancheck) > 180)) then
                {
                _lastservercleancheck = diag_tickTime;
                private ["_itemclasses","_itemlist","_itemCount"];
                _itemclasses =
                    [
                        "GraveCrossHelmet_EP1","GraveCrossHelmet_DZ","wreck","crater","craterlong","PartWoodPile",
                        "SeaGull","Rabbit","WildBoar","Cow","Goat","Sheep","Bird","wire_cat1",
                        "CAAnimalBase","Sound_Flies"
                    ];
                    {
                        _itemlist     = allMissionObjects _x;
                        _itemCount     = (count _itemlist);
                        {
                            if ((typeOf _x != "DZ_fin")||(typeOf _x != "DZ_pastor")||(typeOf _x != "SHEEP")) then {
                                _x spawn objectDelete;
                            };
                        } forEach (allMissionObjects _x);
                    } forEach _itemclasses;
                };
     
                if ((diag_tickTime - _lastGroupClean) > 120) then {
                    _lastGroupClean = diag_tickTime;
                    _countTotal = count allGroups;
                    _countCleaned = 0;
                    {
                        if(!(isNull _x)) then {
                            if (count units _x == 0) then {
                                deleteGroup _x;
                                _x = nil;
                                _countCleaned = _countCleaned + 1;
                            };
                        };
                        sleep 0.001;
                    } forEach allGroups;
                };
     
                if ((diag_tickTime - _lastSeagullClean) > 120) then {
                    _lastSeagullClean = diag_tickTime;
                    _seagulls = entities "Seagull";
                    _countTotal = count _seagulls;
                    _countCleaned = 0;
                    {
                        _x call YRUNpurge;
                        _countCleaned = _countCleaned + 1;
                        sleep 0.001;
                    } forEach _seagulls;
                };
     
                sleep 1;
            };
        };
    };

    Call it in your dayz_sever/server_functions at the bottom like 

    Spoiler

    [] execVM "\z\addons\dayz_server\init\yRunCleanup.sqf"

    This gets rid of blown up vehicles, graves, dead bodies, etc every 120 seconds. Helps with my server fps.

  8. Very possible. I have a custom version of dzms. Hero and bandit mission. With mine fields, M2 gunners, and patrolling vehicles kinda like wai has. I did not make the custom dzms mission system only the missions i made. If i get permission from the guy that actually made the custom version ill release it. You can check out yRun to see how the custom dzms works.

  9. 17 hours ago, DieTanx said:

    Check this out

    Thanks I have all kinds of sql events running. I was talking about something like this from my 1051 server but it does not work for 1061

    cleanup.sqf

    Spoiler

    YRUNpurge = {
        if(!isNull(_this)) then {
            _this enableSimulation false;
            _this removeAllMPEventHandlers "mpkilled";
            _this removeAllMPEventHandlers "mphit";
            _this removeAllMPEventHandlers "mprespawn";
            _this removeAllEventHandlers "FiredNear";
            _this removeAllEventHandlers "HandleDamage";
            _this removeAllEventHandlers "Killed";
            _this removeAllEventHandlers "Fired";
            _this removeAllEventHandlers "GetOut";
            _this removeAllEventHandlers "GetIn";
            _this removeAllEventHandlers "Local";
            clearVehicleInit _this;
            deleteVehicle _this;
            deleteGroup (group _this);
            _this = nil;
        };
    };

    objectDelete = {
        _objectID     = _this getVariable ['ObjectID','0'];
        _objectUID     = _this getVariable ['ObjectUID','0'];
        if (isNil '_objectID') exitWith {};
        if (isNil '_objectUID') exitWith {};
        PVDZE_obj_Delete = [_objectID,_objectUID,player];
        publicVariableServer 'PVDZE_obj_Delete';
        if !(isNull _this) then {deleteVehicle _this};
    };

    if (isServer) then {
        [] spawn {
            private["_lastbikeClean","_lastLootClean","_lastZombieClean","_lastGroupClean","_lastSeagullClean","_countCleaned","_countTotal","_lootPiles","_seagulls","_zombies","_nearby","_pos","_keep","_ammobox","_lastvehiclecleanup","_lastservercleancheck"];
            waitUntil {!(isNil "sm_done");};
            diag_log text "CLEANUP: Initialized...";

            _lastZombieClean = diag_tickTime;
            _lastGroupClean = diag_tickTime;
            _lastSeagullClean = diag_tickTime;
            _lastvehiclecleanup = diag_tickTime;
            _lastservercleancheck = diag_tickTime;
            _lastbikeClean = diag_tickTime;

            while {true} do {
            
                if ((diag_tickTime - _lastbikeClean) > 120) then {
                    _lastbikeClean = diag_tickTime;
                    _bikes = entities 'MMT_Civ';
                    _deleted = 0;
                    {
                        _obj = _x;
                        if(!isNull _obj)then
                        {
                            _count = {isPlayer _x} count (_obj nearEntities 100);
                            if(_count == 0)then
                            {
                                _deleted = _deleted + 1;deleteVehicle _obj;
                            };
                        };
                    } forEach _bikes;
                };
            
                if ((diag_tickTime - _lastZombieClean) > 120) then {
                    _lastZombieClean = diag_tickTime;
                    _zombies = entities "zZombie_Base";
                    _countTotal = count _zombies;
                    _countCleaned = 0;
                    {
                        if(!(isNull _x)) then {
                            if (local _x) then {
                                _x call YRUNpurge;
                                _countCleaned = _countCleaned + 1;
                            } else {
                                if (!alive _x) then {
                                    _pos = getPosATL _x;
                                    if (count _pos > 0) then {
                                        _nearby = {(isPlayer _x) and (alive _x)} count (_pos nearEntities [["CAManBase","AllVehicles"], 130]);
                                        if (_nearby==0) then {
                                            _x call YRUNpurge;
                                            _countCleaned = _countCleaned + 1;
                                        };
                                    };
                                };
                            };
                        };
                        sleep 0.001;
                    } forEach _zombies;
                };
                
                if (((diag_tickTime - _lastvehiclecleanup) > 120)) then
                {
                _lastvehiclecleanup = diag_tickTime;
                private ["_YRUNVC","_vehs","_garage"];
                    _YRUNVC = 0;
                    _vehs = [];
                    {
                        _garage = (getPosATL _x) nearObjects ["Land_sara_hasic_zbroj",7];
                        if !((count _garage) > 1) then {
                            if (((damage _x)>0.99)&&!(_x isKindOf "MAN")&&!(_x isKindOf "CAAnimalBase")&&!(_x isKindOf "zZombie_Base")&&!(_x isKindOf "static")&&!(_x isKindOf "building")) then {
                                if (typeOf _x != "SHEEP") then {
                                    _x spawn objectDelete;
                                    _YRUNVC = _YRUNVC + 1;
                                    _vehs = _vehs + [typeOf _x];
                                };
                            };
                        };
                    } forEach (vehicles);
                };
                
                if (((diag_tickTime - _lastservercleancheck) > 180)) then
                {
                _lastservercleancheck = diag_tickTime;
                private ["_itemclasses","_itemlist","_itemCount"];
                _itemclasses =
                    [
                        "GraveCrossHelmet_EP1","GraveCrossHelmet_DZ","wreck","crater","craterlong","PartWoodPile",
                        "SeaGull","Rabbit","WildBoar","Cow","Goat","Sheep","Bird","wire_cat1",
                        "CAAnimalBase","Sound_Flies"
                    ];
                    {
                        _itemlist     = allMissionObjects _x;
                        _itemCount     = (count _itemlist);
                        {
                            if ((typeOf _x != "DZ_fin")||(typeOf _x != "DZ_pastor")||(typeOf _x != "SHEEP")) then {
                                _x spawn objectDelete;
                            };
                        } forEach (allMissionObjects _x);
                    } forEach _itemclasses;
                };

                if ((diag_tickTime - _lastGroupClean) > 120) then {
                    _lastGroupClean = diag_tickTime;
                    _countTotal = count allGroups;
                    _countCleaned = 0;
                    {
                        if(!(isNull _x)) then {
                            if (count units _x == 0) then {
                                deleteGroup _x;
                                _x = nil;
                                _countCleaned = _countCleaned + 1;
                            };
                        };
                        sleep 0.001;
                    } forEach allGroups;
                };

                if ((diag_tickTime - _lastSeagullClean) > 120) then {
                    _lastSeagullClean = diag_tickTime;
                    _seagulls = entities "Seagull";
                    _countTotal = count _seagulls;
                    _countCleaned = 0;
                    {
                        _x call YRUNpurge;
                        _countCleaned = _countCleaned + 1;
                        sleep 0.001;
                    } forEach _seagulls;
                };

                sleep 1;
            };
        };
    };

     

×
×
  • Create New...