Guest User

Untitled

a guest
Nov 29th, 2018
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.18 KB | None | 0 0
  1. SA_Take_Tow_Ropes_Action = {
  2.     private ["_vehicle","_canTakeTowRopes"];
  3.     _vehicle = cursorTarget;
  4.     if([_vehicle] call SA_Can_Take_Tow_Ropes) then {
  5.    
  6.         _canTakeTowRopes = true;
  7.        
  8.         if!(missionNamespace getVariable ["SA_TOW_LOCKED_VEHICLES_ENABLED",false]) then {
  9.             if( locked _vehicle > 1 ) then {
  10.                 ["Cannot take tow ropes from locked vehicle",false] call SA_Hint;
  11.                 _canTakeTowRopes = false;
  12.             };
  13.         };
  14.        
  15.         if!(missionNamespace getVariable ["SA_TOW_IN_EXILE_SAFEZONE_ENABLED",false]) then {
  16.             if(!isNil "ExilePlayerInSafezone") then {
  17.                 if( ExilePlayerInSafezone ) then {
  18.                     ["Cannot take tow ropes in safe zone",false] call SA_Hint;
  19.                     _canTakeTowRopes = false;
  20.                 };
  21.             };
  22.         };
  23.        
  24.         ////////////////////// ADD THIS ////////////////////////////////////
  25.         // Custom Exile Rope Check
  26.         if (!("Exile_Item_Rope" in (vestItems player + uniformItems player + backpackItems player + assignedItems player))) then {
  27.  
  28.             ["You don't have any rope.",false] call SA_Hint;
  29.             _canTakeTowRopes = false;
  30.         };
  31.         ///////////////////////////////////////////////////////////////////
  32.    
  33.         if(_canTakeTowRopes) then {
  34.             [_vehicle,player] call SA_Take_Tow_Ropes;
  35.         };
  36.    
  37.     };
  38. };
Add Comment
Please, Sign In to add comment