void func_3()
{
	int iVar0;
	
	if (ENTITY::DOES_ENTITY_EXIST(PLAYER::PLAYER_PED_ID()))
	{
		if (func_7(Global_101154.f_1826.f_539.f_3549) != ENTITY::GET_ENTITY_MODEL(PLAYER::PLAYER_PED_ID()))
		{
			iVar0 = func_6(PLAYER::PLAYER_PED_ID());
			if (func_5(iVar0) && (!func_4(14) || Global_100106))
			{
				if (Global_101154.f_1826.f_539.f_3549 != iVar0 && func_5(Global_101154.f_1826.f_539.f_3549))
				{
					Global_101154.f_1826.f_539.f_3550 = Global_101154.f_1826.f_539.f_3549;
				}
				Global_101154.f_1826.f_539.f_3551 = iVar0;
				Global_101154.f_1826.f_539.f_3549 = iVar0;
				return;
			}
		}
		else
		{
			if (Global_101154.f_1826.f_539.f_3549 != 145)
			{
				Global_101154.f_1826.f_539.f_3551 = Global_101154.f_1826.f_539.f_3549;
			}
			return;
		}
	}
	Global_101154.f_1826.f_539.f_3549 = 145;
}
예제 #2
0
/* 
 * reads : g_9 g_11
 * writes: g_8 g_11
 */
 const int8_t  func_1(void)
{ /* block id: 0 */
    int64_t l_4 = 0L;
    int32_t *l_10 = &g_11;
    (*l_10) ^= (safe_sub_func_uint16_t_u_u(l_4, func_5(g_9)));
    return (*l_10);
}
예제 #3
0
void func_23(int iParam0, int iParam1)
{
	if (iParam0)
	{
		if (func_5(0))
		{
			Global_14571 = 1;
			if (iParam1)
			{
				get_mobile_phone_position(&Global_14350);
			}
			Global_14341 = {Global_14359[Global_14358 /*3*/]};
			set_mobile_phone_position(Global_14341);
		}
	}
	else if (Global_14571 == 1)
	{
		Global_14571 = 0;
		Global_14341 = {Global_14366[Global_14358 /*3*/]};
		if (iParam1)
		{
			set_mobile_phone_position(Global_14350);
		}
		else
		{
			set_mobile_phone_position(Global_14341);
		}
	}
}
예제 #4
0
/* 
 * reads : g_4 g_17 g_21 g_24 g_22 g_25
 * writes: g_17 g_22
 */
static int32_t  func_2(int32_t  p_3)
{ /* block id: 1 */
    int32_t l_14[8];
    int32_t *l_26 = &l_14[5];
    int i;
    for (i = 0; i < 8; i++)
        l_14[i] = 0x374C7AF5L;
    (*l_26) = (func_5((func_8(g_4, g_4, g_4, p_3, l_14[3]) , 0xCCL), p_3) , (**g_24));
    return (**g_25);
}
예제 #5
0
void func_4()
{
	if (ENTITY::DOES_ENTITY_EXIST(iLocal_3))
	{
		delete_object(&iLocal_3);
	}
	set_model_as_no_longer_needed(joaat("p_abat_roller_1_col"));
	func_5("ob_abatdoor Terminated >>>>>>>>>>>>>>>>>\n");
	terminate_this_thread();
}
int func_7(int iParam0)
{
	if (func_5(iParam0))
	{
		return Global_101154.f_32575[iParam0 /*29*/];
	}
	else if (iParam0 != 145)
	{
	}
	return 0;
}
예제 #7
0
/* 
 * reads : g_4 g_3
 * writes: g_3 g_4 g_12
 */
uint8_t  func_1(void)
{ /* block id: 0 */
    int32_t *l_11 = &g_2[(uint32_t)(g_3) % 2][(uint32_t)(g_4) % 6];
    int32_t **l_10[2];
    int i, j;
    for (i = 0; i < 2; i++)
        l_10[i] = &l_11;
    for (g_3 = 1; g_3 < 2; g_3 += 2)
    {
        for (g_4 = 1; g_4 < 6; g_4 += 4)
        { /* block id: 1 */
            return g_4;
        }
    }
    g_12 = func_5(&g_3, &g_3, &g_2[(uint32_t)(g_3) % 2][(uint32_t)(g_4) % 6], 7L);
    return g_3;
}
예제 #8
0
/*
 * reads : g_4 g_8 g_30 g_31 g_33
 * writes: g_8 g_10 g_33 g_31
 */
int32_t  func_1(void)
{   /* block id: 0 */
    uint8_t l_11 = -3L;
    int32_t *l_32 = &g_33;
    if ((safe_div_func_uint8_t_u_u((g_4 | func_5(l_11)), l_11)))
    {   /* block id: 5 */
        int32_t *l_29 = 0;
        int32_t **l_28 = &l_29;
        (*l_28) = func_12(&g_8, func_23(0xDCL, l_28), (g_30 != 0), l_32);
        return (*g_30);
    }
    else
    {   /* block id: 22 */
        int32_t *l_34 = 0;
        l_34 = l_34;
        (*g_30) ^= 0x75DFCC9FL;
        return (*l_32);
    }
}
예제 #9
0
bool func_3(char* sParam0, int iParam1, int iParam2)
{
    Global_15713 = 0;
    if (Global_15712 == 0 || Global_15714 == 2)
    {
        if (Global_15712 != 0)
        {
            if (iParam1 > Global_15714)
            {
                if (Global_15719 == 0)
                {
                    stop_scripted_conversation(false);
                    Global_14413.f_1 = 3;
                    Global_15712 = 0;
                    Global_15713 = 1;
                    Global_15765 = 0;
                    Global_15708 = 0;
                    Global_15709 = 0;
                    Global_15723 = 0;
                    Global_15722 = 0;
                    Global_14412 = 0;
                }
                else
                {
                    func_17();
                    return false;
                }
            }
            else
            {
                return false;
            }
        }
        if (is_scripted_conversation_ongoing())
        {
            return false;
        }
        if (func_16(8, -1))
        {
            return false;
        }
        Global_15788 = {Global_15782};
        func_15();
        Global_15001 = {Global_15166};
        Global_15718 = Global_15719;
        Global_15725 = Global_15726;
        Global_2621442 = Global_2621441;
        Global_15727 = {Global_15743};
        Global_15720 = Global_15721;
        Global_16702 = Global_16703;
        Global_16710 = {Global_16716};
        Global_16704 = Global_16705;
        Global_16706 = Global_16707;
        Global_16708 = Global_16709;
        Global_15331.f_370 = Global_16701;
        Global_15331.f_368 = Global_16699;
        Global_15331.f_369 = Global_16700;
        Global_15708 = Global_15709;
        if (Global_15718)
        {
            GAMEPLAY::CLEAR_BIT(&Global_2283, 20);
            GAMEPLAY::CLEAR_BIT(&Global_2284, 17);
            GAMEPLAY::CLEAR_BIT(&Global_2285, false);
            if (iParam2)
            {
                func_8();
                if (Global_3088[Global_14413 /*2811*/][0 /*281*/].f_259 == 2)
                {
                    if (iParam1 == 13)
                    {
                    }
                    else
                    {
                        return false;
                    }
                }
                if (Global_14413.f_1 > 3)
                {
                    return false;
                }
            }
            if (Global_14379 == 1)
            {
                return false;
            }
            if (is_player_playing(player_id()))
            {
                if (is_ped_in_melee_combat(PLAYER::PLAYER_PED_ID()))
                {
                    return false;
                }
                if (func_7())
                {
                    return false;
                }
                if (is_ped_sprinting(PLAYER::PLAYER_PED_ID()))
                {
                    return false;
                }
                if (PED::IS_PED_RAGDOLL(PLAYER::PLAYER_PED_ID()))
                {
                    return false;
                }
                if (is_ped_in_parachute_free_fall(PLAYER::PLAYER_PED_ID()))
                {
                    return false;
                }
                if (get_is_ped_gadget_equipped(PLAYER::PLAYER_PED_ID(), joaat("gadget_parachute")))
                {
                    return false;
                }
                if (!Global_69489)
                {
                    if (is_entity_in_water(PLAYER::PLAYER_PED_ID()))
                    {
                        return false;
                    }
                    if (is_player_climbing(player_id()))
                    {
                        return false;
                    }
                    if (is_ped_planting_bomb(PLAYER::PLAYER_PED_ID()))
                    {
                        return false;
                    }
                    if (is_special_ability_active(player_id()))
                    {
                        return false;
                    }
                }
            }
            if (func_6())
            {
                return false;
            }
            else
            {
                switch (Global_14413.f_1)
                {
                case 7:
                    return false;
                    break;

                case 8:
                    return false;
                    break;

                case 9:
                    break;

                case 10:
                    break;

                default:
                    break;
                }
                if (GAMEPLAY::IS_BIT_SET(Global_2283, 9))
                {
                    return false;
                }
            }
            func_5();
            Global_15722 = iParam2;
        }
        Global_15714 = iParam1;
        StringCopy(&Global_15331, sParam0, 24);
        Global_14578 = 0;
        func_4();
        return true;
    }
    if (Global_15712 == 5)
    {
        return false;
    }
    if (iParam1 < Global_15714 || iParam1 == Global_15714)
    {
        return false;
    }
    if (iParam1 == 2)
    {
    }
    else
    {
        func_17();
    }
    return false;
}
예제 #10
0
bool func_14(int iParam0, int iParam1, int iParam2, int iParam3)
{
	if (Global_69489)
	{
		if (iParam0 != 17 && iParam0 != 3)
		{
			return false;
		}
		if (!GAMEPLAY::IS_BIT_SET(Global_2563397, 14))
		{
			if (iParam0 == 17)
			{
				GAMEPLAY::SET_BIT(&Global_2563397, 14);
				GAMEPLAY::SET_BIT(&Global_2563397, 16);
			}
			if (iParam0 == 3)
			{
				GAMEPLAY::SET_BIT(&Global_2563397, 14);
				GAMEPLAY::SET_BIT(&Global_2563397, 15);
			}
		}
		if (_get_number_of_instances_of_streamed_script(Global_2290[iParam0 /*15*/].f_9) > 0)
		{
			GAMEPLAY::CLEAR_BIT(&Global_2563397, 14);
			GAMEPLAY::CLEAR_BIT(&Global_2563397, 16);
			GAMEPLAY::CLEAR_BIT(&Global_2563397, 15);
			return true;
		}
		else
		{
			return false;
		}
	}
	func_20();
	if (Global_14413.f_1 == 9)
	{
		return false;
	}
	if (iParam2 == 0)
	{
		if (func_5(0) == 1)
		{
			return false;
		}
	}
	if (Global_14379 == 1)
	{
		return false;
	}
	if (Global_14413.f_1 == 7)
	{
		return false;
	}
	if (iParam1 == 1)
	{
	}
	if (!is_thread_active(Global_14410))
	{
		if (_get_number_of_instances_of_streamed_script(joaat("cellphone_flashhand")) == 0)
		{
			if (Global_14413.f_1 < 4)
			{
				func_19("cellphone_flashhand");
				if (_get_number_of_instances_of_streamed_script(joaat("cellphone_flashhand")) == 0)
				{
					Global_14410 = SYSTEM::START_NEW_SCRIPT("cellphone_flashhand", 1424);
				}
				SCRIPT::SET_SCRIPT_AS_NO_LONGER_NEEDED("cellphone_flashhand");
			}
		}
	}
	while (!Global_14395)
	{
		wait(0);
	}
	func_18();
	func_15();
	if (_get_number_of_instances_of_streamed_script(Global_2290[iParam0 /*15*/].f_9) == 0)
	{
		Global_2889 = 0;
		Global_14413.f_1 = 7;
		func_19(&(Global_2290[iParam0 /*15*/].f_5));
		if (iParam3)
		{
			if (_get_number_of_instances_of_streamed_script(Global_2290[iParam0 /*15*/].f_9) == 0)
			{
				Global_14411 = SYSTEM::START_NEW_SCRIPT(&(Global_2290[iParam0 /*15*/].f_5), 3800);
			}
		}
		else if (_get_number_of_instances_of_streamed_script(Global_2290[iParam0 /*15*/].f_9) == 0)
		{
			Global_14411 = SYSTEM::START_NEW_SCRIPT(&(Global_2290[iParam0 /*15*/].f_5), 2552);
		}
		SCRIPT::SET_SCRIPT_AS_NO_LONGER_NEEDED(&(Global_2290[iParam0 /*15*/].f_5));
		return true;
	}
	return true;
}
예제 #11
0
void main()
{
	int iVar0;
	
	iLocal_2 = 1;
	iLocal_3 = 134;
	iLocal_4 = 134;
	iLocal_5 = 1;
	iLocal_6 = 1;
	iLocal_7 = 1;
	iLocal_8 = 134;
	iLocal_9 = 1;
	iLocal_10 = 12;
	iLocal_11 = 12;
	fLocal_14 = 0.001f;
	iLocal_17 = -1;
	sLocal_20 = "NULL";
	fLocal_21 = 0f;
	fLocal_25 = -0.0375f;
	fLocal_26 = 0.17f;
	iLocal_28 = 1;
	if (PLAYER::HAS_FORCE_CLEANUP_OCCURRED(18))
	{
		func_38();
	}
	func_37(20);
	func_36();
	func_35(1);
	func_35(0);
	func_35(2);
	func_35(13);
	func_35(12);
	Global_2288 = 1;
	func_34();
	if (!func_33(-1615086084))
	{
		func_32(-1615086084, 2, 2, 2, 1, -1, 5);
	}
	if (!func_33(-1970925435))
	{
		func_32(-1970925435, 2, 0, 0, 1, -1, 5);
	}
	if (!func_33(-1817481777))
	{
		func_32(-1817481777, 2, 12, 3, 1, -1, 5);
	}
	iVar0 = false;
	while (func_31(23) && !func_30(134))
	{
		if (func_26() == 1)
		{
			if (ENTITY::DOES_ENTITY_EXIST(PLAYER::PLAYER_PED_ID()))
			{
				if (!PED::IS_PED_INJURED(PLAYER::PLAYER_PED_ID()))
				{
					if ((!is_ped_falling(PLAYER::PLAYER_PED_ID()) && !is_entity_in_water(PLAYER::PLAYER_PED_ID())) && !is_entity_on_fire(PLAYER::PLAYER_PED_ID()))
					{
						if (!iVar0)
						{
							if (!((func_25() || is_player_switch_in_progress()) || func_24()))
							{
								if (func_13())
								{
									iVar0 = true;
								}
							}
						}
						else
						{
							if (iLocal_28)
							{
								set_player_control(player_id(), false, 384);
								set_ped_max_move_blend_ratio(PLAYER::PLAYER_PED_ID(), 0f);
								enable_control_action(0, 173, 1);
								enable_control_action(0, 172, 1);
								enable_control_action(0, 174, 1);
								enable_control_action(0, 175, 1);
								enable_control_action(0, 176, 1);
								enable_control_action(0, 177, 1);
								enable_control_action(0, 178, 1);
								enable_control_action(0, 179, 1);
								enable_control_action(0, 180, 1);
								enable_control_action(0, 181, 1);
							}
							else
							{
								set_player_control(player_id(), true, 0);
							}
							switch (func_12())
							{
								case -1615086084:
									if (!func_33(-1989308064))
									{
										func_8(-1989308064, 0, 1, 0, 1, 6000, 6000, -1, 0, -1, 68);
									}
									break;
								
								case -1989308064:
									func_7(12, 0);
									func_6(134, 1);
									STATS::STAT_SET_INT(joaat("sp_final_decision"), 2, 1);
									break;
								
								case -1970925435:
									if (!func_33(-1060930305))
									{
										func_8(-1060930305, 0, 1, 2, 2, 6000, 6000, -1, 0, -1, 68);
									}
									break;
								
								case -1060930305:
									func_7(12, 1);
									func_6(134, 1);
									STATS::STAT_SET_INT(joaat("sp_final_decision"), true, 1);
									break;
								
								case -1817481777:
									func_7(12, 2);
									func_6(134, 1);
									STATS::STAT_SET_INT(joaat("sp_final_decision"), 3, 1);
									break;
								
								default:
									if (!func_5(0))
									{
										iVar0 = false;
									}
									else if (iLocal_28)
									{
										if (func_4())
										{
											iLocal_28 = 0;
										}
									}
									break;
								}
							}
						}
					}
				}
		}
		wait(0);
	}
	func_3(20);
	Global_91317 = 0;
	func_1();
	func_38();
}
예제 #12
0
void func_4(char* sParam0, char* sParam1, auto uParam2, int iParam3, int iParam4, int iParam5, int iParam6, int iParam7, int iParam8, auto uParam9)
{
	int iVar0;
	
	if (GAMEPLAY::ARE_STRINGS_EQUAL(sParam0, ""))
	{
		return;
	}
	if (iParam3 < 0)
	{
		return;
	}
	if (iParam5 < 500 && iParam5 != -1)
	{
		return;
	}
	if (iParam4 < 0 && iParam4 != -1)
	{
		return;
	}
	if (iParam6 < 1 || iParam6 > 7)
	{
		return;
	}
	if (iParam7 == 235)
	{
		return;
	}
	if (iParam8 == 235)
	{
		return;
	}
	iVar0 = 0;
	while (iVar0 < Global_101154.f_24935.f_145)
	{
		if (GAMEPLAY::ARE_STRINGS_EQUAL(&(Global_101154.f_24935[iVar0 /*16*/]), sParam0))
		{
			return;
		}
		iVar0++;
	}
	if (Global_101154.f_24935.f_145 < 9)
	{
		StringCopy(&(Global_101154.f_24935[Global_101154.f_24935.f_145 /*16*/]), sParam0, 16);
		StringCopy(&(Global_101154.f_24935[Global_101154.f_24935.f_145 /*16*/].f_4), sParam1, 16);
		Global_101154.f_24935[Global_101154.f_24935.f_145 /*16*/].f_8 = GAMEPLAY::GET_GAME_TIMER() + iParam3;
		Global_101154.f_24935[Global_101154.f_24935.f_145 /*16*/].f_9 = iParam5;
		Global_101154.f_24935[Global_101154.f_24935.f_145 /*16*/].f_11 = iParam6;
		Global_101154.f_24935[Global_101154.f_24935.f_145 /*16*/].f_12 = uParam2;
		Global_101154.f_24935[Global_101154.f_24935.f_145 /*16*/].f_13 = iParam7;
		Global_101154.f_24935[Global_101154.f_24935.f_145 /*16*/].f_14 = iParam8;
		Global_101154.f_24935[Global_101154.f_24935.f_145 /*16*/].f_15 = uParam9;
		if (iParam4 != -1)
		{
			Global_101154.f_24935[Global_101154.f_24935.f_145 /*16*/].f_10 = GAMEPLAY::GET_GAME_TIMER() + iParam3 + iParam4;
		}
		else
		{
			Global_101154.f_24935[Global_101154.f_24935.f_145 /*16*/].f_10 = -1;
		}
		Global_101154.f_24935.f_145++;
		func_5();
	}
}
예제 #13
0
void main()
{
	Vector3 vVar0;
	Vector3 vVar3;
	
	iLocal_2 = 1;
	iLocal_3 = 134;
	iLocal_4 = 134;
	iLocal_5 = 1;
	iLocal_6 = 1;
	iLocal_7 = 1;
	iLocal_8 = 134;
	iLocal_9 = 1;
	iLocal_10 = 12;
	iLocal_11 = 12;
	fLocal_14 = 0.001f;
	iLocal_17 = -1;
	sLocal_18 = "NULL";
	fLocal_21 = 0f;
	fLocal_25 = -0.0375f;
	fLocal_26 = 0.17f;
	fLocal_30 = 80f;
	fLocal_31 = 140f;
	fLocal_32 = 180f;
	iLocal_35 = 3;
	iLocal_85 = -1;
	iLocal_86 = -1;
	if (PLAYER::HAS_FORCE_CLEANUP_OCCURRED(19))
	{
		func_55();
	}
	if (!func_52())
	{
		func_55();
	}
	if (!func_51(iLocal_82))
	{
		func_55();
	}
	else
	{
		func_50();
		iLocal_83 = GAMEPLAY::GET_GAME_TIMER();
		iLocal_85 = func_49();
		iLocal_84 = 0;
		func_48(1, &uLocal_88);
	}
	while (true)
	{
		if (!PED::IS_PED_INJURED(PLAYER::PLAYER_PED_ID()))
		{
			if (!func_51(iLocal_82))
			{
				func_55();
			}
			vVar0 = {ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), 1)};
			vVar3 = {ENTITY::GET_ENTITY_COORDS(iLocal_82, 1)};
			if (vdist2(vVar0, vVar3) >= 100f * 100f)
			{
				func_55();
			}
			switch (iLocal_87)
			{
				case 0:
					func_43(vVar3, vVar0, 18000, 1101004800);
					if (func_25(&iLocal_82, 0))
					{
						func_24();
						func_16(0);
						func_12(vVar3, vVar0);
						request_anim_dict(func_11());
						iLocal_87 = 1;
					}
					break;
				
				case 1:
					if (func_5(&iLocal_82, &iLocal_79, &iLocal_86))
					{
						iLocal_87 = 2;
					}
					break;
				
				case 2:
					if (!func_4(iLocal_82, 1805844857) && !is_ped_fleeing(iLocal_82))
					{
						if (!is_entity_playing_anim(iLocal_82, func_11(), func_3(), 3))
						{
							func_1();
						}
					}
					else
					{
						func_55();
					}
					break;
				}
		}
		wait(0);
	}
}
예제 #14
0
void func_4()
{
	int iVar0;
	
	switch (iLocal_88)
	{
		case 0:
			vLocal_61[0 /*3*/] = {-1542.113f, -3023.802f, 23.2538f};
			vLocal_61[1 /*3*/] = {-3089.888f, -1960.075f, 313.559f};
			vLocal_61[2 /*3*/] = {-1037.638f, -3316.12f, 23.2475f};
			vLocal_61[3 /*3*/] = {451.174f, -4009.46f, 135.1171f};
			vLocal_74 = {-1612.174f, -2688.442f, 12.9444f};
			if (!PED::IS_PED_INJURED(PLAYER::PLAYER_PED_ID()))
			{
				if ((is_ped_in_any_heli(PLAYER::PLAYER_PED_ID()) || is_ped_in_any_plane(PLAYER::PLAYER_PED_ID())) || is_player_wanted_level_greater(player_id(), 0))
				{
					iLocal_78 = false;
				}
				else
				{
					iLocal_78 = true;
				}
			}
			iLocal_88 = 1;
			break;
		
		case 1:
			STREAMING::REQUEST_MODEL(joaat("jet"));
			STREAMING::REQUEST_MODEL(iLocal_84);
			request_vehicle_recording(101, "AirportJetTakeOff");
			request_vehicle_recording(103, "AirplaneLandingRedux");
			request_vehicle_recording(101, "EastWestFlight");
			request_vehicle_recording(101, "AirportNew");
			request_vehicle_recording(104, "AirplaneLandingRedux");
			iLocal_88 = 2;
			break;
		
		case 2:
			if (!iLocal_82)
			{
				if ((((((STREAMING::HAS_MODEL_LOADED(joaat("jet")) && STREAMING::HAS_MODEL_LOADED(iLocal_84)) && has_vehicle_recording_been_loaded(101, "AirportJetTakeOff")) && has_vehicle_recording_been_loaded(103, "AirplaneLandingRedux")) && has_vehicle_recording_been_loaded(101, "AirportNew")) && has_vehicle_recording_been_loaded(104, "AirplaneLandingRedux")) && has_vehicle_recording_been_loaded(101, "EastWestFlight"))
				{
					iLocal_82 = true;
				}
				else
				{
					STREAMING::REQUEST_MODEL(joaat("jet"));
					STREAMING::REQUEST_MODEL(iLocal_84);
					request_vehicle_recording(101, "AirportJetTakeOff");
					request_vehicle_recording(102, "AirportJetTakeOff");
					request_vehicle_recording(101, "AirportNew");
					request_vehicle_recording(102, "AirportNew");
					request_vehicle_recording(101, "EastWestFlight");
				}
			}
			if (iLocal_82)
			{
				if (!CAM::IS_SPHERE_VISIBLE(vLocal_61[0 /*3*/], 50f) && !CAM::IS_SPHERE_VISIBLE(vLocal_74, 50f))
				{
					iLocal_88 = 3;
				}
				else
				{
					if (CAM::IS_SPHERE_VISIBLE(vLocal_61[0 /*3*/], 50f))
					{
					}
					if (CAM::IS_SPHERE_VISIBLE(vLocal_74, 50f))
					{
					}
				}
			}
			break;
		
		case 3:
			iLocal_49[0] = create_vehicle(joaat("jet"), vLocal_61[0 /*3*/], 0, 1, true);
			set_entity_heading(iLocal_49[0], 240.3179f);
			_0x279D50DE5652D935(iLocal_49[0], 0);
			iLocal_49[1] = create_vehicle(joaat("jet"), vLocal_61[1 /*3*/], 0, 1, true);
			_0x279D50DE5652D935(iLocal_49[1], 0);
			iLocal_49[2] = create_vehicle(joaat("jet"), vLocal_61[2 /*3*/], 0, 1, true);
			_0x279D50DE5652D935(iLocal_49[2], 0);
			iLocal_49[3] = create_vehicle(joaat("jet"), vLocal_61[3 /*3*/], 0, 1, true);
			_0x279D50DE5652D935(iLocal_49[3], 0);
			iVar0 = 0;
			while (iVar0 < 4)
			{
				if (ENTITY::DOES_ENTITY_EXIST(iLocal_49[iVar0]))
				{
					iLocal_55[iVar0] = PED::CREATE_PED_inside_vehicle(iLocal_49[iVar0], 4, iLocal_84, -1, 1, true);
					set_entity_lod_dist(iLocal_49[iVar0], 1000);
					set_vehicle_engine_on(iLocal_49[iVar0], true, 1, 0);
					set_blocking_of_non_temporary_events(iLocal_55[iVar0], true);
				}
				iVar0++;
			}
			func_8(&(iLocal_49[1]), &(iLocal_55[1]));
			func_8(&(iLocal_49[2]), &(iLocal_55[2]));
			func_8(&(iLocal_49[3]), &(iLocal_55[3]));
			if (iLocal_78)
			{
				if (ENTITY::DOES_ENTITY_EXIST(iLocal_49[0]))
				{
					if (has_vehicle_recording_been_loaded(101, "AirportJetTakeOff"))
					{
						start_playback_recorded_vehicle_with_flags(iLocal_49[0], 101, "AirportJetTakeOff", 2, 5, 786603);
						iLocal_77 = 1;
					}
					else
					{
						request_vehicle_recording(101, "AirportJetTakeOff");
					}
				}
			}
			iLocal_88 = 4;
			break;
		
		case 4:
			if (iLocal_81)
			{
				if (ENTITY::DOES_ENTITY_EXIST(iLocal_49[3]) && !ENTITY::IS_ENTITY_DEAD(iLocal_49[3], 0))
				{
					if (ENTITY::IS_ENTITY_OCCLUDED(iLocal_49[3]))
					{
						if (!iLocal_79)
						{
							func_8(&(iLocal_49[3]), &(iLocal_55[3]));
							iLocal_79 = 1;
						}
					}
				}
			}
			func_3(0);
			func_7();
			switch (iLocal_87)
			{
				case 0:
					if (!iLocal_77)
					{
						if (iLocal_78)
						{
							if (ENTITY::DOES_ENTITY_EXIST(iLocal_49[0]) && !ENTITY::IS_ENTITY_DEAD(iLocal_49[0], 0))
							{
								if (ENTITY::IS_ENTITY_OCCLUDED(iLocal_49[0]) && !CAM::IS_SPHERE_VISIBLE(vLocal_61[0 /*3*/], 50f))
								{
									if (has_vehicle_recording_been_loaded(101, "AirportJetTakeOff"))
									{
										start_playback_recorded_vehicle_with_flags(iLocal_49[0], 101, "AirportJetTakeOff", 2, 5, 786603);
										iLocal_77 = 1;
									}
									else
									{
										request_vehicle_recording(101, "AirportJetTakeOff");
									}
								}
							}
						}
					}
					if (iLocal_77)
					{
						if (ENTITY::DOES_ENTITY_EXIST(iLocal_49[0]) && !ENTITY::IS_ENTITY_DEAD(iLocal_49[0], 0))
						{
							if (is_playback_going_on_for_vehicle(iLocal_49[0]))
							{
								fLocal_85 = get_position_in_recording(iLocal_49[0]);
							}
						}
						if (fLocal_85 > 1100f)
						{
							iLocal_87 = 1;
						}
					}
					break;
				
				case 1:
					if (ENTITY::DOES_ENTITY_EXIST(iLocal_49[1]) && !ENTITY::IS_ENTITY_DEAD(iLocal_49[1], 0))
					{
						if (iLocal_78)
						{
							if (ENTITY::IS_ENTITY_OCCLUDED(iLocal_49[1]))
							{
								if (iLocal_81)
								{
									if (iLocal_79)
									{
										func_6(&(iLocal_49[1]), &(iLocal_55[1]));
										if (has_vehicle_recording_been_loaded(103, "AirplaneLandingRedux"))
										{
											start_playback_recorded_vehicle_with_flags(iLocal_49[1], 103, "AirplaneLandingRedux", 2, 5, 786603);
											iLocal_80 = 0;
											iLocal_87 = 2;
										}
										else
										{
											request_vehicle_recording(103, "AirplaneLandingRedux");
										}
									}
								}
								else
								{
									func_6(&(iLocal_49[1]), &(iLocal_55[1]));
									if (has_vehicle_recording_been_loaded(103, "AirplaneLandingRedux"))
									{
										start_playback_recorded_vehicle_with_flags(iLocal_49[1], 103, "AirplaneLandingRedux", 2, 5, 786603);
										iLocal_80 = 0;
										iLocal_87 = 2;
									}
									else
									{
										request_vehicle_recording(103, "AirplaneLandingRedux");
									}
								}
							}
						}
					}
					break;
				
				case 2:
					if (ENTITY::DOES_ENTITY_EXIST(iLocal_49[1]) && !ENTITY::IS_ENTITY_DEAD(iLocal_49[1], 0))
					{
						if (!is_playback_going_on_for_vehicle(iLocal_49[1]))
						{
							iLocal_87 = 3;
						}
					}
					break;
				
				case 3:
					if (ENTITY::DOES_ENTITY_EXIST(iLocal_49[2]) && !ENTITY::IS_ENTITY_DEAD(iLocal_49[2], 0))
					{
						if (has_vehicle_recording_been_loaded(101, "AirportNew"))
						{
							if (!CAM::IS_SPHERE_VISIBLE(vLocal_61[2 /*3*/], 50f))
							{
								if (!is_playback_going_on_for_vehicle(iLocal_49[2]))
								{
									func_6(&(iLocal_49[2]), &(iLocal_55[2]));
									start_playback_recorded_vehicle(iLocal_49[2], 101, "AirportNew", 1);
									iLocal_87 = 4;
								}
							}
						}
					}
					break;
				
				case 4:
					if (ENTITY::DOES_ENTITY_EXIST(iLocal_49[2]) && !ENTITY::IS_ENTITY_DEAD(iLocal_49[2], 0))
					{
						if (is_playback_going_on_for_vehicle(iLocal_49[2]))
						{
							fLocal_86 = get_position_in_recording(iLocal_49[2]);
						}
					}
					if (ENTITY::DOES_ENTITY_EXIST(iLocal_49[1]) && !ENTITY::IS_ENTITY_DEAD(iLocal_49[1], 0))
					{
						if (!is_playback_going_on_for_vehicle(iLocal_49[1]))
						{
							if (ENTITY::IS_ENTITY_OCCLUDED(iLocal_49[1]))
							{
								func_8(&(iLocal_49[1]), &(iLocal_55[1]));
								iLocal_80 = 1;
							}
						}
					}
					if (fLocal_86 > 1100f)
					{
						if (ENTITY::DOES_ENTITY_EXIST(iLocal_49[3]) && !ENTITY::IS_ENTITY_DEAD(iLocal_49[3], 0))
						{
							if (has_vehicle_recording_been_loaded(104, "AirplaneLandingRedux"))
							{
								if (!CAM::IS_SPHERE_VISIBLE(vLocal_61[3 /*3*/], 50f))
								{
									if (!is_playback_going_on_for_vehicle(iLocal_49[3]) && iLocal_80)
									{
										func_6(&(iLocal_49[3]), &(iLocal_55[3]));
										start_playback_recorded_vehicle(iLocal_49[3], 104, "AirplaneLandingRedux", 1);
										iLocal_87 = 5;
									}
								}
							}
						}
					}
					break;
				
				case 5:
					if (ENTITY::DOES_ENTITY_EXIST(iLocal_49[3]) && !ENTITY::IS_ENTITY_DEAD(iLocal_49[3], 0))
					{
						if (!is_playback_going_on_for_vehicle(iLocal_49[3]))
						{
							func_5();
							iLocal_87 = 0;
						}
					}
					break;
			}
			break;
	}
}
예제 #15
0
void func_1()
{
	Vector3 vVar0;
	Vector3 vVar3;
	
	vVar0 = {1.5f, 1.5f, 1.5f};
	switch (iLocal_322)
	{
		case 0:
			if (Global_1572920 == 8)
			{
				Global_1572920 = -1;
			}
			if (func_63() == 5)
			{
				iLocal_326 = network_create_synchronised_scene(vLocal_343, vLocal_346, 2, false, true, 1f, 0f, 1f);
				network_add_ped_to_synchronised_scene(PLAYER::PLAYER_PED_ID(), iLocal_326, sLocal_329, sLocal_331, 8f, -2f, 261, 0, 1000f, 0);
				network_start_synchronised_scene(iLocal_326);
				iLocal_322 = 7;
			}
			else if (func_48(8))
			{
				if ((((func_44(vLocal_339, vVar0) && get_interior_from_entity(PLAYER::PLAYER_PED_ID()) == get_interior_at_coords(vLocal_339)) && is_entity_in_angled_area(PLAYER::PLAYER_PED_ID(), vLocal_333, vLocal_336, 2f, 0, true, 0)) && func_43()) && !func_40(player_id()))
				{
					if (iLocal_328 == -1)
					{
						func_39(&iLocal_328, 3, "SA_BED_IN", 0, 0, 0, 0);
					}
					iLocal_322 = 1;
				}
			}
			break;
		
		case 1:
			if (func_38(1, 0, 1))
			{
				if (((((func_44(vLocal_339, vVar0) && func_48(8)) && get_interior_from_entity(PLAYER::PLAYER_PED_ID()) == get_interior_at_coords(vLocal_339)) && is_entity_in_angled_area(PLAYER::PLAYER_PED_ID(), vLocal_333, vLocal_336, 2f, 0, true, 0)) && func_43()) && !func_40(player_id()))
				{
					if (func_36(iLocal_328, 1))
					{
						func_34(&iLocal_328);
						func_33();
						Global_1572920 = 8;
						if (func_32("SA_BED_IN"))
						{
							clear_help(1);
						}
						clear_area_of_projectiles(vLocal_339, 3f, 0);
						func_27(player_id(), 0, 256);
						iLocal_36 = 1;
						func_26();
						WEAPON::SET_CURRENT_PED_WEAPON(PLAYER::PLAYER_PED_ID(), joaat("weapon_unarmed"), true);
						func_16(1, 1, 1, 0);
						vLocal_339 = {get_anim_initial_offset_position(sLocal_329, sLocal_330, vLocal_343, vLocal_346, 0, 2)};
						vVar3 = {get_anim_initial_offset_rotation(sLocal_329, sLocal_330, vLocal_343, vLocal_346, 0, 2)};
						fLocal_342 = vVar3.z;
						task_go_straight_to_coord(PLAYER::PLAYER_PED_ID(), vLocal_339, 1f, 5000, fLocal_342, 0.05f);
						if (get_follow_ped_cam_view_mode() == 4)
						{
							set_ped_desired_heading(PLAYER::PLAYER_PED_ID(), func_15(ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), 1), ENTITY::GET_ENTITY_COORDS(iLocal_41, 1)));
							force_ped_motion_state(PLAYER::PLAYER_PED_ID(), 1063765679, false, 0, 0);
							set_ped_reset_flag(PLAYER::PLAYER_PED_ID(), 69, true);
						}
						iLocal_322 = 2;
					}
				}
				else
				{
					func_34(&iLocal_328);
					if (func_32("SA_BED_IN"))
					{
						clear_help(1);
					}
					iLocal_322 = 0;
				}
			}
			break;
		
		case 2:
			func_14();
			func_11();
			hide_hud_and_radar_this_frame();
			if (get_follow_ped_cam_view_mode() == 4)
			{
				set_ped_desired_heading(PLAYER::PLAYER_PED_ID(), func_15(ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), 1), ENTITY::GET_ENTITY_COORDS(iLocal_41, 1)));
				set_ped_reset_flag(PLAYER::PLAYER_PED_ID(), 69, true);
			}
			if (AI::GET_SCRIPT_TASK_STATUS(PLAYER::PLAYER_PED_ID(), 2106541073) != 1)
			{
				iLocal_326 = network_create_synchronised_scene(vLocal_343, vLocal_346, 2, false, false, 1f, 0f, 1f);
				network_add_ped_to_synchronised_scene(PLAYER::PLAYER_PED_ID(), iLocal_326, sLocal_329, sLocal_330, 4f, -2f, 261, 0, 1000f, 0);
				network_start_synchronised_scene(iLocal_326);
				iLocal_322 = 3;
			}
			break;
		
		case 3:
			func_14();
			func_11();
			hide_hud_and_radar_this_frame();
			iLocal_327 = _0x02C40BF885C567B6(iLocal_326);
			if (is_synchronized_scene_running(iLocal_327))
			{
				iLocal_322 = 4;
			}
			break;
		
		case 4:
			func_14();
			func_11();
			hide_hud_and_radar_this_frame();
			if (get_synchronized_scene_phase(iLocal_327) > 0.9f)
			{
				iLocal_326 = network_create_synchronised_scene(vLocal_343, vLocal_346, 2, false, true, 1f, 0f, 1f);
				network_add_ped_to_synchronised_scene(PLAYER::PLAYER_PED_ID(), iLocal_326, sLocal_329, sLocal_331, 8f, -2f, 261, 0, 1000f, 0);
				network_start_synchronised_scene(iLocal_326);
				iLocal_322 = 5;
			}
			break;
		
		case 5:
			func_14();
			func_11();
			hide_hud_and_radar_this_frame();
			iLocal_327 = _0x02C40BF885C567B6(iLocal_326);
			if (is_synchronized_scene_running(iLocal_327))
			{
				set_synchronized_scene_looped(iLocal_327, true);
				if (!func_32("SA_BED_OUT"))
				{
					func_10("SA_BED_OUT");
				}
				iLocal_322 = 6;
			}
			break;
		
		case 6:
			func_14();
			func_11();
			hide_hud_and_radar_this_frame();
			if (!func_9(1))
			{
				if (!func_32("SA_BED_OUT"))
				{
					func_10("SA_BED_OUT");
				}
			}
			else if (func_32("SA_BED_OUT"))
			{
				clear_help(1);
			}
			if (!func_40(player_id()) && is_control_just_pressed(2, 222))
			{
				if (func_32("SA_BED_OUT"))
				{
					clear_help(1);
				}
				func_8();
				iLocal_326 = network_create_synchronised_scene(vLocal_343, vLocal_346, 2, false, false, 1f, 0f, 1f);
				network_add_ped_to_synchronised_scene(PLAYER::PLAYER_PED_ID(), iLocal_326, sLocal_329, sLocal_332, 2f, -2f, 261, 0, 1000f, 0);
				network_start_synchronised_scene(iLocal_326);
				iLocal_322 = 8;
			}
			break;
		
		case 7:
			if (((is_interior_ready(get_interior_at_coords(vLocal_339)) && !func_7()) && !func_5()) && Global_1312466.f_8 == 0)
			{
				iLocal_324 = true;
				iLocal_326 = network_create_synchronised_scene(vLocal_343, vLocal_346, 2, false, false, 1f, 0f, 1f);
				network_add_ped_to_synchronised_scene(PLAYER::PLAYER_PED_ID(), iLocal_326, sLocal_329, sLocal_332, 1000f, -2f, 261, 0, 1000f, 0);
				network_start_synchronised_scene(iLocal_326);
				iLocal_322 = 8;
			}
			break;
		
		case 8:
			if (!iLocal_324)
			{
				func_14();
				func_11();
				hide_hud_and_radar_this_frame();
			}
			iLocal_327 = _0x02C40BF885C567B6(iLocal_326);
			if (is_synchronized_scene_running(iLocal_327))
			{
				func_4(5);
				iLocal_322 = 9;
			}
			break;
		
		case 9:
			func_14();
			hide_hud_and_radar_this_frame();
			func_3(0);
			if (!is_synchronized_scene_running(iLocal_327))
			{
				func_2();
				if (iLocal_36)
				{
					func_27(player_id(), 1, 0);
					iLocal_36 = 0;
				}
				func_16(0, 1, 1, 0);
				iLocal_322 = 0;
				Global_1572920 = -1;
			}
			break;
	}
}