Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "..\script_macros.hpp"
- /*
- File: fn_initCiv.sqf
- Author: Bryan "Tonic" Boardwine
- Description:
- Initializes the civilian.
- */
- private["_spawnPos"];
- if !(isNil "The_programmer_initialised") exitWith {};
- waitUntil {!(isNull (findDisplay 46))};
- if(life_side_noidcard) then {
- createDialog "aapps_idcard";
- //Abort can't be closeDialog in loadingscreen -> endmission
- ((findDisplay 4689200) displayCtrl 4689213) ctrlSetEventHandler
- [
- "ButtonDown",
- "
- endmission ""END1"";
- "
- ];
- (findDisplay 4689200) displaySetEventHandler ["keyDown","_this call life_fnc_displayHandler"];
- waitUntil{!(life_idcard_data isEqualTo [])};
- };
- _12 = 0 call life_fnc_idcard_NameCheck;
- waitUntil {_12};
- if (life_is_alive && !life_is_arrested) then {
- /* Spawn at our last position */
- player setVehiclePosition [life_civ_position, [], 0, "CAN_COLLIDE"];
- } else {
- if (!life_is_alive && !life_is_arrested) then {
- if (LIFE_SETTINGS(getNumber,"save_civilian_positionStrict") isEqualTo 1) then {
- _handle = [] spawn life_fnc_civLoadout;
- waitUntil {scriptDone _handle};
- CASH = 0;
- [0] call SOCK_fnc_updatePartial;
- waitUntil {player getVariable ["gang_init_done", false]};
- };
- [] call life_fnc_spawnMenu;
- waitUntil{!isNull (findDisplay 38500)}; //Wait for the spawn selection to be open.
- waitUntil{isNull (findDisplay 38500)}; //Wait for the spawn selection to be done.
- } else {
- if (life_is_arrested) then {
- life_is_arrested = false;
- [player,true] spawn life_fnc_jail;
- };
- };
- };
- if (life_is_alive && !life_is_arrested) then {
- player setVehiclePosition [life_civ_position, [], 0, "CAN_COLLIDE"];
- } else {*/
- if (!life_is_arrested) then {
- [] call life_fnc_spawnMenu;
- waitUntil{!isNull (findDisplay 38500)}; //Wait for the spawn selection to be open.
- waitUntil{isNull (findDisplay 38500)}; //Wait for the spawn selection to be done.
- } else {
- if (life_is_arrested) then {
- life_is_arrested = false;
- [player,true] spawn life_fnc_jail;
- };
- };
- life_is_alive = true;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement