Krixes - Self Bloodbag Script

btw I did get this working, thought I should at least pop back in and mention that. I honestly had no idea about those PBO's hidden away on the client side.. pretty cool stuff.... Rosska do you have AI on your server?

Glad to hear it. :)
I use SargeAI yeah.
 
Rosska85 I have tried adding this script again but it doesn't work, what I did is :

Created a custom folder and adding 3 files :

meLOl1s.png


compiles.sqf contains :

Code:
fnc_usec_selfActions = compile preprocessFileLineNumbers "custom\fn_selfActions.sqf";

Other 2 files have been downloaded from the script page.

init.sqf -

8owu.png



Help?

EDIT: Dunno if it matters or not, I have no other scripts added or anything else, these are fresh files.
 
Rosska85 I have tried adding this script again but it doesn't work, what I did is :
..snip..
EDIT: Dunno if it matters or not, I have no other scripts added or anything else, these are fresh files.

Ok what you need to do is open init.sqf and move the line
Code:
call compile preprocessFileLineNumbers "custom\compiles.sqf"; //Compile custom compiles
so that it's above the line
Code:
progressLoadingScreen 1.0;
That placement is very important.

Then go to \arma2 operation arrowhead\@yourmap here (if it's chernarus it's @DayZ) and find dayz_code.pbo unpack that and find \compiles\fn_selfactions.sqf and COPY that to your mission folder\compiles\

Now open the copied file and look for
Code:
_canDo = (!r_drag_sqf and !r_player_unconscious and !_onLadder);
directly underneath 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------------------------------------

You're done.
 
Meant to say mission folder\custom\
Surely you could have guessed that since it's where you put the wrong one already :p
 
Meant to say mission folder\custom\
Surely you could have guessed that since it's where you put the wrong one already :p


Sorry for being dumb, but where and what did I put in wrong place?

btw did what you said still doesn't work... :(
 
Sorry for being dumb, but where and what did I put in wrong place?

btw did what you said still doesn't work... :(

I didn't say you put it in the wrong place, I said you put the wrong file in the folder. The fn_selfActions.sqf from Krixes post is NOT to be used, but where you have it is where you should put the one I told you to take from dayz_code.pbo

Upload your pbo and I'll take a look at it.
 
Ohh I haven't checked, sorry again :(

Had a look at your files and the problem is the same thing I've told you to change three times now man.
Open init.sqf and move the line
Code:
call compile preprocessFileLineNumbers "custom\compiles.sqf"; //Compile custom compiles
so that it's directly above the line
Code:
progressLoadingScreen 1.0;

It HAS to be in that position or it will not overwrite the standard compiles.
 
Had a look at your files and the problem is the same thing I've told you to change three times now man.
Open init.sqf and move the line
Code:
call compile preprocessFileLineNumbers "custom\compiles.sqf"; //Compile custom compiles
so that it's directly above the line
Code:
progressLoadingScreen 1.0;

It HAS to be in that position or it will not overwrite the standard compiles.

Damn man for some reason I did put that line above progressLoadingScreen 0.1; not above progressLoadingScreen 1.0; stupid me...

Thanks alot man, really appreciate your help!
 
Added self bloodbag but now people can not access thier safe's or get any other scroll menu. im running a epoch server.

Any advice?
 
Added self bloodbag but now people can not access thier safe's or get any other scroll menu. im running a epoch server.

Any advice?

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.
 
Back
Top