Advertisement
Guest User

Untitled

a guest
May 2nd, 2017
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.09 KB | None | 0 0
  1. /*
  2. Author: Robin Withes
  3. */
  4. if(playerSide != west) exitWith {
  5. ["Why would i risk my life to sabotage the weed processor? This seems like something the cops would do.","#d32df0"] spawn RLG_fnc_RLGNotificationSystem;
  6. };
  7. _copStartSign = getpos player nearestObject "Land_InfoStand_V1_F";
  8. _weedMachine = getpos player nearestObject "Land_Device_assembled_F";
  9. _weedShop = getpos player nearestObject "Land_InfoStand_V2_F";
  10. [_copStartSign, true] remoteExec ["hideObjectGlobal", 2];
  11. _upp = "Setting up Bomb";
  12. //Need to alert everyone the cops are trying to destroy it here
  13. //Setup our progress bar.
  14. disableSerialization;
  15.  
  16.  
  17.  
  18. "progressBar" cutRsc ["life_progress","PLAIN"];
  19. _ui = uiNamespace getVariable "life_progress";
  20. _progress = _ui displayCtrl 38201;
  21. _pgText = _ui displayCtrl 38202;
  22. _pgText ctrlSetText format ["%2 (1%1)...","%",_upp];
  23. _progress progressSetPosition 0.01;
  24. _cP = 0;
  25.  
  26. while {true} do{
  27.  
  28. sleep 1;
  29. _cP = _cP + 0.1;
  30.  
  31.  
  32. _progress progressSetPosition _cP;
  33. _pgText ctrlSetText format ["%3 (%1%2)...",round(_cP * 100),"%",_upp];
  34. if (player distance _copStartSign > 30) exitWith {hint "You moved too far away and werent able to keep capturing the zone!"; "progressBar" cutText ["","PLAIN"]; [_copStartSign, false] remoteExec ["hideObjectGlobal", 2];};
  35. if (!alive player) exitWith {"progressBar" cutText ["","PLAIN"]; [_copStartSign, false] remoteExec ["hideObjectGlobal", 2];};
  36. if (_cP >= 1) exitWith{"progressBar" cutText ["","PLAIN"];
  37. ["You succesfully captured weed processing long enough to plant a bomb to destroy it! You set the timer to 60 seconds! Better Run!","#d32df0"] spawn RLG_fnc_RLGNotificationSystem;
  38. Sleep 60;
  39. _bomb = "Bo_GBU12_LGB" createVehicle (getMarkerPos "weedRaidMRK");
  40. [_weedShop, true] remoteExec ["hideObjectGlobal", 2];
  41. [_weedMachine, true] remoteExec ["hideObjectGlobal", 2];
  42. _bomb setDamage 1;
  43. Sleep 60;
  44. //Need to alert everyone weed shop is back operational
  45. [_copStartSign, false] remoteExec ["hideObjectGlobal", 2];
  46. [_weedShop, false] remoteExec ["hideObjectGlobal", 2];
  47. [_weedMachine, false] remoteExec ["hideObjectGlobal", 2];
  48. };
  49. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement