Advertisement
iaretechnician

Untitled

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