Jump to content

HeroeZGaming

Member
  • Posts

    80
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by HeroeZGaming

  1. Zupa or someone with more scripting skill will need to piece this together, but could you add something to this

     

    in z_at_returnChange.sqf: Line 11

        if (!Z_Selling) then {
        _return_change = _total_currency - _trade_total;
    } else {
        _return_change = _total_currency + _trade_total;
    };
    

     

    from this in z_at_sellItems.sqf: Line 39

        if(Z_SellingFrom == 0)then{
            _outcome = [unitBackpack player,_itemsArray,_weaponsArray] call ZUPA_fnc_removeWeaponsAndMagazinesCargo;
        };
        if(Z_SellingFrom == 1)then{
            _outcome = [Z_vehicle,_itemsArray,_weaponsArray,_bpArray] call ZUPA_fnc_removeWeaponsAndMagazinesCargo;
        };
    

    Possibly force trades from vehicles "Z_SellingFrom == 1" to _return_change to "Z_SellingFrom"

  2. I'll be able to help late tonight (after 10pm pacific) A bit tomorrow (9am to 1pm pacific) or if you can wait till Tuesday - Thursday I'll be available all day. Recommend no matter who helps you, take some time reading as much as you can so you you have a basic understanding of how each script works, file structure, and tools needed. Recommend downloading a pbo manager, a merge program ( I use diffmerge) an ftp program, teamviewer, and notepad++. Even if someone else helps you, you can always use those programs to work on your server.

  3. Humanity gain from Zeds is located in local_eventKill.sqf

    dayz_code\compile\local_eventKill.sqf

    //[unit, selectionName, damage, source, projectile]
    //will only run when local to the created object
    //record any key hits to the required selection
    private ["_zed","_killer","_kills","_array","_type","_humanity"];

    _array =         _this select 0;
    _zed =             _array select 0;
    _killer =         _array select 1;
    _type =         _this select 1;

    if (local _zed) then {
        _kills = _killer getVariable[_type,0];
        _killer setVariable[_type,(_kills + 1),true];

        //increase players humanity when zed killed
        _humanity = _killer getVariable["humanity",0];
        _humanity = _humanity + 5;
        _killer setVariable["humanity",_humanity,true];
    };

     

    Humanity given for giving a bloodbag to another player is in transfusion.sqf

    dayz_code\medical\transfusion.sqf

    private ["_started","_finished","_animState","_isMedic","_num_removed","_unit","_lastused"];
    // bleed.sqf
    _unit = (_this select 3) select 0;
    //_lowBlood =     _unit getVariable ["USEC_lowBlood", false];
    //_injured =         _unit getVariable ["USEC_injured", false];
    //_inPain =         _unit getVariable ["USEC_inPain", false];
    //_lastused =     _unit getVariable ["LastTransfusion", time];

    // if (_lastused - time < 60) exitwith {cutText [format[(localize "str_actions_medical_18"),_text] , "PLAIN DOWN"]};

    call fnc_usec_medic_removeActions;
    r_action = false;

    // not possible to transfuse while in a vehicle
    if (vehicle player != player) exitWith { };

    player playActionNow "Medic";

    [1,1] call dayz_HungerThirst;

    r_interrupt = false;
    _animState = animationState player;
    r_doLoop = true;
    _started = false;
    _finished = false;
    while {r_doLoop} do {
        _animState = animationState player;
        _isMedic = ["medic",_animState] call fnc_inString;
        if (_isMedic) then {
            _started = true;
        };
        if (_started && !_isMedic) then {
            r_doLoop = false;
            _finished = true;
        };
        if (r_interrupt) then {
            r_doLoop = false;
        };
        sleep 0.1;
    };
    r_doLoop = false;

    if (_finished) then {
        //_unit setVariable["LastTransfusion",time,true]; //reserve for self transfusion
        _unit setVariable["USEC_lowBlood",false,true];
        _num_removed = ([player,"ItemBloodbag"] call BIS_fnc_invRemove);
        if(_num_removed == 1) then {
        
            /* PVS/PVC - Skaronator */
            PVDZE_send = [_unit,"Transfuse",[_unit,player]];
            publicVariableServer "PVDZE_send";

            [player,100] call player_humanityChange;
        };
    } else {
        r_interrupt = false;
        player switchMove "";
        player playActionNow "stop";
    };

  4. In your server RPT you have a few errors.

     

    BuildingList = []; { if (DZE_MissionLootTable) then { if (isClass> 11:59:25 Error position: <DZE_MissionLootTable) then { if (isClass> 11:59:25 Error Undefined variable in expression: dze_missionloottable 11:59:25 File z\addons\dayz_server\init\server_functions.sqf, line 220 11:59:25 Error in expression <VehicleArea;

    This is spammed for most your rpt.   Have you made changes to your variables.sqf or compiles.sqf?

     

    Warning Message: Picture \z\addons\dayz_code\gui\dayz_logo_ca.paa not found

     

    12:00:06 Warning Message: You cannot play/edit this mission; it is dependent on downloadable content that has been deleted. asc_eu_lights

    Are you sure you have the up to date version of epoch 1.0.5.1?

  5. Found a couple pieces of code within dayz_code that may help me.   Just not sure how to get them to help call script depending on day or night.

     

    In compiles.sqf

    world_isDay =                 {if ((daytime < (24 - dayz_sunRise)) && (daytime > dayz_sunRise)) then {true} else {false}};

     

    if(world_isDay) then......   else{   I'm terrible at this, still learning.

     

    This is the fn_curTimeStr.sqf

    private ["_hrStr","_minStr","_curDate","_hr","_min","_strTime"];
    _curDate = date;
    _hr = _curDate select 3;
    _min = _curDate select 4;
    _hrStr = "";
    _minStr = "";

    if (_hr < 10) then {_hrStr = format["0%1",_hr]} else {_hrStr = format["%1",_hr]};
    if (_hr == 0) then {_hrStr = "00"};
    if (_min < 10) then {_minStr = format["0%1",_min]} else {_minStr = format["%1",_min]};
    if (_min == 0) then {_minStr = "00"};
    _strTime = format["%1%2 hrs",_hrStr,_minStr];
    _strTime;

     

    Found this baby in the local_lights_init.sqf

        //Detect Dusk && Dawn
        _sunrise = call world_sunRise;
        _fnHr =  _sunrise + 0.5;
        _stHr =  (24 - _sunrise) - 0.5;
        if(_rndLights>75)then{_rndLights=75;};//Max allowed
        //axeDiagLog = format["IL:LIGHTS STARTED: _stHr:%1 | _fnHr:%2 | time:%3 | for:%4",_stHr,_fnHr, dayTime, vehicle player];
        //publicVariable "axeDiagLog";
                    
        while {alive player}do{
            if(daytime<_fnHr||daytime>_stHr)then{
            _plyr = vehicle player;
                //if(_plyPos distance _plyr > 6)then{//Only run if player moves
                _lightTrig = _plyr;

     

    I understand I need to place something at the beginning of the script to check if it's daylight, or to only start at specific times, just not sure how to put it together. 

×
×
  • Create New...