iaretechnician

Untitled

Jan 30th, 2016
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.33 KB | None | 0 0
  1. ​
  2. private ["_theAction"];
  3.    
  4.     _randChance = random 1;
  5.     _equippedMagazines = magazines player;
  6.    
  7.     // As it is, script will fail if the random chance is say 0.6, nothing at all will happen no title text, no indication, I commented your values and added correct ones 
  8.  
  9.     if ("Exile_Item_Hammer" in _equippedMagazines) then
  10.     {
  11.         //if (_randChance <= 0.5) then
  12.         if (_randChance <= 0.7) then                        
  13.         {
  14.         player playMove "AinvPknlMstpSnonWnonDr_medic3";
  15.         playSound "sound1";
  16.         sleep 14;
  17.         titleText ["You found nothing!", "PLAIN",1];
  18.        
  19.         };
  20.    
  21.         //if ((_randChance > 0.7) && (_randChance <= 0.9)) then
  22.         if (_randChance > 0.7) then                                                
  23.         {
  24.         player playMove "AinvPknlMstpSnonWnonDr_medic3";
  25.         playSound "sound1";
  26.         sleep 14;
  27.         _targetA = player;
  28.         _distA = random 2;
  29.         _dirA = direction player - 180;
  30.         _posA = getpos _targetA;
  31.         _positionsA = [(_posA select 0) + (sin _dirA) * _distA, (_posA select 1) + (cos _dirA) * _distA, 0];
  32.         _weaponHolderA = createVehicle ["GroundWeaponHolder", getPosATL player, [], 0, "CAN_COLLIDE"]; _weaponHolderA addItemCargoGlobal  ["Exile_Item_MetalBoard", 1];
  33.         player removeAction _search;
  34.         uiSleep 10;
  35.         theAction = false;
  36.  
  37.         };
  38.     }
  39.     else
  40.     {
  41.         titleText ["You need a Hammer to do that!", "PLAIN",1];
  42.     };
  43.  
  44. ​
Advertisement
Add Comment
Please, Sign In to add comment