Advertisement
Guest User

Untitled

a guest
Jul 18th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.16 KB | None | 0 0
  1.  
  2. //[_location] remoteExec ["client_fnc_startSecurity",_player];
  3. //[getpos player,] remoteExec ["client_fnc_startGarbage",_player];
  4. // use lexus with directionals only.
  5. if(myjob != "none" && myjob != "bus") exitwith { ["You already have a job!", true] spawn domsg; };
  6.  
  7. if(isnil "taskrunning") then { taskrunning = false; };
  8.  
  9. myjob = "bus";
  10.  
  11. [] call client_fnc_hudwork;
  12.  
  13. private ["_warning","_JobBase"];
  14.  
  15. if(!taskrunning) then {
  16.  
  17. [] spawn {
  18. playertasks = [];
  19. taskrunning = true;
  20. busStoparray = [[[6297.1,1343.93,1.05324],"South Silver Lake City"],[[6578.3,2126.49,1.05263],"Central Silver Lake"],[[7754.72,2567.81,1.0542],"North Silver Lake City"],[[9767.67,3439.07,0.00143814],"North Silver Lake Housing"],[[9608.97,4133.95,0.00143814],"Ivywood Hospital"],[[9403,5476.09,0.00148773],"Ivywood Courthouse"],[[8661.25,6934.1,0.00143814],"Colchester City"],[[5420.71,6286.56,0.00109863],"Silver Lake Jail"],[[6728.49,4552.73,0.00143862],"Morrison Casino"],[[5493.53,3786.18,0.00143886],"Morrison Central"],[[4973.07,2483.28,0.00143886],"Morrison South"],[[4130.93,2167.28,0.00133896],"Skystead Turnoff"],[[3444.73,1343.02,0.00145721],"Francis Airport"],[[4964.65,1213.92,0.00143814],"South Silver Lake Housing"]];
  21. _warnings = 0;
  22. uisleep 30;
  23.  
  24. while{taskrunning && myjob == "bus"} do {
  25. uisleep 3;
  26.  
  27. if(playertasks isequalto []) then {
  28.  
  29. ["Generating Task", true] spawn domsg;
  30.  
  31. [(busStopArray select 0) select 0,(busStopArray select 0) select 1] spawn client_fnc_startBus;
  32.  
  33. if(_warnings > 10) then {
  34. taskrunning = false;
  35. ["Você foi despedido do seu trabalho!", true] spawn domsg;
  36. };
  37.  
  38.  
  39. } else {
  40.  
  41. if(_warnings > 10) then {
  42. taskrunning = false;
  43. ["Você foi demitido do seu trabalho!", true] spawn domsg;
  44. };
  45.  
  46. if(player distance vehspawned > 20) then { _warnings = _warnings + 1; };
  47. if(isNull vehspawned) then { _warnings = _warnings + 1; };
  48.  
  49.  
  50. if(player distance ((playertasks select 0) select 0) < 15) then {
  51.  
  52. ["You have arrived, wait a few seconds for passengers!", true] spawn domsg;
  53. paycheck = paycheck + 135;
  54.  
  55. _pia = [[6297.1,1343.93,1.05324],[6578.3,2126.49,1.05263],[7754.72,2567.81,1.0542],[9767.67,3439.07,0.00143814],[9608.97,4133.95,0.00143814],[9403,5476.09,0.00148773],
  56. [8661.25,6934.1,0.00143814],[5420.71,6286.56,0.00109863],[6728.49,4552.73,0.00143862],[5493.53,3786.18,0.00143886],[4973.07,2483.28,0.00143886],[4130.93,2167.28,0.00133896],
  57. [3444.73,1343.02,0.00145721],[4964.65,1213.92,0.00143814]] FIND ((playertasks select 0) select 0);
  58.  
  59. playertasks = [];
  60.  
  61. if(_pia == 13) then { _pia == -1; };
  62.  
  63. busStopArray select (_pia + 1) spawn client_fnc_startBus;
  64.  
  65. uisleep 5;
  66. deletemarkerlocal format["job%1",getPlayerUID player];
  67.  
  68. ["add","Karma",1,"Taxi Driver"] call client_fnc_sustain;
  69.  
  70. _level_check = (client_level_array select 9);
  71. _amount = 0;
  72. if(_level_check > 10 && _level_check < 300) then { _amount = _level_check / 6; };
  73. if(_level_check > 299 && _level_check < 600) then { _amount = _level_check / 5; };
  74. if(_level_check > 599) then { _amount = _level_check / 4; };
  75.  
  76. _amount = round(_amount);
  77.  
  78. if(_amount > 0) then {
  79. if(_amount > 150) then { _amount = 150; };
  80. [ format["You got paid an extra %1 cash in pocket!", _amount call client_fnc_numberText ] , false ] spawn domsg;
  81. [_amount,true,true] call Client_fnc_addMoneyToPlayer;
  82. };
  83.  
  84.  
  85. } else {
  86.  
  87.  
  88.  
  89.  
  90. if(random(100) > 90) then { _nearPlayers = player nearEntities ["man", 30]; {_nearplayers pushback _x; }foreach crew vehicle player; [format["%1 is the next stop!",((playertasks select 0) select 1)],false] remoteexec ["domsg",_nearPlayers]; };
  91.  
  92. [((playertasks select 0) select 0)] call client_fnc_jobMarker;
  93. uisleep 5;
  94. };
  95.  
  96. };
  97.  
  98. };
  99.  
  100. [0] call client_fnc_jobEnd;
  101.  
  102. };
  103.  
  104. };
  105.  
  106. if(taskrunning) then {
  107. playertasks pushback [_this select 0,_this select 1];
  108. _nearPlayers = player nearEntities ["man", 30]; {_nearplayers pushback _x; }foreach crew vehicle player; [format["%1 is the next stop!",((playertasks select 0) select 1)],false] remoteexec ["domsg",_nearPlayers];
  109. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement