Jump to content
  • 0

kilo of hemp painkiller effect?


Nakama Mind

Question

I was wondering could I add a line to my "smokeshit.sqf" (many thanks to FragZ for the tutorial)  so when I use the kilo of hemp I also call to the painkiller.sqf? 


 
    /*
    by: ZeroK00L
    */
    [] spawn {
    hint "You roll a fatty and smoke it! Damn! That shit is the chronic!";
    player removeMagazine 'ItemKiloHemp';
	_id = [0,0,0,[player]] execVM "\z\addons\dayz_code\medical\painkiller.sqf";
    Remove_Drug_effects =
    {
    {
    ppEffectDestroy _x;
    } forEach (_this select 0);
    ppEffectDestroy ppe2;
    ppEffectDestroy ppe3;
    setaperture 0;
    };
    _time = time;
    _effects = [];
    while {true} do
    {
    ppe2 = ppEffectCreate ["chromAberration", 1555];
    _effects = _effects + [ppe2];
    ppe2 ppEffectAdjust [random 0.25,random 0.25,true];
    ppe2 ppEffectCommit 1;
    ppe2 ppEffectEnable true;
    ppe3 = ppEffectCreate ["radialBlur", 1555];
    _effects = _effects + [ppe3];
    ppe3 ppEffectEnable true;
    ppe3 ppEffectAdjust [random 0.02,random 0.02,0.15,0.15];
    ppe3 ppEffectCommit 1;
    sleep random(1);
    if (_time + 60 < time) exitWith {[_effects] call Remove_Drug_effects;};
    };
    };



Would   "_id = [0,0,0,[player]] execVM "\z\addons\dayz_code\medical\painkiller.sqf" work? 

 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Trying to use this but can't seem to get it to work any suggestions? 

private ["_id","_unit","_num_removed"];

disableserialization;

    [] spawn {
    hint "You roll a fatty and smoke it! Damn! That shit is the chronic!";
    player removeMagazine 'ItemKiloHemp';
	_id = [0,0,0,[player]] execVM

_unit = (_this select 3) select 0;

call fnc_usec_medic_removeActions;
r_action = false;

_num_removed = ([player,"ItemKiloHemp"] call BIS_fnc_invRemove);
if(_num_removed == 1) then {

	if (vehicle player != player) then {
		_display = findDisplay 106;
		_display closeDisplay 0;
	};	

	_unit setVariable ["USEC_inPain", false, true];

	if (vehicle player == player) then {
		//not in a vehicle
		player playActionNow "Gear";
	};

	if ((_unit == player) || (vehicle player != player)) then {
		//Self Healing
		_id = [player,player] execVM "\z\addons\dayz_code\medical\publicEH\medPainkiller.sqf";
	} else {
		[player,20] call player_humanityChange;
	};

	sleep 1;
	//clear the healed player's vision
	/* PVS/PVC - Skaronator */
	PVDZE_send = [_unit,"Painkiller",[_unit,player]];
	publicVariableServer "PVDZE_send";
};

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...