Advertisement
Guest User

TakeOrgans

a guest
Mar 3rd, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. private["_unit"];
  2. _unit = cursorTarget;
  3. if(isNull _unit) exitWith {}; //if unit is null, than NO
  4. if((_unit getVariable ["missingOrgan",FALSE])) exitWith {};//must not be missing organ already
  5. if((player getVariable ["hasOrgan",FALSE])) exitWith {};//thief must not have already robbed an organ within last 5 mintues
  6. if((animationState _unit != "Incapacitated")) exitWith {};//victim must be knocked out
  7. if(player == _unit) exitWith {};//if the thief is the cursor target(dafuq) than NO
  8. if(!isPlayer _unit) exitWith {};//iff the cursor target is not a player than NO
  9. if(life_inv_kidney >= 2) exitWith {hint "1den fazla böbrek taşıyamazsın!"};//if you already have 2 kidneys, then go sell them already, no stockpiling
  10. if(!([true,"kidney",1] call life_fnc_handleInv)) exitWith {hint "Üstünüzde yer kalmamış!"};//if no room for kidney, you cannot take their kidney, duh, waste not want not
  11. life_action_inUse = true;//sets action to true as to prevent kidney spammming!!!!!!!!
  12. player setVariable["hasOrgan",true,true];//sets variable on thief, so as not to consistently take organs, set to 5 minute cooldown
  13. player playMove "AinvPknlMstpSnonWnonDnon_medic";//makes the thief do an animation as to seem like they are doing surgery
  14. sleep 3;//length of action, had weird results with any higher - obv not realistic, but whatever
  15. _unit setVariable["missingOrgan",true,true];//sets the missing organ variable so effects can take place
  16. life_action_inUse = false;//once variables are set, and actions stop, then you can use scrolly wheely
  17. [player] remoteExec ["life_fnc_hasOrgan", _unit];//this then calls the fn_hasOrgan.sqf on the thief
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement