Advertisement
Guest User

Untitled

a guest
Apr 29th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.68 KB | None | 0 0
  1. // ERIE COUNTY LIFE - CAPTURABLE AREAS BY GEORGE MATTHEWS
  2. // ERIECOUNTYLIFE.ENJIN.COM
  3. // STEAMCOMMUNITY.COM/ID/URGAHDEFLURBA IS GEORGE'S STEAM
  4. // PLEASE CONTACT BEFORE USING THIS SCRIPT
  5. // SCRIPT ORIGINAL AND WRITTEN FOR ERIE COUNTY LIFE
  6. // PROTECTED BY BOHEMIA CONTENT CREATOR PROTECTION OR SOMETHING LIKE THAT
  7.  
  8. // George's Backend Variables
  9. contestor = profileName;
  10. if(side player == west) then {contestor = "Erie County Sheriff's Office"};
  11. proofCheck = "Empty";
  12. _area = area1;
  13. _areaowner = ugandaOccupied;
  14. _handWeapon = currentWeapon player;
  15. _cops = (west countSide playableUnits);
  16.  
  17. // George's Pre-Capture Checks
  18. if(ugandaOccupied == contestor) exitWith {hint "You already occupy Emita Castle"};
  19. if(_handWeapon == "") exitWith {hint "Sorry, You must be armed to capture the castle!"};
  20. if(side player == independent) exitWith {hint "Medical Services cannot intervene in gang issues!"};
  21. if(_cops < 2) exitWith {hint "You are not allowed to capture Emita Castle with less than 2 officers online!"};
  22.  
  23. _cocker = true;
  24. _capturer = player;
  25. _kysyeah = true;
  26.  
  27. disableSerialization;
  28. 5 cutRsc ["life_progress","PLAIN"];
  29. _ui = uiNameSpace getVariable "life_progress";
  30. _progress = _ui displayCtrl 38201;
  31. _pgText = _ui displayCtrl 38202;
  32. _pgText ctrlSetText format["[ECL] Capturing Emita Castle, Dont leave (10m) (10m) (1%1)...","%"];
  33. _progress progressSetPosition 0.01;
  34. _cP = 0.0001;
  35.  
  36. if(_cocker) then
  37. {
  38. while{true} do
  39. {
  40. sleep 2;
  41. _cP = _cP + 0.05;
  42. _progress progressSetPosition _cP;
  43. _pgText ctrlSetText format["[ECL] Capturing Emita Castle, Dont leave (10m) (%1%2)...",round(_cP * 100),"%"];
  44. if(_cP >= 1) exitWith {};
  45. if(_capturer distance _area > 10.5) exitWith { };
  46. if!(alive _capturer) exitWith {};
  47. };
  48. if!(alive _capturer) exitWith { _cocker = false; };
  49. if(_capturer distance _area > 10.5) exitWith { hint "You have ran to far! Capturing failed."; 5 cutText ["","PLAIN"]; _cocker = false; };
  50. 5 cutText ["","PLAIN"];
  51. _cocker = false;
  52. };
  53.  
  54.  
  55. // George's Capture Messages
  56. [1,format["Emita Castle was captured by: %1 it was previously owned by: %2",contestor,_areaowner]] remoteExec ["life_fnc_broadcast",west];
  57. [1,format["Emita Castle was captured by: %1 it was previously owned by: %2",contestor,_areaowner]] remoteExec ["life_fnc_broadcast",civilian];
  58.  
  59.  
  60. //Set The Capturer as the Capturer
  61. ugandaOccupied = contestor;
  62. publicVariable "ugandaOccupied";
  63.  
  64.  
  65. while {ugandaOccupied == contestor && side player == civilian} do
  66. {
  67. sleep 5;
  68. hint "You will recieve Emita Castle paycheck in 5 minutes";
  69. sleep 300;
  70. _tax = 2500 + round(random 20000);
  71. life_atmcash = life_atmcash + _tax;
  72. hint format ["You recieved %1 extra paycheck from occupying Emita Castle",_tax];
  73. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement