SnipeZz_Qc
Member
Hy guys im trying to make a drug script but I can't get work the duration of the drug.
here is the script:
Thank you
SniPeZz_Qc
here is the script:
Code:
private ["_item","_config","_timeOut","_timeMax"];
_item = _this;
_config = configFile >> "CfgMagazines" >> __item;
_hasdrug1kg = _this in magazines player;
_text = getText (_config >> "displayName");
_timeOut = 0;
_timeMax = 30;
dayz_lastCheckBit = time;
drug1k = 1;
disableSerialization;
player removeMagazine _item;
player playActionNow "PutDown";
sleep 1;
//_nul = [objNull, player, rSAY, "playerSnoring"] call RE;
while {drug1k == 1} do {
switch true do {
case (_timeOut < _timeMax) : {
"chromAberration" ppEffectEnable true;
"chromAberration" ppEffectAdjust [_force / 24, _force / 24, false];
"chromAberration" ppEffectCommit (0.3 + random 0.1);
waituntil {ppEffectCommitted "chromAberration"};
sleep 0.6;
};
default {
sleep 3;
"colorInversion" ppEffectEnable false;
"wetDistortion" ppEffectEnable false;
"colorCorrections" ppEffectAdjust [1, 1, 0, [0.5,0.5,0.5,0], [0.5,0.5,0.5,0], [0.5,0.5,0.5,0]];
"colorCorrections" ppEffectCommit 10;
waitUntil {ppEffectCommitted "colorCorrections"};
"colorCorrections" ppEffectEnable false;
"chromAberration" ppEffectEnable false;
};
};
sleep 1;
_timeOut = _timeOut + 1;
};
cutText ["", "PLAIN DOWN"];
Thank you
SniPeZz_Qc