Jump to content

escortrally

Member
  • Posts

    3
  • Joined

  • Last visited

Posts posted by escortrally

  1. ugh those are incomplete though

     

     

    Where exactly do i add the info on fn_selfactions.sqf at?  what line?

    // ---------------------------------------Krixes Self Bloodbag Start------------------------------------
        _mags = magazines player;
     
        // Krixes Self Bloodbag
        if ("ItemBloodbag" in _mags) then {
            hasBagItem = true;
        } else { hasBagItem = false;};
        if((speed player <= 1) && hasBagItem && _canDo) then {
            if (s_player_selfBloodbag < 0) then {
                s_player_selfBloodbag = player addaction[("<t color=""#c70000"">" + ("Self Bloodbag") +"</t>"),"Scripts\player_selfbloodbag.sqf","",5,false,true,"", ""];
            };
        } else {
            player removeAction s_player_selfBloodbag;
            s_player_selfBloodbag = -1;
        };
    // ---------------------------------------Krixes Self Bloodbag End------------------------------------

    Is that the right code?

     

    Heer is my first 30 lines of the file

    scriptName "Functions\misc\fn_selfActions.sqf";
    /***********************************************************
        ADD ACTIONS FOR SELF
        - Function
        - [] call fnc_usec_selfActions;
    ************************************************************/
    private ["_isWreckBuilding","_temp_keys","_magazinesPlayer","_isPZombie","_vehicle","_inVehicle","_hasFuelE","_hasRawMeat","_hasKnife","_hasToolbox","_onLadder","_nearLight","_canPickLight","_canDo","_text","_isHarvested","_isVehicle","_isVehicletype","_isMan","_traderType","_ownerID","_isAnimal","_isDog","_isZombie","_isDestructable","_isTent","_isFuel","_isAlive","_Unlock","_lock","_buy","_dogHandle","_lieDown","_warn","_hastinitem","_allowedDistance","_menu","_menu1","_humanity_logic","_low_high","_cancel","_metals_trader","_traderMenu","_isWreck","_isRemovable","_isDisallowRepair","_rawmeat","_humanity","_speed","_dog","_hasbottleitem","_isAir","_isShip","_playersNear","_findNearestGens","_findNearestGen","_IsNearRunningGen","_cursorTarget","_isnewstorage","_itemsPlayer","_ownerKeyId","_typeOfCursorTarget","_hasKey","_oldOwner","_combi","_key_colors","_player_deleteBuild","_player_flipveh","_player_lockUnlock_crtl","_player_butcher","_player_studybody","_player_cook","_player_boil","_hasFuelBarrelE"];
    
    if (TradeInprogress) exitWith {}; // Do not allow if any script is running.
    
    _vehicle = vehicle player;
    _isPZombie = player isKindOf "PZombie_VB";
    _inVehicle = (_vehicle != player);
    
    _onLadder =        (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
    _canDo = (!r_drag_sqf and !r_player_unconscious and !_onLadder);
    
    // ---------------------------------------Krixes Self Bloodbag Start------------------------------------
        _mags = magazines player;
     
        // Krixes Self Bloodbag
        if ("ItemBloodbag" in _mags) then {
            hasBagItem = true;
        } else { hasBagItem = false;};
        if((speed player <= 1) && hasBagItem && _canDo) then {
            if (s_player_selfBloodbag < 0) then {
                s_player_selfBloodbag = player addaction[("<t color="#c70000"">" + ("Self Bloodbag") +"</t>"),"fixes\player_selfbloodbag.sqf","",5,false,true,"", "];
            };
        } else {
            player removeAction s_player_selfBloodbag;
            s_player_selfBloodbag = -1;
        };
    // ---------------------------------------Krixes Self Bloodbag End------------------------------------
    _nearLight =     nearestObject [player,"LitObject"]; _canPickLight = false; if (!isNull _nearLight) then {     if (_nearLight distance player < 4) then {         _canPickLight = isNull (_nearLight getVariable ["owner",objNull]);     }; }; //Grab Flare if (_canPickLight and !dayz_hasLight and !_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, "", ""];

    Where do i put the player_selfBloodbag.sqf file at?

     

     

    When people make tutorals they make them as if everyone has been doing this for quiet some time... there are quiet a few new people like myself that just find tutorals missing so many steps its insane...

     

     

    Pasted the code used on my epoch server into your first 30 lines, copy it to that exact place inside a fresh fn_selfactions.sqf file. 

     

    Now make a folder inside your missionfile called fixes, inside this place the player_selfBloodbag.sqf file also place your modified fn_selfactions.sqf in here. You still seem to be missing a custom compiles.sqf for your custom fn_selfactions.sqf to load from. So extract the compiles.sqf from the init folder (inside dayz_server.pbo) and open it up, look for the line containing

    fnc_usec_selfActions =		compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_selfActions.sqf";		//Checks which actions for self
    

    change this into

    fnc_usec_selfActions =		compile preprocessFileLineNumbers "fixes\fn_selfActions.sqf";		//Checks which actions for self 

    Place it inside the fixes folder with the self_bloodbag and selfactions files.

     

     

    Final step is to open up your init.sqf and change the line reading

    call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf";				//Compile regular functions
    

    into

    call compile preprocessFileLineNumbers "fixes\compiles.sqf";				//Compile regular functions
    

    save everything and restart your server should work fine :D

     

     

     

    How you do with ftp etc when you have a hired host i have no idea since i have always had a private server ran by myself so dont ask about that :P

×
×
  • Create New...