Advertisement
Guest User

Untitled

a guest
Dec 12th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.13 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["_spawnPos"];
  10. if !(isNil "The_programmer_initialised") exitWith {};
  11. waitUntil {!(isNull (findDisplay 46))};
  12. if(life_side_noidcard) then {
  13. createDialog "aapps_idcard";
  14. //Abort can't be closeDialog in loadingscreen -> endmission
  15. ((findDisplay 4689200) displayCtrl 4689213) ctrlSetEventHandler
  16. [
  17. "ButtonDown",
  18. "
  19. endmission ""END1"";
  20. "
  21. ];
  22. (findDisplay 4689200) displaySetEventHandler ["keyDown","_this call life_fnc_displayHandler"];
  23. waitUntil{!(life_idcard_data isEqualTo [])};
  24. };
  25. _12 = 0 call life_fnc_idcard_NameCheck;
  26. waitUntil {_12};
  27.  
  28. if (life_is_alive && !life_is_arrested) then {
  29. /* Spawn at our last position */
  30. player setVehiclePosition [life_civ_position, [], 0, "CAN_COLLIDE"];
  31. } else {
  32. if (!life_is_alive && !life_is_arrested) then {
  33. if (LIFE_SETTINGS(getNumber,"save_civilian_positionStrict") isEqualTo 1) then {
  34. _handle = [] spawn life_fnc_civLoadout;
  35. waitUntil {scriptDone _handle};
  36. CASH = 0;
  37. [0] call SOCK_fnc_updatePartial;
  38. waitUntil {player getVariable ["gang_init_done", false]};
  39. };
  40.  
  41. [] call life_fnc_spawnMenu;
  42. waitUntil{!isNull (findDisplay 38500)}; //Wait for the spawn selection to be open.
  43. waitUntil{isNull (findDisplay 38500)}; //Wait for the spawn selection to be done.
  44. } else {
  45. if (life_is_arrested) then {
  46. life_is_arrested = false;
  47. [player,true] spawn life_fnc_jail;
  48. };
  49. };
  50. };
  51. if (life_is_alive && !life_is_arrested) then {
  52.  
  53. player setVehiclePosition [life_civ_position, [], 0, "CAN_COLLIDE"];
  54. } else {*/
  55. if (!life_is_arrested) then {
  56. [] call life_fnc_spawnMenu;
  57. waitUntil{!isNull (findDisplay 38500)}; //Wait for the spawn selection to be open.
  58. waitUntil{isNull (findDisplay 38500)}; //Wait for the spawn selection to be done.
  59. } else {
  60. if (life_is_arrested) then {
  61. life_is_arrested = false;
  62. [player,true] spawn life_fnc_jail;
  63. };
  64. };
  65. life_is_alive = true;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement