Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- player setvariable ["c_chemdog_drugged", false];
- player setvariable ["c_chemdog_times_drugged", 0];
- player addEventHandler ["Respawn", {
- player setvariable ["c_chemdog_times_drugged", 0];
- player setvariable ["c_chemdog_drugged", false];
- }];
- _unit = player;
- _condition = {
- "c_chemdog_drug" in items player && {[_player, _target, []] call ace_common_fnc_canInteractWith} && !(player getvariable "c_chemdog_drugged")
- };
- _statement = {
- playsound "chemdog_inject";
- player removeitem "c_chemdog_drug";
- [] spawn {
- [] call {
- sleep 2;
- //systemchat "effect starting";
- _timesDrugged = player getvariable "c_chemdog_times_drugged";
- player setvariable ["c_chemdog_drugged", true];
- player setvariable ["c_chemdog_times_drugged", _timesDrugged + 1];
- _chemdog_sharp = ppEffectCreate ["WetDistortion",300];
- _chemdog_sharp ppEffectEnable true;
- _chemdog_sharp ppEffectAdjust [-10,0.5,0.5,0,0,0,0,0,0,0,0,0,0,0,0];
- _chemdog_sharp ppEffectCommit 5;
- _chemdog_colorC = ppEffectCreate ["ColorCorrections",1500];
- _chemdog_colorC ppEffectEnable true;
- _chemdog_colorC ppEffectForceInNVG true;
- _chemdog_colorC ppEffectAdjust [1,1,0,[0,0,0,-0.5],[1,1,1,1],[0.33,0.33,0.33,0],[0,0,0,0,0,0,4]];
- _chemdog_colorC ppEffectCommit 5;
- playSound "chemdog_heart_fast_1";
- sleep 0.5;
- playSound "chemdog_heart_fast_1";
- sleep 0.5;
- playSound "chemdog_heart_fast_1";
- sleep 0.5;
- playSound "chemdog_heart_fast_1";
- sleep 0.5;
- playSound "chemdog_heart_fast_1";
- sleep 0.5;
- if (player getvariable "c_chemdog_times_drugged" > 3) then {
- playSound "chemdog_heart_fast_1";
- sleep 0.5;
- playSound "chemdog_heart_fast_1";
- sleep 0.5;
- playSound "chemdog_heart_fast_1";
- sleep 0.5;
- playSound "chemdog_heart_fast_1";
- sleep 0.5;
- playSound "chemdog_heart_fast_1";
- sleep 0.5;
- playSound "chemdog_heart_fast_1";
- sleep 0.5;
- } else {
- playSound "chemdog_heart_fast_2";
- sleep 0.5;
- playSound "chemdog_heart_fast_3";
- sleep 0.5;
- playSound "chemdog_heart_fast_4";
- sleep 0.5;
- playSound "chemdog_heart_fast_5";
- sleep 0.5;
- playSound "chemdog_heart_fast_6";
- sleep 0.5;
- playSound "chemdog_heart_fast_7";
- sleep 0.5;
- };
- if (player getvariable "c_chemdog_drugged") then {
- [objNull, player] call ace_medical_fnc_treatmentAdvanced_fullHealLocal;
- player setAnimSpeedCoef 1.6;
- player enableStamina false;
- [] spawn {
- [] call {
- ////systemchat format ["Drugs active: %1", player getvariable "c_chemdog_times_drugged"];
- if (player getvariable "c_chemdog_times_drugged" > 3) then {
- player setdamage 1;
- };
- sleep 600;
- if (player getvariable "c_chemdog_times_drugged" > 0) then {
- _timesDrugged = player getvariable "c_chemdog_times_drugged";
- player setvariable ["c_chemdog_times_drugged", _timesDrugged - 1];
- };
- ////systemchat format ["Drugs active: %1 ", player getvariable "c_chemdog_times_drugged"];
- };
- };
- //hint "heal 1";
- sleep 5;
- };
- if (player getvariable "c_chemdog_drugged") then {
- [objNull, player] call ace_medical_fnc_treatmentAdvanced_fullHealLocal;
- //hint "heal 2";
- sleep 5;
- };
- if (player getvariable "c_chemdog_drugged") then {
- [objNull, player] call ace_medical_fnc_treatmentAdvanced_fullHealLocal;
- //hint "heal 3";
- sleep 5;
- };
- if (player getvariable "c_chemdog_drugged") then {
- [objNull, player] call ace_medical_fnc_treatmentAdvanced_fullHealLocal;
- //hint "heal 4";
- sleep 5;
- };
- if (player getvariable "c_chemdog_drugged") then {
- [objNull, player] call ace_medical_fnc_treatmentAdvanced_fullHealLocal;
- //hint "heal 5";
- sleep 5;
- };
- if (player getvariable "c_chemdog_drugged") then {
- [objNull, player] call ace_medical_fnc_treatmentAdvanced_fullHealLocal;
- //hint "heal 6";
- sleep 5;
- };
- if (player getvariable "c_chemdog_drugged") then {
- [objNull, player] call ace_medical_fnc_treatmentAdvanced_fullHealLocal;
- //hint "heal 7";
- sleep 5;
- };
- if (player getvariable "c_chemdog_drugged") then {
- [objNull, player] call ace_medical_fnc_treatmentAdvanced_fullHealLocal;
- //hint "heal 8";
- sleep 5;
- };
- if (player getvariable "c_chemdog_drugged") then {
- [objNull, player] call ace_medical_fnc_treatmentAdvanced_fullHealLocal;
- //hint "heal 9";
- };
- if (player getvariable "c_chemdog_drugged") then {
- _chemdog_colorC ppEffectAdjust [1,1,0,[0,0,0,0],[1,1,1,1],[0.33,0.33,0.33,0],[0,0,0,0,0,0,4]];
- _chemdog_colorC ppEffectCommit 5;
- _chemdog_sharp ppEffectAdjust [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];
- _chemdog_sharp ppEffectCommit 5;
- };
- if (!(player getvariable "c_chemdog_drugged")) then {
- player setAnimSpeedCoef 1;
- player enableStamina true;
- ppEffectDestroy [_chemdog_colorC,_chemdog_sharp];
- player setvariable ["c_chemdog_drugged", false];
- ////systemchat format ["Drugs active: %1", player getvariable "c_chemdog_drugged"];
- };
- if (player getvariable "c_chemdog_drugged") then {
- sleep 4;
- player setAnimSpeedCoef 1;
- player enableStamina true;
- sleep 1;
- player setStamina 0;
- ppEffectDestroy [_chemdog_colorC,_chemdog_sharp];
- player setvariable ["c_chemdog_drugged", false];
- };
- };
- };
- };
- _action = ["C_UseDrug","Use Drug","",_statement,_condition] call ace_interact_menu_fnc_createAction;
- [(typeOf _unit), 1, ["ACE_SelfActions","ACE_Equipment"], _action, true] call ace_interact_menu_fnc_addActionToClass;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement