Advertisement
Guest User

Untitled

a guest
Oct 9th, 2015
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 1.50 KB | None | 0 0
  1. /*
  2.     File: fn_RobPharm
  3.     Author: Nic
  4.     Decription: Core script for robbing pharmaceuticals
  5. */
  6.  
  7. private["_drugRandom", "_amountRandom", "_countdown", "_pos"]
  8.  
  9. if({side _x = west} count playableUnits < 3) exitWith {hint "There needs to be 3 cops to rob this!"};
  10. if(!alive player) exitWith {};
  11. if(currentWeapon == "") exitWith {hint "You dont scare me... scram!"};
  12. if(playerSide == west) exitWith {Hint "Haha very funny officer, shouldn't you be on patrol?"};
  13. if(playerSide == independent) exitWith {hint "Nice try, I know you are medic!"};
  14.  
  15.  
  16. _pos = position player;
  17. createMarker ["markerAlertPharm", _Pos];
  18.     "markerAlertPharm" setMarkerColor "ColorRed";
  19.     "markerAlertPharm" setMarkerText "!ATTENTION! robbery !ATTENTION!";
  20.     "markerAlertPharm" setMarkerType "mil_warning";
  21.  
  22. hint format ["Hold im getting the drugs man dont kill me! (%1 seconds remain)", _countdown];
  23. while { _countdown > 0 } do {
  24.     uiSleep 1;
  25.     _countdown = _countdown - 1;
  26.     if(!alive player) exitWith {
  27.         hint "You failed because you died!";
  28.         deleteMarker "markerAlertPharm";
  29.     };
  30.      if((player distance _pos) > 5) exitWith {
  31.         hint "You got to far away!";
  32.         deleteMarker "markerAlertPharm";
  33.     };
  34. };
  35.  
  36. _amountRandom = floor(random(20));
  37. _drugRandom = floor(random(10));
  38.  
  39. if(_amountRandom == 20) then {
  40.     _amountRandom = 4;
  41. };
  42. if(_amountRandom <= 10) then {
  43.     _amountRandom = 1;
  44. };
  45. if(_amountRandom <= 15) then {
  46.     _amountRandom = 2;
  47. };
  48. if(_amountRandom <= 19) then {
  49.     _amountRandom = 3;
  50. };
  51.  
  52. if(_drugRandom = x) then {
  53.  
  54. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement