Krixes - Self Bloodbag Script

Also if you want to make sure that the self bloodbag action removes from your scrollmenu edit original command in fn_selfactions.sqf from

Code:
    _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>"),"custom\player_selfbloodbag.sqf","",5,false,true,"", ""];
        };
    } else {
        player removeAction s_player_selfBloodbag;
        s_player_selfBloodbag = -1;
    };

To this command in

Code:
    _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) && (r_player_blood < 12000)) then {
            s_player_selfBloodbag = player addaction[("<t color=""#c70000"">" + ("Self Bloodbag") +"</t>"),"custom\player_selfbloodbag.sqf","",5,false,true,"", ""];
        };
    } else {
        player removeAction s_player_selfBloodbag;
        s_player_selfBloodbag = -1;
    };

adding in (r_player_blood < 12000) tell the code if player has full blood to remove the command from the scrollmenu until they have less than 12k blood and the player has a bloodbag in their main gear :)

I also can confirm this is working for DayZ Mod 1.8

[DayZSO] xDeejayCrazyx
 
hi..i've some problem with your script in my server (dayz epoch hosted by dayzst)..the problem regard the trade center..before the self bloodbag script the seller in the trade center work well (mouse wheel down and it gave me the command to buy/sell something)..after bloodbag script the doesn't gave me the command?there is some collision for the 2 thing?
i've also rewritten/re_checked the script but nothing change..
what i've to do for take selfbloodbag and trade center?

(sorry for my english..bad italian guy ;D)

thx a lot for helping me
damiano..
 
hi..i've some problem with your script in my server (dayz epoch hosted by dayzst)..the problem regard the trade center..before the self bloodbag script the seller in the trade center work well (mouse wheel down and it gave me the command to buy/sell something)..after bloodbag script the doesn't gave me the command?there is some collision for the 2 thing?
i've also rewritten/re_checked the script but nothing change..
what i've to do for take selfbloodbag and trade center?

(sorry for my english..bad italian guy ;D)

thx a lot for helping me
damiano..

You used the fn_selfActions.sqf from Krixes' post I'm guessing? You're not supposed to do that. What you need to do is open your local install of Arma and find this
@DayZ_Epoch\addons\dayz_code.pbo\compile\fn_selfActions.sqf
Copy that file to where you have put Krixes' file in your mission folder then open it up and find
Code:
_canDo = (!r_drag_sqf and !r_player_unconscious and !_onLadder);

Then directly under that you want to add
Code:
// ---------------------------------------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>"),"custom\player_selfbloodbag.sqf","",5,false,true,"", ""];
        };
    } else {
        player removeAction s_player_selfBloodbag;
        s_player_selfBloodbag = -1;
    };
// ---------------------------------------Krixes Self Bloodbag End------------------------------------


Save and you're done.
 

sorry but i can't comprind..i've to copy the fn_selfActions.sqf into my custom folder (follow the krixes instruction) and after do this?what i've to do after find out (_canDo = (!r_drag_sqf and !r_player_unconscious and !_onLadder);)?i've to paste the script that you linked me? i've to take the other file (like player self bloodbag and compiles) and the changes to the init.sqf file?
 
sorry but i can't comprind..i've to copy the fn_selfActions.sqf into my custom folder (follow the krixes instruction) and after do this?what i've to do after find out (_canDo = (!r_drag_sqf and !r_player_unconscious and !_onLadder);)?i've to paste the script that you linked me? i've to take the other file (like player self bloodbag and compiles) and the changes to the init.sqf file?

Do NOT use the fn_selfActions.sqf attached to Krixes' post.
Go to your arma installation\@DayZ_Epoch\addons\dayz_code.pbo\compile\fn_selfActions.sqf
COPY that file to your mission folder and then make the edit in my post above.
 
okokok no problem..i've do all the thing that you suggest me..it's fine and it work..very very thankfull!!i'm so newbie with script (mybad)
 
sorry for my initial problem..
another thing..for you my error with the fn file can cause error with the auto refuel script?
 
Hi @ all,

the Self Bloodpag works fine on my Epoch 1.0.1.5 - thx !!!
Now we realize, that we cant give each other the Bloodbag - where is the mistake i made?

I hope you understand what i mean ;)
 
Hi @ all,

the Self Bloodpag works fine on my Epoch 1.0.1.5 - thx !!!
Now we realize, that we cant give each other the Bloodbag - where is the mistake i made?

I hope you understand what i mean ;)

You used the fn_selfActions.sqf from Krixes' post I'm guessing? You're not supposed to do that. What you need to do is open your local install of Arma and find this
@DayZ_Epoch\addons\dayz_code.pbo\compile\fn_selfActions.sqf
Copy that file to where you have put Krixes' file in your mission folder then open it up and find
Code:
_canDo = (!r_drag_sqf and !r_player_unconscious and !_onLadder);

Then directly under that you want to add
Code:
// ---------------------------------------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>"),"custom\player_selfbloodbag.sqf","",5,false,true,"", ""];
        };
    } else {
        player removeAction s_player_selfBloodbag;
        s_player_selfBloodbag = -1;
    };
// ---------------------------------------Krixes Self Bloodbag End------------------------------------


Save and you're done.
 
Krixes - Self Bloodbag Script help and discussion goes here

is there a trick to getting the tent sleep to show up? it works and then it dont work. just when I think its not working I get it to show up. its like when I log in its not there and the sometimnes it is there as an option
 
is there a trick to getting the tent sleep to show up? it works and then it dont work. just when I think its not working I get it to show up. its like when I log in its not there and the sometimnes it is there as an option

This isn't the tent sleep heal thread. Though I would say it's probably about the angle you look at the tent from or something. Just like gear doesn't show up unless you look at the tent the exact right way. Though remember if you log in right next to a tent, the option wont be there, you'd need to move around first to get the actions menu updated.
 
i need help, i do everything correctly and i cant get it to even show when i scroll, i did everything the tut said, i used my own self actions and what not..still no luck, can anyone skype or teamview me to fix the problem?
 
i need help, i do everything correctly and i cant get it to even show when i scroll, i did everything the tut said, i used my own self actions and what not..still no luck, can anyone skype or teamview me to fix the problem?

Upload your mission file (PBO) and I'll take a look at it.
 
Back
Top