I really appreciate the help man!
Sorry man, dinner took longer than I thought it would haha.
I'd forgotten that you can't use normal script checks with the command menus, so sadly the option will always show in the menu. However I've edited the player_selfBloodBag.sqf to include the check for having the item and for whether they need blood or not.
Here is the file you can use.
This is a breakdown of the changes (because it's always nice to know what the code changes are).
It's the 1.8 file I had already updated, plus this
Added this to the private blarg line
Code:
,"_hasBagItem","_needsBlood"
After this
Code:
_inCombat = if (_timeout >= diag_tickTime) then { true } else { false };
I added
Code:
_hasBagItem = "ItemBloodbag" in magazines player;
_needsBlood = if (r_player_blood < 12000) then { true } else { false };
if (!_hasBagItem) exitWith { //If player doesn't have bloodbag then they can't self blood
cutText [format["You need a bloodbag to do this."], "PLAIN DOWN"]; //display text to let player know they need a blood bag
};
if (!_needsBlood) exitWith { //If they don't need blood then they can't self blood
cutText [format["Are you crazy? You already have full blood."], "PLAIN DOWN"]; //display text to let player know they have full blood
};
Tested it out using one of my own command menus and it worked fine.
I now just hope you're running 1.8, if not then you'll need to make the changes to the standard file. But instead of finding
Code:
_inCombat = if (_timeout >= diag_tickTime) then { true } else { false };
Code:
_bloodbagUsageTime = time;