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
int main (void)
{
  g_85[0][0] = &g_34;
  g_85[1][0] = &g_34;
  func_4(1);
  return 0;
} 
bool func_5(int iParam0, int iParam1, int iParam2)
{
	int iVar0;
	
	if (func_51(*iParam0))
	{
		if (is_entity_playing_anim(*iParam0, func_10(), func_9(), 3))
		{
			if (!PED::IS_PED_RAGDOLL(*iParam0) || is_ped_getting_up(*iParam0))
			{
				request_anim_dict(func_11());
				if (has_anim_dict_loaded(func_11()))
				{
					*iParam2 = create_synchronized_scene(2727.4f, 4145.56f, 43.68f, 0f, 0f, -92.17f, 2);
					set_synchronized_scene_looped(*iParam2, false);
					_0x394B9CD12435C981(*iParam2, false);
					if (func_4(*iParam0, 1785177548))
					{
						stop_synchronized_entity_anim(*iParam0, -1000f, 1);
					}
					task_synchronized_scene(*iParam0, *iParam2, func_11(), func_3(), 1000f, -4f, 4626, 0, 1000f, 0);
					_0x2208438012482A1A(*iParam0, 0, 0);
					if (func_8(*iParam1))
					{
						if (is_entity_playing_anim(*iParam1, func_10(), func_7(), 3))
						{
							stop_synchronized_entity_anim(*iParam1, -16f, 0);
						}
						iVar0 = 0;
						iVar0 += 16;
						iVar0 += 64;
						iVar0 += 512;
						iVar0 += 4096;
						play_synchronized_entity_anim(*iParam1, *iParam2, func_6(), func_11(), 16f, -4f, iVar0, 1000f);
					}
					return true;
				}
			}
			else
			{
				return true;
			}
		}
		else
		{
			return true;
		}
	}
	return false;
}
Пример #4
0
/* 
 * reads : g_8 g_11 g_23 g_48 g_54 g_52 g_57
 * writes: g_23 g_11 g_48 g_54 g_8
 */
static int32_t  func_1(void)
{ /* block id: 0 */
    uint32_t l_6 = 0x36444696L;
    int32_t l_69 = 0x3A649E5AL;
    int32_t l_70[7][2];
    uint16_t l_71[2][7];
    int i, j;
    for (i = 0; i < 7; i++)
    {
        for (j = 0; j < 2; j++)
            l_70[i][j] = 2L;
    }
    for (i = 0; i < 2; i++)
    {
        for (j = 0; j < 7; j++)
            l_71[i][j] = 0UL;
    }
    if (((uint8_t)(func_4(l_6) | 0xA781B38CL) << (uint8_t)g_52[1]))
    { /* block id: 31 */
        uint32_t l_60 = 0UL;
        (*g_57) = g_8;
        if ((((int16_t)0x2088L + (int16_t)0x5077L) , l_60))
        { /* block id: 33 */
            volatile int32_t *l_62[6];
            volatile int32_t **l_61 = &l_62[2];
            int i;
            for (i = 0; i < 6; i++)
                l_62[i] = &g_8;
            (*l_61) = &g_8;
        }
        else
        { /* block id: 35 */
            int32_t l_63[7];
            int32_t *l_64 = &g_11;
            int i;
            for (i = 0; i < 7; i++)
                l_63[i] = (-1L);
            (*l_64) = ((g_52[4] , 0L) , l_63[6]);
        }
    }
    else
    { /* block id: 38 */
        int32_t *l_68[3][3] = {{&g_11,&g_11,&g_11},{&g_11,&g_11,&g_11},{&g_11,&g_11,&g_11}};
        int i, j;
        (*g_57) ^= ((int32_t)(-3L) - (int32_t)l_6);
        ++l_71[1][2];
    }
    return l_6;
}
Пример #5
0
/* 
 * reads : g_2 g_3 g_9 g_7 g_10
 * writes: g_9 g_10 g_7
 */
