Jump to content

broxx

Member
  • Content Count

    1
  • Joined

  • Last visited

  • Medals

Community Reputation

10 Good

About broxx

  • Rank
    Newbie
  1. broxx

    Farooq's Revive

    Hello guys, Here is my problem, i just write the code bellow to definitly kill a person when he is unconcious. It works well but i have a little problem. The action kill player (in french it's "achever" or "achever la personne") appear, even if i'm far from the body i want to kill ! I don't understand, because i used the same instruction as revive player (which works well). There is the code : from FAR_revive_funcs : player addAction ["<t color=""#C90000"">" + "Achever la personne" + "</t>", "FAR_revive\FAR_handleAction.sqf", ["action_achever"], 10, false, true, "", "call FAR_Check_achever"]; and FAR_HandleAchever = { private["_target"]; _target= _this select 0; if(alive _target) then { player playMove "AinvPknlMstpSlayWrflDnon_medic"; sleep 6; _target setDamage 1; }; }; and FAR_Check_achever = { private["_target", "_isTargetUnconscious", "_isDragged"]; _return = false; _target=cursorTarget; if( !alive player || _isPlayerUnconscious == 1 || FAR_isDragging || isNil "_target" || !alive _target || (!isPlayer _target && !FAR_Debugging) || (_target distance player) > 2 ) exitWith { _return }; _isTargetUnconscious = _target getVariable "FAR_isUnconscious"; _isDragged = _target getVariable "FAR_isDragged"; if (_isTargetUnconscious == 1 && _isDragged == 0 && ((currentWeapon player == primaryWeapon player) || (currentWeapon player == handgunWeapon player)) && (currentWeapon player != "")) then { _return = true; }; _return }; From : FAR_handleAction : if (_action == "action_achever") then { [cursorTarget] spawn FAR_HandleAchever; }; I hope you can help me ! And thanks Farooq, for the great job !! (sorry for bad english)
×