SHARE
TWEET

Untitled

a guest Jul 9th, 2019 29 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. if (life_is_alive && !life_is_arrested) then {
  20.     /* Spawn at our last position */
  21.     player setVehiclePosition [life_civ_position, [], 0, "CAN_COLLIDE"];
  22. } else {
  23.     if (!life_is_alive && !life_is_arrested) then {
  24.         if (LIFE_SETTINGS(getNumber,"save_civilian_positionStrict") isEqualTo 1) then {
  25.             _handle = [] spawn life_fnc_civLoadout;
  26.             waitUntil {scriptDone _handle};
  27.             CASH = 0;
  28.             [0] call SOCK_fnc_updatePartial;
  29.         };
  30.         [] call life_fnc_spawnMenu;
  31.         waitUntil{!isNull (findDisplay 38500)}; //Wait for the spawn selection to be open.
  32.         waitUntil{isNull (findDisplay 38500)}; //Wait for the spawn selection to be done.
  33.     } else {
  34.         if (life_is_arrested) then {
  35.             life_is_arrested = false;
  36.             [player,true] spawn life_fnc_jail;
  37.         };
  38.     };
  39. };
  40. life_is_alive = true;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top