Need help self action

AsianKid

Well-Known Member
The actions can be click, what they are suppose to do doesn't happen.
I checks if the player has the item and then removes the item and does something

Here is the code
Code:
private ["_bunkercode"];
_Chance = 2;
_bunkercode = bunkercode;
_Humanity = player getVariable["humanity",0];
titleText ["Its top secret so...maybe.","PLAIN DOWN"]; titleFadeOut 3;
sleep 3;

if((_Humanity >= 15000) && (_Humanity <= 29999)) then {
	player playActionNow "Medic";
	cutText [format["Fine here. The code is %1 plz don't tell other players let them have a challenge or I change it.",_bunkercode,"%"], "PLAIN DOWN",10];
	} else {
	if((_Humanity >= -1999) && (_Humanity <= 14999)) then {
		if(random 100 <= _Chance) then {
		    player playActionNow "Medic";
			sleep 0.5;
			[] execVM "bunker\ask.sqf";
			};
		    }else{
			 cutText [format["Nahh no code for you but if you can give me something for it *wink*.",_bunkercode,"%"], "PLAIN DOWN"];
		} else {
		if((_Humanity <= -2000) && (_Humanity >= -15000)) then {
		    player playActionNow "Medic";
		    cutText [format["I told you its top secret so no!!!",_bunkercode,"%"], "PLAIN DOWN"];
		} else {
			cutText [format["Guess what I forgot it.....now leave me alone. ",_bunkercode,"%"], "PLAIN DOWN",3];
		};
	};
};
The other one
Code:
//###########################################
//ASIAN KID!!!!!!!!!!!!!!!!
//############################################
private ["_bunkercode"];
_bribe = bribe;
_canDo = (!r_drag_sqf and !r_player_unconscious and !_onLadder);
_bunkercode = bunkercode;
_magazinesPlayer = magazines player;
 if (_bribe in _magazinesPlayer) then {
        bunkgold = true;
    } else { bunkgold = false;};
if(hasBagItem && _canDo) then {
        player playActionNow "Medic";
		player removeMagazine _bribe;
		cutText [format["Code is %1 plz don't tell other players let them have a challenge or I change it.",_bunkercode,"%"], titleFadeOut 3;
    } else {
cutText [format["You don't have 1%.",_bribe,"%"], "PLAIN DOWN"];
    };
 
Back
Top