Jump to content

coresync

Member
  • Posts

    45
  • Joined

  • Last visited

  • Days Won

    1

Reputation Activity

  1. Like
    coresync reacted to chargedlight1 in [Released] Custom spawn loadout dependend on humanity   
    If you dont want to use: http://opendayz.net/threads/release-essv2-enhanced-spawn-selection-v2.21547/
    As you want a random spawn location for player who join your server just like me.

    One thing to notice is that i didn't test this without anti-hack. ( I've used infistar on server side with a reason. PM me if you want to know that reason and why i did it in this specific way. ) 

    Without Antihack on server side* NOT TESTED, NEED RESPONSE IF WORKS OR SOLUTION! :

    First add this in init:
    execVM "Custom\loadout.sqf";  Above:
    dayz_paraSpawn = false; // Halo spawn DZE_BackpackAntiTheft = false; // Prevent stealing from backpacks in trader zones

    in Custom\loadout.sqf:
    //change loadout on spawn, // added by: Stijnkluiters github: https://github.com/stijnkluiters // default array = [ //"ItemBandage", //"ItemBandage", //"17Rnd_9x19_glock17", //"17Rnd_9x19_glock17", //"ItemMorphine", private ["_isHero","_humanity","_isBandit"]; _humanity = player getVariable["humanity",0]; // This is where my own server failed because of my anti-hack _isBandit = _humanity < -5000; _isHero = _humanity > 5000; if (_isHero) then { //hero diag_log format["LOADOUT: Hero"]; DefaultMagazines = ["ItemMap","HandRoadFlare","ItemBandage","ItemPainkiller","8Rnd_9x18_Makarov","8Rnd_9x18_Makarov"]; DefaultWeapons = ["Makarov_DZ","ItemFlashlight"]; DefaultBackpack = "DZ_Patrol_Pack_EP1"; DefaultBackpackItems = []; // Can include both weapons and magazines i.e. ["PDW_DZ","30Rnd_9x19_UZI"]; }; if (_isBandit) then { //bndit diag_log format["LOADOUT: Bandit"]; DefaultMagazines = ["ItemMap","HandRoadFlare","ItemBandage","ItemPainkiller","8Rnd_9x18_Makarov","8Rnd_9x18_Makarov"]; DefaultWeapons = ["Makarov_DZ","ItemFlashlight"]; DefaultBackpack = "DZ_Patrol_Pack_EP1"; DefaultBackpackItems = []; // Can include both weapons and magazines i.e. ["PDW_DZ","30Rnd_9x19_UZI"]; }; With Antihack on server side* TESTED, WORKS! :

    Go to /z/addons/dayz_server/compile/server_playerLogin.sqf

    And add:
    "_primcharvar", "_humanity" // Line 1 in code. to private[];
    after doing so.

    Add this:
     
    //Do Connection Attempt // humanity _doLoop = 0; while {_doLoop < 5} do { _key = format["CHILD:102:%1:",_charID]; _primcharvar = _key call server_hiveReadWrite; if (count _primcharvar > 0) then { if ((_primcharvar select 0) != "ERROR") then { _doLoop = 9; }; }; _doLoop = _doLoop + 1; }; _humanity = _primcharvar select 5; after:
     
    //Process request _newPlayer = _primary select 1; _isNew = count _primary < 10; //_result select 1; _charID = _primary select 2; // NEW CODE HERE!
    find: PVCDZ_plr_Login

    add this under that.
     
    /* Humanity */ Humanity = _humanity; (owner _playerObj) publicVariableClient "Humanity"; Go to: 
    Init.sqf

    Add: execVM "Custom\loadout.sqf"; 

    above:

    dayz_paraSpawn = false; // Halo spawn
    DZE_BackpackAntiTheft = false; // Prevent stealing from backpacks in trader zones


    in Custom\loadout.sqf
     
    //change loadout on spawn, // added by: Stijnkluiters github: https://github.com/stijnkluiters // default array = [ //"ItemBandage", //"ItemBandage", //"17Rnd_9x19_glock17", //"17Rnd_9x19_glock17", //"ItemMorphine", private ["_isHero","_humanity","_isBandit"]; waitUntil {uiSleep 1; !isNil ("PVCDZ_plr_Login")}; waitUntil {uiSleep 1; !isNil ("Humanity")}; _humanity = Humanity; diag_log format["CHARGEDLIGHT1: humanity: %1",_humanity]; _isBandit = _humanity < -5000; _isHero = _humanity > 5000; if (_isHero) then { //hero diag_log format["LOADOUT: Hero"]; DefaultMagazines = ["ItemMap","HandRoadFlare","ItemBandage","ItemPainkiller","8Rnd_9x18_Makarov","8Rnd_9x18_Makarov"]; DefaultWeapons = ["Makarov_DZ","ItemFlashlight"]; DefaultBackpack = "DZ_Patrol_Pack_EP1"; DefaultBackpackItems = []; // Can include both weapons and magazines i.e. ["PDW_DZ","30Rnd_9x19_UZI"]; }; if (_isBandit) then { //bandit diag_log format["LOADOUT: Bandit"]; DefaultMagazines = ["ItemMap","HandRoadFlare","ItemBandage","ItemPainkiller","8Rnd_9x18_Makarov","8Rnd_9x18_Makarov"]; DefaultWeapons = ["Makarov_DZ","ItemFlashlight"]; DefaultBackpack = "DZ_Patrol_Pack_EP1"; DefaultBackpackItems = []; // Can include both weapons and magazines i.e. ["PDW_DZ","30Rnd_9x19_UZI"]; };





     
  2. Like
    coresync got a reaction from juandayz in [1.6 Harvestable hemp, smoking weed, pot farms]   
    @juandayz so it is working, without server_deleteobj
    /* rewrited by juandayz for epoch 1.6 put together for DayZ Epoch Credits to Shogun338 from Insurrection gaming modified for separate "gather weed" script */ private ["_gearmenu","_playerPos","_nearWeed","_weed","_objectID","_objectUID"]; _playerPos = getPosATL player; _hempqty = {_x == "ItemKiloHemp"} count magazines player; _nearWeed = count nearestObjects [_playerPos, ["fiberplant"], 4] > 0; _weed = nearestObject [player, "fiberplant"]; if !(_nearWeed) exitWith { systemChat("Needs be near of a FiberPlant"); }; if (_hempqty > 2) exitWith { systemChat("YOure Full of Drugs"); }; disableSerialization; _gearmenu = FindDisplay 106; _gearmenu CloseDisplay 106; player playActionNow "Medic"; r_interrupt = false; sleep 6; _objectID = _weed getVariable["ObjectID","0"]; _objectUID = _weed getVariable["ObjectUID","0"]; deleteVehicle _weed; // [_objectID,_objectUID] call server_deleteObj; deleteVehicle _weed; PVDZ_obj_Destroy = [_objectID,_objectUID,_weed]; publicVariableServer "PVDZ_obj_Destroy"; player addMagazine "ItemKiloHemp"; sleep 2; systemChat("NICE LETS SMOKE OR SELL");  
  3. Like
    coresync reacted to juandayz in [1.6 Harvestable hemp, smoking weed, pot farms]   
    do you spawn the fiberplants as event?
  4. Like
    coresync reacted to juandayz in [1.6 Harvestable hemp, smoking weed, pot farms]   
    DRUGS
    Before star... you should add this items into your traders menus.
    1.Create this path: mpmissions\your instance\scripts\drugs\
    2-Create the sqfs into the new path.
    3.Now you need extra_rc.hpp or deploy anything mod.
     
    4.Now we gonna create an epoch event to spawn weed fields.
    Now this is optional... since i do not use road blocks for anything... i just change it by weed plants.. so if u wanna do the same:
    1-Open spawn_roadblocks.sqf located in dayz_server\compile\
    then change this line:
    _spawnveh = DZE_isWreck call BIS_fnc_selectRandom; by:
    _spawnveh = "Fiberplant"; 2-open your init.sqf find this line to manage the amount of fiber plants spawned.
    MaxDynamicDebris = 20; // was changed by juandayz to spawn fiberplants  
    Optional too. Create a police Drugs check point. (if player cross that check point with drugs police gonna remove it)
    You will need create the map addon.. i just give you the code for remove drugs.
     
  5. Like
    coresync reacted to juandayz in Metalfence_7 is removeable   
    heres where fn_selfactions define when you can remove
    this part only allow to remove if the object is a :
    for everyone:
    _isDestructable DZE_isWreck DZE_isWreckBuilding DZE_isRemovable  
    for owners:
    _isModular _isModularDoor _isGenerator DZE_isDestroyableStorage  
    so heres is the defines for each variables,,
    so looking it. the only place where youre object can be defined is in builtItems or ModularItems.. not sure but dont think you gonna find your object here.. so to start to test you can try it:
    you will need a custom fn_selfactions.sqf
    below:
    _isGenerator = _cursorTarget isKindOf "Generator_DZ"; paste:
    _nonremovable = _cursorTarget isKindOf "MetalFence_7";  
    below :
    if (_isAlive) then { paste
    if (_nonremovable) then { _player_deleteBuild = false; };  
  6. Like
    coresync reacted to Tang0 in Epoch 1.0.6   
    any idea when 1.0.6.1 with alot of the fixes in it will be released?
×
×
  • Create New...