struct S2  func_1(void)
{ /* block id: 0 */
    int8_t l_11 = -6L;
    if (g_2[0])
    { /* block id: 1 */
        return g_3;
    }
    else
    { /* block id: 3 */
        struct S2 l_12 = {0x245C2F1FCC1031C3LL,0xB586L,0xA66FL};
        g_10[3] = func_4(((*g_9) | (*g_9)));
        (*g_9) = l_11;
        return l_12;
    }
}
Пример #6
0
int main(int argc, char* argv[])
{
    int list[] = {11, 12, 13, 14, 15, 16};
    func_4(list); 
    return 0;
}
Пример #7
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;
}
Пример #8
0
int main(void)
{
  func_4(0);
  return 0;
}
Пример #9
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();
}
Пример #10
0
void main()
{
	Vector3 vVar0;
	Vector3 vVar3;
	Vector3 vVar6;
	float fVar9;
	
	if (PLAYER::HAS_FORCE_CLEANUP_OCCURRED(2))
	{
		func_4();
	}
	if (ENTITY::DOES_ENTITY_EXIST(iLocal_10))
	{
		ENTITY::FREEZE_ENTITY_POSITION(iLocal_10, true);
		vLocal_4 = {ENTITY::GET_ENTITY_COORDS(iLocal_10, 1)};
		vLocal_7 = {get_entity_rotation(iLocal_10, 2)};
	}
	while (true)
	{
		wait(0);
		if (ENTITY::DOES_ENTITY_EXIST(iLocal_10))
		{
			if (is_object_within_brain_activation_range(iLocal_10))
			{
				switch (iLocal_2)
				{
					case 0:
						if (does_entity_have_drawable(iLocal_10))
						{
							STREAMING::REQUEST_MODEL(joaat("p_abat_roller_1_col"));
							if (STREAMING::HAS_MODEL_LOADED(joaat("p_abat_roller_1_col")))
							{
								if (!func_3(vLocal_4, 0f, 0f, 0f, 0))
								{
									iLocal_3 = create_object(joaat("p_abat_roller_1_col"), vLocal_4, 1, true, false);
									ENTITY::SET_ENTITY_ROTATION(iLocal_3, vLocal_7, 2, 1);
									iLocal_2 = 1;
								}
							}
						}
						break;
					
					case 1:
						if (does_entity_have_drawable(iLocal_10))
						{
							if (_get_number_of_instances_of_streamed_script(joaat("michael2")) > 0)
							{
								request_anim_dict("map_objects");
								if (has_anim_dict_loaded("map_objects"))
								{
									iLocal_2 = 2;
								}
							}
						}
						break;
					
					case 2:
						if (does_entity_have_drawable(iLocal_10))
						{
							if (_get_number_of_instances_of_streamed_script(joaat("michael2")) > 0)
							{
								if (Global_88042)
								{
									if (has_anim_dict_loaded("map_objects"))
									{
										play_entity_anim(iLocal_10, "P_Abat_roller_1_open", "map_objects", 1f, false, 1, 0, 0f, 0);
										iLocal_2 = 3;
									}
								}
							}
						}
						break;
					
					case 3:
						fVar9 = 0.35f;
						vVar0 = {vLocal_4 + Vector(3.45f, 0f, 0f)};
						if (ENTITY::DOES_ENTITY_EXIST(iLocal_3))
						{
							vVar3 = {ENTITY::GET_ENTITY_COORDS(iLocal_3, 1)};
							if (!func_2(vVar3, vVar0, 0.1f, 0))
							{
								vVar6 = {vVar0 - vVar3};
								set_entity_coords(iLocal_3, vVar3 + func_1(vVar6) * FtoV(get_frame_time()) * Vector(fVar9, fVar9, fVar9), 1, false, 0, 1);
							}
							else
							{
								Global_88043 = 1;
								iLocal_2 = 4;
							}
						}
						break;
					
					case 4:
						break;
				}
			}
			else
			{
				func_4();
			}
		}
		else
		{
			func_4();
		}
	}
}
Пример #11
0
void func_3(char* sParam0, int iParam1, int iParam2, int iParam3, int iParam4, int iParam5, int iParam6, int iParam7, int iParam8)
{
	func_4(sParam0, "", iParam1, iParam2, iParam3, iParam4, iParam5, iParam6, iParam7, iParam8);
}
Пример #12
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);
	}
}
Пример #13
0
void main()
{
	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 = 3;
	fLocal_31 = 80f;
	fLocal_32 = 140f;
	fLocal_33 = 180f;
	iLocal_39 = 1;
	iLocal_40 = 65;
	iLocal_41 = 49;
	iLocal_42 = 64;
	iLocal_78 = true;
	iLocal_84 = joaat("s_m_m_pilot_01");
	iLocal_99 = 500;
	if (PLAYER::HAS_FORCE_CLEANUP_OCCURRED(3))
	{
		func_12();
	}
	iLocal_97 = PLAYER::PLAYER_PED_ID();
	while (true)
	{
		if (ENTITY::IS_ENTITY_DEAD(iLocal_97, 0))
		{
			iLocal_98 = 5;
		}
		switch (iLocal_98)
		{
			case 0:
				iLocal_98 = 1;
				break;
			
			case 1:
				func_11();
				iLocal_98 = 2;
				break;
			
			case 2:
				if (func_10())
				{
					iLocal_98 = 3;
				}
				break;
			
			case 3:
				func_9();
				iLocal_98 = 4;
				break;
			
			case 4:
				if (Global_88539)
				{
					iLocal_98 = 5;
				}
				func_4();
				break;
			
			case 5:
				func_1();
				func_12();
				break;
		}
		wait(iLocal_99);
	}
}
Пример #14
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;
	}
}