Advertisement
Guest User

Untitled

a guest
Dec 21st, 2016
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 1.24 KB | None | 0 0
  1. /*
  2.     File: fn_initCiv.sqf
  3.     Author: Bryan "Tonic" Boardwine
  4.  
  5.     Description:
  6.     Initializes the civilian.
  7. */
  8. #include "..\script_macros.hpp"
  9. private["_spawnPos"];
  10. civ_spawn_1 = nearestObjects[getMarkerPos  "civ_spawn_1", ["Land_Offices_01_V1_F"],150];
  11. civ_spawn_2 = nearestObjects[getMarkerPos  "civ_spawn_2", ["Land_Shop_City_01_F"],150];
  12. civ_spawn_3 = nearestObjects[getMarkerPos  "civ_spawn_3", ["Land_Shop_City_02_F"],150];
  13. civ_spawn_4 = nearestObjects[getMarkerPos  "civ_spawn_4", ["Land_Shop_City_02_F"],150];
  14. waitUntil {!(isNull (findDisplay 46))};
  15.  
  16. if(life_is_alive && !life_is_arrested) then {
  17. /* Spawn at our last position */
  18. player setPosWorld life_civ_position;
  19. } else {
  20. if(!life_is_alive && !life_is_arrested) then {
  21. if(EQUAL(LIFE_SETTINGS(getNumber,“save_civ_positionStrict”),1)) then {
  22. _handle = [] spawn life_fnc_civLoadout;
  23. waitUntil {scriptDone _handle}; CASH = 0;
  24. };
  25. [] call life_fnc_spawnMenu;
  26. waitUntil{!isNull (findDisplay 38500)}; //Wait for the spawn selection to be open.
  27. waitUntil{isNull (findDisplay 38500)}; //Wait for the spawn selection to be done.
  28. } else {
  29. if(life_is_arrested) then {
  30. life_is_arrested = false;
  31. [player,true] spawn life_fnc_jail;
  32. };
  33. };
  34. };
  35. life_is_alive = true;
  36. player addRating 9999999;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement