Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.22 KB | None | 0 0
  1. #include "..\script_macros.hpp"
  2. /*
  3. File: fn_initCiv.sqf
  4. Author: Bryan "Tonic" Boardwine
  5.  
  6. Description:
  7. Initializes the civilian.
  8. */
  9. private _altisArray = ["Land_i_Shop_01_V1_F","Land_i_Shop_01_V2_F","Land_i_Shop_01_V3_F","Land_i_Shop_02_V1_F","Land_i_Shop_02_V2_F","Land_i_Shop_02_V3_F"];
  10. private _tanoaArray = ["Land_House_Small_01_F"];
  11. private _spawnBuildings = [[["Altis", _altisArray], ["Tanoa", _tanoaArray]]] call TON_fnc_terrainSort;
  12.  
  13. civ_spawn_1 = nearestObjects[getMarkerPos "civ_spawn_1", _spawnBuildings,350];
  14. civ_spawn_2 = nearestObjects[getMarkerPos "civ_spawn_2", _spawnBuildings,350];
  15. civ_spawn_3 = nearestObjects[getMarkerPos "civ_spawn_3", _spawnBuildings,350];
  16. civ_spawn_4 = nearestObjects[getMarkerPos "civ_spawn_4", _spawnBuildings,350];
  17.  
  18. waitUntil {!(isNull (findDisplay 46))};
  19.  
  20. if(life_side_noidcard) then {
  21. createDialog "aapps_idcard";
  22. //Abort can't be closeDialog in loadingscreen -> endmission
  23. ((findDisplay 4689200) displayCtrl 4689213) ctrlSetEventHandler
  24. [
  25. "ButtonDown",
  26. "
  27. endmission ""END1"";
  28. "
  29. ];
  30. (findDisplay 4689200) displaySetEventHandler ["keyDown","_this call life_fnc_displayHandler"];
  31. waitUntil{!(life_idcard_data isEqualTo [])};
  32. };
  33. _12 = 0 call life_fnc_idcard_NameCheck;
  34. waitUntil {_12};
  35.  
  36. if (life_is_alive && !life_is_arrested) then {
  37. /* Spawn at our last position */
  38. player setVehiclePosition [life_civ_position, [], 0, "CAN_COLLIDE"];
  39. } else {
  40. if (!life_is_alive && !life_is_arrested) then {
  41. if (LIFE_SETTINGS(getNumber,"save_civilian_positionStrict") isEqualTo 1) then {
  42. _handle = [] spawn life_fnc_civLoadout;
  43. waitUntil {scriptDone _handle};
  44. CASH = 0;
  45. [0] call SOCK_fnc_updatePartial;
  46. };
  47. [] call life_fnc_spawnMenu;
  48. waitUntil{!isNull (findDisplay 38500)}; //Wait for the spawn selection to be open.
  49. waitUntil{isNull (findDisplay 38500)}; //Wait for the spawn selection to be done.
  50. } else {
  51. if (life_is_arrested) then {
  52. life_is_arrested = false;
  53. [player,true] spawn life_fnc_jail;
  54. };
  55. };
  56. };
  57. life_is_alive = true;
  58. player addRating 9999999;
  59. [player, uniform player] call life_fnc_equipGear;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement