Jump to content

pekass

Member
  • Posts

    16
  • Joined

  • Last visited

Posts posted by pekass

  1. Hello I would like to know why the 1.0.3 script not working in 1.0.3.1, I have to do to work.
    thanks and regards.
    (battleneye: script restriction #2)
     
    hola me gustaria saber por que no trabajan las script 1.0.3 en 1.0.3.1, que tengo que hacer para que trabajen.
    gracias y saludos.
  2. sorry for my English I am translating with googletranslator, I have a problem with the script and function selfbloodbag to speak with the trades, if I put the selfbloodbag can not talk to the trades, plz help.

     

    progressLoadingScreen 0.5;
    call compile preprocessFileLineNumbers "custom\compiles.sqf"; //Compile custom compiles
    call compile preprocessFileLineNumbers "server_traders.sqf"; //Compile trader configs
    progressLoadingScreen 1.0;
     
    compile.sqf
    fnc_usec_selfActions = compile preprocessFileLineNumbers "custom\fn_selfActions.sqf";
     
     
    fn_selfActions.sqf"
    scriptName "Functions\misc\fn_selfActions.sqf";
    /***********************************************************
    ADD ACTIONS FOR SELF
    - Function
    - [] call fnc_usec_selfActions;
    ************************************************************/
    private["_menClose","_hasBandage","_hasEpi","_hasMorphine","_hasBlood","_vehicle","_inVehicle","_color","_part"];
     
    _vehicle = vehicle player;
    _inVehicle = (_vehicle != player);
    _bag = unitBackpack player;
    _classbag = typeOf _bag;
    _isWater = (surfaceIsWater (position player)) or dayz_isSwimming;
    _hasAntiB = "ItemAntibiotic" in magazines player;
    _hasFuelE = "ItemJerrycanEmpty" in magazines player;
    //boiled Water
    _hasbottleitem = "ItemWaterbottle" in magazines player;
    _hastinitem = false;
    {
        if (_x in magazines player) then {
            _hastinitem = true;
        };
     
    } forEach boil_tin_cans;
     
     
    _hasKnife = "ItemKnife" in items player;
    _hasToolbox = "ItemToolbox" in items player;
    //_hasTent = "ItemTent" in items player;
    _onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
    _nearLight = nearestObject [player,"LitObject"];
    _canPickLight = false;
     
    if (!isNull _nearLight) then {
    if (_nearLight distance player < 4) then {
    _canPickLight = isNull (_nearLight getVariable ["owner",objNull]);
    };
    };
    _canDo = (!r_drag_sqf and !r_player_unconscious and !_onLadder);
     
    // ------------------------------------------------------------------------Krixes Self Bloodbag Start------------------------------------------------------------------------
    _mags = magazines player;
     
    // Krixes Self Bloodbag
    if ("ItemBloodbag" in _mags) then {
    hasBagItem = true;
    } else { hasBagItem = false;};
    if((speed player <= 1) && hasBagItem && _canDo) then {
    if (s_player_selfBloodbag < 0) then {
    s_player_selfBloodbag = player addaction[("<t color="#c70000"">" + ("Auto Transfusion") +"</t>"),"custom\player_selfbloodbag.sqf","",5,false,true,"", "];
    };
    } else {
    player removeAction s_player_selfBloodbag;
    s_player_selfBloodbag = -1;
    };
    // -------------------------------------------------------------------------Krixes Self Bloodbag End--------------------------------------------------------------------------
     
    //Grab Flare
    if (_canPickLight and !dayz_hasLight) then {
    if (s_player_grabflare < 0) then {
    _text = getText (configFile >> "CfgAmmo" >> (typeOf _nearLight) >> "displayName");
    s_player_grabflare = player addAction [format[localize "str_actions_medical_15",_text], "\z\addons\dayz_code\actions\flare_pickup.sqf",_nearLight, 1, false, true, "", ""];
    s_player_removeflare = player addAction [format[localize "str_actions_medical_17",_text], "\z\addons\dayz_code\actions\flare_remove.sqf",_nearLight, 1, false, true, "", ""];
    };
    } else {
    player removeAction s_player_grabflare;
    player removeAction s_player_removeflare;
    s_player_grabflare = -1;
    s_player_removeflare = -1;
    };
     
    if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4)) then { //Has some kind of target
    _isHarvested = cursorTarget getVariable["meatHarvested",false];
    _isVehicle = cursorTarget isKindOf "AllVehicles";
    _isVehicletype = typeOf cursorTarget in ["ATV_US_EP1","ATV_CZ_EP1"];
    _isMan = cursorTarget isKindOf "Man";
    _ownerID = cursorTarget getVariable ["characterID","0"];
    _isAnimal = cursorTarget isKindOf "Animal";
    _isDog =  (cursorTarget isKindOf "DZ_Pastor" || cursorTarget isKindOf "DZ_Fin");
    _isZombie = cursorTarget isKindOf "zZombie_base";
    _isDestructable = cursorTarget isKindOf "BuiltItems";
    _isTent = cursorTarget isKindOf "TentStorage";
    _isFuel = false;
    _isAlive = alive cursorTarget;
    _canmove = canmove cursorTarget;
    _text = getText (configFile >> "CfgVehicles" >> typeOf cursorTarget >> "displayName");
     
     
    _rawmeat = meatraw;
    _hasRawMeat = false;
    {
    if (_x in magazines player) then {
    _hasRawMeat = true;
    };
    } forEach _rawmeat; 
     
     
    if (_hasFuelE) then {
    _isFuel = (cursorTarget isKindOf "Land_Ind_TankSmall") or (cursorTarget isKindOf "Land_fuel_tank_big") or (cursorTarget isKindOf "Land_fuel_tank_stairs") or (cursorTarget isKindOf "Land_wagon_tanker");
    };
    //diag_log ("OWNERID = " + _ownerID + " CHARID = " + dayz_characterID + " " + str(_ownerID == dayz_characterID));
     
    //Allow player to delete objects
    if(_isDestructable and _hasToolbox and _canDo) then {
    if (s_player_deleteBuild < 0) then {
    s_player_deleteBuild = player addAction [format[localize "str_actions_delete",_text], "\z\addons\dayz_code\actions\remove.sqf",cursorTarget, 1, true, true, "", ""];
    };
    } else {
    player removeAction s_player_deleteBuild;
    s_player_deleteBuild = -1;
    };
     
    /*
    //Allow player to force save
    if((_isVehicle or _isTent) and _canDo and !_isMan) then {
    if (s_player_forceSave < 0) then {
    s_player_forceSave = player addAction [format[localize "str_actions_save",_text], "\z\addons\dayz_code\actions\forcesave.sqf",cursorTarget, 1, true, true, "", ""];
    };
    } else {
    player removeAction s_player_forceSave;
    s_player_forceSave = -1;
    };
    */
    //flip vehicle
    if ((_isVehicletype) and !_canmove and _isAlive and (player distance cursorTarget >= 2) and (count (crew cursorTarget))== 0 and ((vectorUp cursorTarget) select 2) < 0.5) then {
    if (s_player_flipveh  < 0) then {
    s_player_flipveh = player addAction [format[localize "str_actions_flipveh",_text], "\z\addons\dayz_code\actions\player_flipvehicle.sqf",cursorTarget, 1, true, true, "", ""];
    };
    } else {
    player removeAction s_player_flipveh;
    s_player_flipveh = -1;
    };
     
    //Allow player to fill jerrycan
    if(_hasFuelE and _isFuel and _canDo) then {
    if (s_player_fillfuel < 0) then {
    s_player_fillfuel = player addAction [localize "str_actions_self_10", "\z\addons\dayz_code\actions\jerry_fill.sqf",[], 1, false, true, "", ""];
    };
    } else {
    player removeAction s_player_fillfuel;
    s_player_fillfuel = -1;
    };
     
    if (!alive cursorTarget and _isAnimal and _hasKnife and !_isHarvested and _canDo) then {
    if (s_player_butcher < 0) then {
    s_player_butcher = player addAction [localize "str_actions_self_04", "\z\addons\dayz_code\actions\gather_meat.sqf",cursorTarget, 3, true, true, "", ""];
    };
    } else {
    player removeAction s_player_butcher;
    s_player_butcher = -1;
    };
     
    //Fireplace Actions check
    if (inflamed cursorTarget and _hasRawMeat and _canDo) then {
    if (s_player_cook < 0) then {
    s_player_cook = player addAction [localize "str_actions_self_05", "\z\addons\dayz_code\actions\cook.sqf",cursorTarget, 3, true, true, "", ""];
    };
    } else {
    player removeAction s_player_cook;
    s_player_cook = -1;
    };
    if (inflamed cursorTarget and (_hasbottleitem and _hastinitem) and _canDo) then {
    if (s_player_boil < 0) then {
    s_player_boil = player addAction [localize "str_actions_boilwater", "\z\addons\dayz_code\actions\boil.sqf",cursorTarget, 3, true, true, "", ""];
    };
    } else {
    player removeAction s_player_boil;
    s_player_boil = -1;
    };
     
    if(cursorTarget == dayz_hasFire and _canDo) then {
    if ((s_player_fireout < 0) and !(inflamed cursorTarget) and (player distance cursorTarget < 3)) then {
    s_player_fireout = player addAction [localize "str_actions_self_06", "\z\addons\dayz_code\actions\fire_pack.sqf",cursorTarget, 0, false, true, "",""];
    };
    } else {
    player removeAction s_player_fireout;
    s_player_fireout = -1;
    };
     
    //Packing my tent
    if(cursorTarget isKindOf "TentStorage" and _canDo and _ownerID == dayz_characterID) then {
    if ((s_player_packtent < 0) and (player distance cursorTarget < 3)) then {
    s_player_packtent = player addAction [localize "str_actions_self_07", "\z\addons\dayz_code\actions\tent_pack.sqf",cursorTarget, 0, false, true, "",""];
    };
    } else {
    player removeAction s_player_packtent;
    s_player_packtent = -1;
    };
     
    //Sleep
    if(cursorTarget isKindOf "TentStorage" and _canDo and _ownerID == dayz_characterID) then {
    if ((s_player_sleep < 0) and (player distance cursorTarget < 3)) then {
    s_player_sleep = player addAction [localize "str_actions_self_sleep", "\z\addons\dayz_code\actions\player_sleep.sqf",cursorTarget, 0, false, true, "",""];
    };
    } else {
    player removeAction s_player_sleep;
    s_player_sleep = -1;
    };
     
    //Repairing Vehicles
    if ((dayz_myCursorTarget != cursorTarget) and _isVehicle and !_isMan and _hasToolbox and (damage cursorTarget < 1)) then {
    _vehicle = cursorTarget;
    {dayz_myCursorTarget removeAction _x} forEach s_player_repairActions;s_player_repairActions = [];
    dayz_myCursorTarget = _vehicle;
     
    _allFixed = true;
    _hitpoints = _vehicle call vehicle_getHitpoints;
     
    {
    _damage = [_vehicle,_x] call object_getHit;
    _part = "PartGeneric";
     
    //change "HitPart" to " - Part" rather than complicated string replace
    _cmpt = toArray (_x);
    _cmpt set [0,20];
    _cmpt set [1,toArray ("-") select 0];
    _cmpt set [2,20];
    _cmpt = toString _cmpt;
     
    if(["Engine",_x,false] call fnc_inString) then {
    _part = "PartEngine";
    };
     
    if(["HRotor",_x,false] call fnc_inString) then {
    _part = "PartVRotor"; //yes you need PartVRotor to fix HRotor LOL
    };
     
    if(["Fuel",_x,false] call fnc_inString) then {
    _part = "PartFueltank";
    };
     
    if(["Wheel",_x,false] call fnc_inString) then {
    _part = "PartWheel";
     
    };
     
    if(["Glass",_x,false] call fnc_inString) then {
    _part = "PartGlass";
    };
     
    // get every damaged part no matter how tiny damage is!
    if (_damage > 0) then {
     
    _allFixed = false;
    _color = "color='#ffff00'"; //yellow
    if (_damage >= 0.5) then {_color = "color='#ff8800'";}; //orange
    if (_damage >= 0.9) then {_color = "color='#ff0000'";}; //red
     
    _string = format["<t %2>Repair%1</t>",_cmpt,_color]; //Repair - Part
    _handle = dayz_myCursorTarget addAction [_string, "\z\addons\dayz_code\actions\repair.sqf",[_vehicle,_part,_x], 0, false, true, "",""];
    s_player_repairActions set [count s_player_repairActions,_handle];
     
    };
     
    } forEach _hitpoints;
    if (_allFixed) then {
    _vehicle setDamage 0;
    };
    };
     
    if (_isMan and !_isAlive and !_isZombie) then {
    if (s_player_studybody < 0) then {
    s_player_studybody = player addAction [localize "str_action_studybody", "\z\addons\dayz_code\actions\study_body.sqf",cursorTarget, 0, false, true, "",""];
    };
    } else {
    player removeAction s_player_studybody;
    s_player_studybody = -1;
    };
     
    //Dog
    if (_isDog and _isAlive and (_hasRawMeat) and _canDo and _ownerID == "0" and player getVariable ["dogID", 0] == 0) then {
    if (s_player_tamedog < 0) then {
    s_player_tamedog = player addAction [localize "str_actions_tamedog", "\z\addons\dayz_code\actions\tame_dog.sqf", cursorTarget, 1, false, true, "", ""];
    };
    } else {
    player removeAction s_player_tamedog;
    s_player_tamedog = -1;
    };
     
    if (_isDog and _ownerID == dayz_characterID and _isAlive and _canDo) then {
    _dogHandle = player getVariable ["dogID", 0];
    if (s_player_feeddog < 0 and _hasRawMeat) then {
    s_player_feeddog = player addAction [localize "str_actions_feeddog","\z\addons\dayz_code\actions\dog\feed.sqf",[_dogHandle,0], 0, false, true,"",""];
    };
    if (s_player_waterdog < 0 and "ItemWaterbottle" in magazines player) then {
    s_player_waterdog = player addAction [localize "str_actions_waterdog","\z\addons\dayz_code\actions\dog\feed.sqf",[_dogHandle,1], 0, false, true,"",""];
    };
    if (s_player_staydog < 0) then {
    _lieDown = _dogHandle getFSMVariable "_actionLieDown";
    if (_lieDown) then { _text = "str_actions_liedog"; } else { _text = "str_actions_sitdog"; };
    s_player_staydog = player addAction [localize _text,"\z\addons\dayz_code\actions\dog\stay.sqf", _dogHandle, 5, false, true,"",""];
    };
    if (s_player_trackdog < 0) then {
    s_player_trackdog = player addAction [localize "str_actions_trackdog","\z\addons\dayz_code\actions\dog\track.sqf", _dogHandle, 4, false, true,"",""];
    };
    if (s_player_barkdog < 0) then {
    s_player_barkdog = player addAction [localize "str_actions_barkdog","\z\addons\dayz_code\actions\dog\speak.sqf", cursorTarget, 3, false, true,"",""];
    };
    if (s_player_warndog < 0) then {
    _warn = _dogHandle getFSMVariable "_watchDog";
    if (_warn) then { _text = "Quiet"; _warn = false; } else { _text = "Alert"; _warn = true; };
    s_player_warndog = player addAction [format[localize "str_actions_warndog",_text],"\z\addons\dayz_code\actions\dog\warn.sqf",[_dogHandle, _warn], 2, false, true,"",""];
    };
    if (s_player_followdog < 0) then {
    s_player_followdog = player addAction [localize "str_actions_followdog","\z\addons\dayz_code\actions\dog\follow.sqf",[_dogHandle,true], 6, false, true,"",""];
    };
    } else {
    player removeAction s_player_feeddog;
    s_player_feeddog = -1;
    player removeAction s_player_waterdog;
    s_player_waterdog = -1;
    player removeAction s_player_staydog;
    s_player_staydog = -1;
    player removeAction s_player_trackdog;
    s_player_trackdog = -1;
    player removeAction s_player_barkdog;
    s_player_barkdog = -1;
    player removeAction s_player_warndog;
    s_player_warndog = -1;
    player removeAction s_player_followdog;
    s_player_followdog = -1;
    };
    } else {
    //Engineering
    {dayz_myCursorTarget removeAction _x} forEach s_player_repairActions;s_player_repairActions = [];
    dayz_myCursorTarget = objNull;
    //Others
    player removeAction s_player_forceSave;
    s_player_forceSave = -1;
    player removeAction s_player_flipveh;
    s_player_flipveh = -1;
    player removeAction s_player_sleep;
    s_player_sleep = -1;
    player removeAction s_player_deleteBuild;
    s_player_deleteBuild = -1;
    player removeAction s_player_butcher;
    s_player_butcher = -1;
    player removeAction s_player_cook;
    s_player_cook = -1;
    player removeAction s_player_boil;
    s_player_boil = -1;
    player removeAction s_player_fireout;
    s_player_fireout = -1;
    player removeAction s_player_packtent;
    s_player_packtent = -1;
    player removeAction s_player_fillfuel;
    s_player_fillfuel = -1;
    player removeAction s_player_studybody;
    s_player_studybody = -1;
    //Dog
    player removeAction s_player_tamedog;
    s_player_tamedog = -1;
    player removeAction s_player_feeddog;
    s_player_feeddog = -1;
    player removeAction s_player_waterdog;
    s_player_waterdog = -1;
    player removeAction s_player_staydog;
    s_player_staydog = -1;
    player removeAction s_player_trackdog;
    s_player_trackdog = -1;
    player removeAction s_player_barkdog;
    s_player_barkdog = -1;
    player removeAction s_player_warndog;
    s_player_warndog = -1;
    player removeAction s_player_followdog;
    s_player_followdog = -1;
    };
     
    //Dog actions on player self
    _dogHandle = player getVariable ["dogID", 0];
    if (_dogHandle > 0) then {
    _dog = _dogHandle getFSMVariable "_dog";
    _ownerID = "0";
    if (!isNull cursorTarget) then { _ownerID = cursorTarget getVariable ["characterID","0"]; };
    if (_canDo and !_inVehicle and alive _dog and _ownerID != dayz_characterID) then {
    if (s_player_movedog < 0) then {
    s_player_movedog = player addAction [localize "str_actions_movedog", "\z\addons\dayz_code\actions\dog\move.sqf", player getVariable ["dogID", 0], 1, false, true, "", ""];
    };
    if (s_player_speeddog < 0) then {
    _text = "Walk";
    _speed = 0;
    if (_dog getVariable ["currentSpeed",1] == 0) then { _speed = 1; _text = "Run"; };
    s_player_speeddog = player addAction [format[localize "str_actions_speeddog", _text], "\z\addons\dayz_code\actions\dog\speed.sqf",[player getVariable ["dogID", 0],_speed], 0, false, true, "", ""];
    };
    if (s_player_calldog < 0) then {
    s_player_calldog = player addAction [localize "str_actions_calldog", "\z\addons\dayz_code\actions\dog\follow.sqf", [player getVariable ["dogID", 0], true], 2, false, true, "", ""];
    };
    };
    } else {
    player removeAction s_player_movedog;
    s_player_movedog = -1;
    player removeAction s_player_speeddog;
    s_player_speeddog = -1;
    player removeAction s_player_calldog;
    s_player_calldog = -1;
    };

     

    player_selfbloodbag.sqf

    //////////////////////////////////////////////////////////////////////////////////////////////
    // Script writen by Krixes //
    //    Infection chance and some comments added by Player2 //
    //    Combat check added by istealth //
    // //
    // Version 1.4 //
    // //
    // Change Log:    //
    // 1: Added bloodbag use timer //
    // 2: Added a timer for the amount of time before player can use self bloodbag again //
    //////////////////////////////////////////////////////////////////////////////////////////////
     
    private ["_bloodAmount","_humanityBool","_infectionChance","_humanityNegBool","_humanityNegAmount","_humanityAmount","_infectedLifeLost","_infectedLifeBool","_lastBloodbag","_bloodbagLastUsedTime","_bloodbagTime","_bloodbagUseTime","_bloodbagUsageTime"];
     
     
     
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    // Config Start-----------------------------------------------------------------------------------------------------------------------//
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     
    _bloodAmount = 4000; // Amount of blood to give to player
    _bloodbagUseTime = 30; // Amount of time it takes in second for the player to use the self bloodbag
    _bloodbagLastUsedTime = 60; // Amount of time in seconds before player can use self bloodbag again after a succesful use
     
    _infectionChance = 10; // Percent chance of player infection on self bloodbag (10 = 10% | 2 = 50% | 1 = 100%)
    _infectedLifeBool = true; // Whether the player can loose life if infected (True = On | False = off)
    _infectedLifeLost = 1000; // Amount of life to loose in becomes infected
     
    _humanityBool = false; // Whether the player can get humanity from giving self a bloodbag (True = On | False = off)
    _humanityAmount = 50; // Amount of humanity to give player if _humanityBool is true (250 is default for normal bloodbags)
     
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    // Config End-------------------------------------------------------------------------------------------------------------------------//
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     
     
     
     
     
    ///////////////////////////////////////////////////////////////////////////////
    // Everything below need not be modified unless you know what you are doing! //
    ///////////////////////////////////////////////////////////////////////////////
     
    _bloodbagTime = time - lastBloodbag; // Variable used for easy reference in determining the self bloodbag cooldown
    _bloodbagUsageTime = time;
     
    if(_bloodbagTime < _bloodbagLastUsedTime) exitWith { // If cooldown is not done then exit script
    cutText [format["You may not use Self Bloodbag this soon please wait %1!",(_bloodbagTime - _bloodbagLastUsedTime)], "PLAIN DOWN"]; //display text at bottom center of screen when players cooldown is not done
    };
     
    if (dayz_combat == 1) then { // Check if in combat
        cutText [format["You are in Combat and cannot give yourself a Bloodbag"], "PLAIN DOWN"]; //display text at bottom center of screen when in combat
    } else {
     
    player removeAction s_player_selfBloodbag; //remove the action from users scroll menu
     
    player playActionNow "Medic"; //play bloodbag animation
     
    ////////////////////////////////////////////////
    // Fancy cancel if interrupted addition start //
    ////////////////////////////////////////////////
    r_interrupt = false; // public interuppt variable
    _animState = animationState player; // get the animation state of the player
    r_doLoop = true; // while true sets whether to continue self bloodbagging
    _started = false; // this starts as false as a check
    _finished = false; // this starts as false and when true later sets players blood
    while {r_doLoop} do {
    _animState = animationState player; // keep checking to make sure player is in correct animation
    _isMedic = ["medic",_animState] call fnc_inString; // checking to make sure the animstate is the medic animation still
    if (_isMedic) then {
    _started = true; // this is a check to make sure everything is still ok
    };
    if(!_isMedic && !r_interrupt && (time - _bloodbagUsageTime) < _bloodbagUseTime) then {
    player playActionNow "Medic"; //play bloodbag animation
    _isMedic = true;
    };
    if (_started && !_isMedic && (time - _bloodbagUsageTime) > _bloodbagUseTime) then {
    r_doLoop = false; // turns off the loop
    _finished = true; // set finished to true to finish the self bloodbag and give player health/humanity
    lastBloodbag = time; // the last self bloodbag time
    };
    if (r_interrupt) then {
    r_doLoop = false; // if interuppted turns loop off early so _finished is never true
    };
    sleep 0.1;
    };
    r_doLoop = false; // make sure loop is off on successful self bloodbag
    ///////////////////////////////////////////////
    // Fancy cancel if interrupted addition end //
    //////////////////////////////////////////////
     
    if (_finished) then {
    player removeMagazine "ItemBloodbag"; //remove the used bloodbag from inventory
     
    r_player_blood = r_player_blood + _bloodAmount; //set players LOCAL blood to a certain ammount
     
    if(r_player_blood > 12000) then {
    r_player_blood = 12000; // If players blood is greater then max amount allowed set it to max allowed (this check keeps an error at bay)
    };
     
    // check if infected
    if (random(_infectionChance) < 1) then {
    r_player_infected = true; //set players client to show infection
    player setVariable["USEC_infected",true,true]; //tell the server the player is infected
    cutText [format["You have used a bloodbag on yourself but the bloodbag was infected!"], "PLAIN DOWN"]; //display text at bottom center of screen if infected
     
    // check for if loosing life on infection is turned on
    if(_infectedLifeBool) then {
    r_player_blood = r_player_blood - _infectedLifeLost; //set players LOCAL blood to a certain ammount
    player setVariable["USEC_BloodQty",r_player_blood,true]; //save this blood ammount to the database
    } else { // if loosing life is turned off
    r_player_lowblood = false; //set lowblood setting to false
    10 fadeSound 1; //slowly fade their volume back to maximum
    "dynamicBlur" ppEffectAdjust [0]; "dynamicBlur" ppEffectCommit 5; //disable post processing blur effect
    "colorCorrections" ppEffectAdjust [1, 1, 0, [1, 1, 1, 0.0], [1, 1, 1, 1],  [1, 1, 1, 1]];"colorCorrections" ppEffectCommit 5; //give them their colour back
    r_player_lowblood = false; //just double checking their blood isnt low
    player setVariable["USEC_BloodQty",r_player_blood,true]; //save this blood ammount to the database
    };
    } else { // if not infected
    r_player_lowblood = false; //set lowblood setting to false
    10 fadeSound 1; //slowly fade their volume back to maximum
    "dynamicBlur" ppEffectAdjust [0]; "dynamicBlur" ppEffectCommit 5; //disable post processing blur effect
    "colorCorrections" ppEffectAdjust [1, 1, 0, [1, 1, 1, 0.0], [1, 1, 1, 1],  [1, 1, 1, 1]];"colorCorrections" ppEffectCommit 5; //give them their colour back
    r_player_lowblood = false; //just double checking their blood isnt low
    player setVariable["USEC_BloodQty",r_player_blood,true]; //save this blood ammount to the database
     
    cutText [format["You have used a bloodbag on yourself!"], "PLAIN DOWN"]; //display text at bottom center of screen on succesful self bloodbag
    };
     
    // check if giving player humanity is on
    if(_humanityBool) then {
    [player,_humanityAmount] call player_humanityChange; // Set players humanity based on amount listed in config area
    };
    } else {
    // this is for handling if interrupted
    r_interrupt = false;
    player switchMove "";
    player playActionNow "stop";
    cutText [format["You have interrupted giving yourself a bloodbag!"], "PLAIN DOWN"]; //display text at bottom center of screen on interrupt
    };
    };
×
×
  • Create New...