#region Local Var
	int iLocal_0 = 0;
	var uLocal_1 = 0;
	var uLocal_2 = 0;
	int iLocal_3 = 0;
	int iLocal_4 = 0;
	int iLocal_5 = 0;
	int iLocal_6 = 0;
	int iLocal_7 = 0;
	int iLocal_8 = 0;
	int iLocal_9 = 0;
	int iLocal_10 = 0;
	int iLocal_11 = 0;
	int iLocal_12 = 0;
	var uLocal_13 = 0;
	var uLocal_14 = 0;
	float fLocal_15 = 0f;
	var uLocal_16 = 0;
	var uLocal_17 = 0;
	int iLocal_18 = 0;
	var uLocal_19 = 0;
	var uLocal_20 = 0;
	char* sLocal_21 = NULL;
	var uLocal_22 = 0;
	var uLocal_23 = 0;
	float fLocal_24 = 0f;
	float fLocal_25 = 0f;
	float fLocal_26 = 0f;
	var uLocal_27 = 0;
	var uLocal_28 = 0;
	float fLocal_29 = 0f;
	var uLocal_30 = 0;
	var uLocal_31 = 0;
	var uLocal_32 = 0;
	float fLocal_33 = 0f;
	float fLocal_34 = 0f;
	var uLocal_35 = 0;
	var uLocal_36 = 0;
	var uLocal_37 = 0;
	var uLocal_38 = 0;
	var uLocal_39 = 0;
	int iLocal_40 = 0;
	int iLocal_41 = 0;
	int iLocal_42 = 0;
	int iLocal_43 = 0;
	var uLocal_44 = 0;
	var uLocal_45 = 0;
	var uLocal_46 = 0;
	int iLocal_47 = 0;
	int iLocal_48 = 0;
	int iLocal_49 = 0;
	int iLocal_50 = 0;
	int iLocal_51 = 0;
	int iLocal_52 = 0;
	int iLocal_53 = 0;
	int iLocal_54 = 0;
	int iLocal_55 = 0;
	int iLocal_56 = 0;
	int iLocal_57 = 0;
	int iLocal_58 = 0;
	int iLocal_59 = 0;
	vector3 vLocal_60 = { 0f, 0f, 0f };
	vector3 vLocal_63 = { 0f, 0f, 0f };
	float fLocal_66 = 0f;
	var uLocal_67 = 0;
	var uLocal_68 = 0;
	var uLocal_69 = 0;
	var uLocal_70 = 0;
	var uLocal_71 = 0;
	var uLocal_72 = 0;
	var uLocal_73 = 16;
	var uLocal_74 = 0;
	var uLocal_75 = 0;
	var uLocal_76 = 0;
	var uLocal_77 = 0;
	var uLocal_78 = 0;
	var uLocal_79 = 0;
	var uLocal_80 = 0;
	var uLocal_81 = 0;
	var uLocal_82 = 0;
	var uLocal_83 = 0;
	var uLocal_84 = 0;
	var uLocal_85 = 0;
	var uLocal_86 = 0;
	var uLocal_87 = 0;
	var uLocal_88 = 0;
	var uLocal_89 = 0;
	var uLocal_90 = 0;
	var uLocal_91 = 0;
	var uLocal_92 = 0;
	var uLocal_93 = 0;
	var uLocal_94 = 0;
	var uLocal_95 = 0;
	var uLocal_96 = 0;
	var uLocal_97 = 0;
	var uLocal_98 = 0;
	var uLocal_99 = 0;
	var uLocal_100 = 0;
	var uLocal_101 = 0;
	var uLocal_102 = 0;
	var uLocal_103 = 0;
	var uLocal_104 = 0;
	var uLocal_105 = 0;
	var uLocal_106 = 0;
	var uLocal_107 = 0;
	var uLocal_108 = 0;
	var uLocal_109 = 0;
	var uLocal_110 = 0;
	var uLocal_111 = 0;
	var uLocal_112 = 0;
	var uLocal_113 = 0;
	var uLocal_114 = 0;
	var uLocal_115 = 0;
	var uLocal_116 = 0;
	var uLocal_117 = 0;
	var uLocal_118 = 0;
	var uLocal_119 = 0;
	var uLocal_120 = 0;
	var uLocal_121 = 0;
	var uLocal_122 = 0;
	var uLocal_123 = 0;
	var uLocal_124 = 0;
	var uLocal_125 = 0;
	var uLocal_126 = 0;
	var uLocal_127 = 0;
	var uLocal_128 = 0;
	var uLocal_129 = 0;
	var uLocal_130 = 0;
	var uLocal_131 = 0;
	var uLocal_132 = 0;
	var uLocal_133 = 0;
	var uLocal_134 = 0;
	var uLocal_135 = 0;
	var uLocal_136 = 0;
	var uLocal_137 = 0;
	var uLocal_138 = 0;
	var uLocal_139 = 0;
	var uLocal_140 = 0;
	var uLocal_141 = 0;
	var uLocal_142 = 0;
	var uLocal_143 = 0;
	var uLocal_144 = 0;
	var uLocal_145 = 0;
	var uLocal_146 = 0;
	var uLocal_147 = 0;
	var uLocal_148 = 0;
	var uLocal_149 = 0;
	var uLocal_150 = 0;
	var uLocal_151 = 0;
	var uLocal_152 = 0;
	var uLocal_153 = 0;
	var uLocal_154 = 0;
	var uLocal_155 = 0;
	var uLocal_156 = 0;
	var uLocal_157 = 0;
	var uLocal_158 = 0;
	var uLocal_159 = 0;
	var uLocal_160 = 0;
	var uLocal_161 = 0;
	var uLocal_162 = 0;
	var uLocal_163 = 0;
	var uLocal_164 = 0;
	var uLocal_165 = 0;
	var uLocal_166 = 0;
	var uLocal_167 = 0;
	var uLocal_168 = 0;
	var uLocal_169 = 0;
	var uLocal_170 = 0;
	var uLocal_171 = 0;
	var uLocal_172 = 0;
	var uLocal_173 = 0;
	var uLocal_174 = 0;
	var uLocal_175 = 0;
	var uLocal_176 = 0;
	var uLocal_177 = 0;
	var uLocal_178 = 0;
	var uLocal_179 = 0;
	var uLocal_180 = 0;
	var uLocal_181 = 0;
	var uLocal_182 = 0;
	var uLocal_183 = 0;
	var uLocal_184 = 0;
	var uLocal_185 = 0;
	var uLocal_186 = 0;
	var uLocal_187 = 0;
	var uLocal_188 = 0;
	var uLocal_189 = 0;
	var uLocal_190 = 0;
	var uLocal_191 = 0;
	var uLocal_192 = 0;
	var uLocal_193 = 0;
	var uLocal_194 = 0;
	var uLocal_195 = 0;
	var uLocal_196 = 0;
	var uLocal_197 = 0;
	var uLocal_198 = 0;
	var uLocal_199 = 0;
	var uLocal_200 = 0;
	var uLocal_201 = 0;
	var uLocal_202 = 0;
	var uLocal_203 = 0;
	var uLocal_204 = 0;
	var uLocal_205 = 0;
	var uLocal_206 = 0;
	var uLocal_207 = 0;
	var uLocal_208 = 0;
	var uLocal_209 = 0;
	var uLocal_210 = 0;
	var uLocal_211 = 0;
	var uLocal_212 = 0;
	var uLocal_213 = 0;
	var uLocal_214 = 0;
	var uLocal_215 = 0;
	var uLocal_216 = 0;
	var uLocal_217 = 0;
	var uLocal_218 = 0;
	var uLocal_219 = 0;
	var uLocal_220 = 0;
	var uLocal_221 = 0;
	var uLocal_222 = 0;
	var uLocal_223 = 0;
	var uLocal_224 = 0;
	var uLocal_225 = 0;
	var uLocal_226 = 0;
	var uLocal_227 = 0;
	var uLocal_228 = 0;
	var uLocal_229 = 0;
	var uLocal_230 = 0;
	var uLocal_231 = 0;
	var uLocal_232 = 0;
	var uLocal_233 = 0;
	var uLocal_234 = 0;
	var uLocal_235 = 0;
	var uLocal_236 = 0;
	var uLocal_237 = 0;
	int iLocal_238 = 0;
	int iLocal_239 = 0;
	int iLocal_240 = 0;
	int iLocal_241 = 0;
	struct<57> Local_242 = { 0, 0, 0, -1281684762, 0, 0, -163714847, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } ;
	struct<5> Local_299[2];
	struct<20> Local_310 = { 0, -1, -1, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, -1, 0, 0, -1 } ;
#endregion

void __EntryFunction__()//Position - 0x0
{
	iLocal_0 = 3;
	iLocal_3 = 1;
	iLocal_4 = 134;
	iLocal_5 = 134;
	iLocal_6 = 1;
	iLocal_7 = 1;
	iLocal_8 = 1;
	iLocal_9 = 134;
	iLocal_10 = 1;
	iLocal_11 = 12;
	iLocal_12 = 12;
	fLocal_15 = 0.001f;
	iLocal_18 = -1;
	sLocal_21 = "NULL";
	fLocal_24 = 80f;
	fLocal_25 = 140f;
	fLocal_26 = 180f;
	fLocal_29 = 0f;
	fLocal_33 = -0.0375f;
	fLocal_34 = 0.17f;
	iLocal_40 = 1;
	iLocal_41 = 65;
	iLocal_42 = 49;
	iLocal_43 = 64;
	if (network::network_is_game_in_progress())
	{
		func_100(Local_310);
	}
	while (true)
	{
		func_99();
		if (func_89())
		{
			func_85();
		}
		if (network::network_is_game_in_progress())
		{
			func_84();
			switch (func_83(network::participant_id_to_int()))
			{
				case 0:
					if (func_82() > 0)
					{
						Local_299[network::participant_id_to_int() /*5*/] = 2;
					}
					break;
				
				case 2:
					if (func_82() == 3)
					{
						Local_299[network::participant_id_to_int() /*5*/] = 3;
					}
					break;
				
				case 3:
					func_85();
					break;
			}
			if (network::network_is_host_of_this_script())
			{
				switch (func_82())
				{
					case 0:
						Local_242 = 2;
						break;
					
					case 2:
						func_1();
						break;
					
					case 3:
						break;
					}
				}
		}
	}
}

void func_1()//Position - 0x125
{
	switch (Local_242.f_1)
	{
		case 0:
			func_25();
			break;
		
		case 1:
			func_24();
			break;
	}
	if (Local_242.f_2.f_2 == 3 && iLocal_57 == 0)
	{
		Local_242 = 3;
	}
	func_17();
	if (Local_242.f_53 && Local_242.f_50 < 10)
	{
		func_12();
	}
	if (Local_242.f_50 >= 10)
	{
		if (!func_11(&uLocal_69))
		{
			func_10(&uLocal_69, 0, 0);
		}
		else if (func_9(&uLocal_69, 10000, 0))
		{
			Local_242 = 3;
		}
	}
	if (func_8())
	{
		Local_242 = 3;
	}
	if (Local_242.f_55 == 1)
	{
		if (!Local_242.f_56)
		{
			if (((!ui::is_help_message_being_displayed() || func_7("AIRSTRIKE_1")) || func_7("AIRSTRIKE_2")) || func_7("AIRSTRIKE_4"))
			{
				func_6("AIRSTRIKE_3", -1);
				Local_242.f_56 = 1;
			}
		}
	}
	if (iLocal_52)
	{
		if (!func_3(player::player_id(), 1))
		{
			Local_242 = 3;
		}
	}
	else if (func_3(player::player_id(), 1) || func_2())
	{
		Local_242 = 3;
	}
	if (cutscene::is_cutscene_playing())
	{
		Local_242 = 3;
	}
}

int func_2()//Position - 0x240
{
	return gameplay::is_bit_set(Global_1588660[player::player_id() /*532*/].f_39.f_18, 0);
}

bool func_3(int iParam0, int iParam1)//Position - 0x25C
{
	if (iParam1)
	{
		if (func_4(iParam0))
		{
			return true;
		}
	}
	if (Global_1588660[iParam0 /*532*/] == -1)
	{
		return false;
	}
	return true;
}

int func_4(var uParam0)//Position - 0x288
{
	return func_5(uParam0);
}

int func_5(var uParam0)//Position - 0x296
{
	return gameplay::is_bit_set(Global_1588660[uParam0 /*532*/].f_13.f_1, 0);
}

void func_6(char* sParam0, int iParam1)//Position - 0x2B0
{
	ui::_set_text_component_format(sParam0);
	ui::_display_help_text_from_string_label(0, 0, true, iParam1);
}

int func_7(char* sParam0)//Position - 0x2C7
{
	ui::_0x0A24DA3A41B718F5(sParam0);
	return ui::_0x10BDDBFC529428DD(0);
}

var func_8()//Position - 0x2DA
{
	return Global_1312412;
}

bool func_9(var uParam0, int iParam1, int iParam2)//Position - 0x2E6
{
	if (iParam1 == -1)
	{
		return true;
	}
	func_10(uParam0, iParam2, 0);
	if (network::network_is_game_in_progress() && !iParam2)
	{
		if (gameplay::absi(network::get_time_difference(network::get_network_time(), *uParam0)) >= iParam1)
		{
			return true;
		}
	}
	else if (gameplay::absi(network::get_time_difference(gameplay::get_game_timer(), *uParam0)) >= iParam1)
	{
		return true;
	}
	return false;
}

void func_10(var uParam0, int iParam1, int iParam2)//Position - 0x344
{
	if (uParam0->f_1 == 0)
	{
		if (network::network_is_game_in_progress() && !iParam1)
		{
			if (!iParam2)
			{
				*uParam0 = network::get_network_time();
			}
			else
			{
				*uParam0 = network::_0x89023FBBF9200E9F();
			}
		}
		else
		{
			*uParam0 = gameplay::get_game_timer();
		}
		uParam0->f_1 = 1;
	}
}

var func_11(var uParam0)//Position - 0x389
{
	return uParam0->f_1;
}

void func_12()//Position - 0x395
{
	vector3 vVar0;
	vector3 vVar3;
	int iVar6;
	
	iVar6 = 200;
	if (func_16(vLocal_63))
	{
		if (func_14(Local_242.f_2))
		{
			vLocal_63 = { entity::get_entity_coords(network::net_to_veh(Local_242.f_2), 1) };
			vLocal_63.z = (vLocal_63.y - 5f);
		}
	}
	switch (Local_242.f_50)
	{
		case 0:
			if (!func_11(&(Local_242.f_51)))
			{
				if (!gameplay::is_bit_set(iLocal_241, Local_242.f_50))
				{
					vVar0 = { Local_299[network::participant_id_to_int() /*5*/].f_2 };
					vVar0.z = vLocal_63.y;
					vVar3 = { Local_299[network::participant_id_to_int() /*5*/].f_2 };
					vVar3 = { vVar3 + Vector(0f, 0.1f, 0.1f) };
					gameplay::get_ground_z_for_3d_coord(vVar3 + Vector(10f, 0f, 0f), &(vVar3.f_2), 0);
					vVar3.z = (vVar3.y - 25f);
					gameplay::_0xBFE5756E7407064A(vVar0, vVar3, iVar6, 1, joaat("weapon_airstrike_rocket"), player::player_ped_id(), 1, 0, -1f, player::player_ped_id(), 1, 1, 0, 0);
					func_10(&(Local_242.f_51), 0, 0);
					iLocal_57 = 1;
					gameplay::set_bit(&iLocal_241, Local_242.f_50);
				}
			}
			else if (func_9(&(Local_242.f_51), 750, 0))
			{
				func_13(&(Local_242.f_51));
				Local_242.f_50++;
			}
			break;
		
		case 1:
			if (!func_11(&(Local_242.f_51)))
			{
				if (!gameplay::is_bit_set(iLocal_241, Local_242.f_50))
				{
					vVar0 = { Local_299[network::participant_id_to_int() /*5*/].f_2 + Vector(0f, 5f, 5f) };
					vVar0.z = vLocal_63.y;
					vVar3 = { Local_299[network::participant_id_to_int() /*5*/].f_2 + Vector(0f, 5f, 5f) };
					vVar3 = { vVar3 + Vector(0f, 0.1f, 0.1f) };
					gameplay::get_ground_z_for_3d_coord(vVar3 + Vector(10f, 0f, 0f), &(vVar3.f_2), 0);
					vVar3.z = (vVar3.y - 25f);
					gameplay::_0xBFE5756E7407064A(vVar0, vVar3, iVar6, 1, joaat("weapon_airstrike_rocket"), network::net_to_ped(Local_242.f_2.f_3), 1, 0, -1f, player::player_ped_id(), 1, 0, 0, 0);
					func_10(&(Local_242.f_51), 0, 0);
					gameplay::set_bit(&iLocal_241, Local_242.f_50);
				}
			}
			else if (func_9(&(Local_242.f_51), 500, 0))
			{
				func_13(&(Local_242.f_51));
				Local_242.f_50++;
			}
			break;
		
		case 2:
			if (!func_11(&(Local_242.f_51)))
			{
				if (!gameplay::is_bit_set(iLocal_241, Local_242.f_50))
				{
					vVar0 = { Local_299[network::participant_id_to_int() /*5*/].f_2 + Vector(0f, -5f, -5f) };
					vVar0.z = vLocal_63.y;
					vVar3 = { Local_299[network::participant_id_to_int() /*5*/].f_2 + Vector(0f, -5f, -5f) };
					vVar3 = { vVar3 + Vector(0f, 0.1f, 0.1f) };
					gameplay::get_ground_z_for_3d_coord(vVar3 + Vector(10f, 0f, 0f), &(vVar3.f_2), 0);
					vVar3.z = (vVar3.y - 25f);
					gameplay::_0xBFE5756E7407064A(vVar0, vVar3, iVar6, 1, joaat("weapon_airstrike_rocket"), network::net_to_ped(Local_242.f_2.f_3), 1, 0, -1f, player::player_ped_id(), 1, 0, 0, 0);
					func_10(&(Local_242.f_51), 0, 0);
					gameplay::set_bit(&iLocal_241, Local_242.f_50);
				}
			}
			else if (func_9(&(Local_242.f_51), 500, 0))
			{
				func_13(&(Local_242.f_51));
				Local_242.f_50++;
			}
			break;
		
		case 3:
			if (!func_11(&(Local_242.f_51)))
			{
				if (!gameplay::is_bit_set(iLocal_241, Local_242.f_50))
				{
					vVar0 = { Local_299[network::participant_id_to_int() /*5*/].f_2 + Vector(0f, 5f, -5f) };
					vVar0.z = vLocal_63.y;
					vVar3 = { Local_299[network::participant_id_to_int() /*5*/].f_2 + Vector(0f, 5f, -5f) };
					vVar3 = { vVar3 + Vector(0f, 0.1f, 0.1f) };
					gameplay::get_ground_z_for_3d_coord(vVar3 + Vector(10f, 0f, 0f), &(vVar3.f_2), 0);
					vVar3.z = (vVar3.y - 25f);
					gameplay::_0xBFE5756E7407064A(vVar0, vVar3, iVar6, 1, joaat("weapon_airstrike_rocket"), network::net_to_ped(Local_242.f_2.f_3), 1, 0, -1f, player::player_ped_id(), 1, 0, 0, 0);
					func_10(&(Local_242.f_51), 0, 0);
					gameplay::set_bit(&iLocal_241, Local_242.f_50);
				}
			}
			else if (func_9(&(Local_242.f_51), 750, 0))
			{
				func_13(&(Local_242.f_51));
				Local_242.f_50++;
			}
			break;
		
		case 4:
			if (!func_11(&(Local_242.f_51)))
			{
				if (!gameplay::is_bit_set(iLocal_241, Local_242.f_50))
				{
					vVar0 = { Local_299[network::participant_id_to_int() /*5*/].f_2 + Vector(0f, -5f, 5f) };
					vVar0.z = vLocal_63.y;
					vVar3 = { Local_299[network::participant_id_to_int() /*5*/].f_2 + Vector(0f, -5f, 5f) };
					vVar3 = { vVar3 + Vector(0f, 0.1f, 0.1f) };
					gameplay::get_ground_z_for_3d_coord(vVar3 + Vector(10f, 0f, 0f), &(vVar3.f_2), 0);
					vVar3.z = (vVar3.y - 25f);
					gameplay::_0xBFE5756E7407064A(vVar0, vVar3, iVar6, 1, joaat("weapon_airstrike_rocket"), network::net_to_ped(Local_242.f_2.f_3), 1, 0, -1f, player::player_ped_id(), 1, 0, 0, 0);
					func_10(&(Local_242.f_51), 0, 0);
					gameplay::set_bit(&iLocal_241, Local_242.f_50);
				}
			}
			else if (func_9(&(Local_242.f_51), 500, 0))
			{
				func_13(&(Local_242.f_51));
				Local_242.f_50++;
			}
			break;
		
		case 5:
			if (!func_11(&(Local_242.f_51)))
			{
				if (!gameplay::is_bit_set(iLocal_241, Local_242.f_50))
				{
					vVar0 = { Local_299[network::participant_id_to_int() /*5*/].f_2 + Vector(0f, 5f, 10f) };
					vVar0.z = vLocal_63.y;
					vVar3 = { Local_299[network::participant_id_to_int() /*5*/].f_2 + Vector(0f, 5f, 10f) };
					vVar3 = { vVar3 + Vector(0f, 0.1f, 0.1f) };
					gameplay::get_ground_z_for_3d_coord(vVar3 + Vector(10f, 0f, 0f), &(vVar3.f_2), 0);
					vVar3.z = (vVar3.y - 25f);
					gameplay::_0xBFE5756E7407064A(vVar0, vVar3, iVar6, 1, joaat("weapon_airstrike_rocket"), network::net_to_ped(Local_242.f_2.f_3), 1, 0, -1f, player::player_ped_id(), 1, 0, 0, 0);
					func_10(&(Local_242.f_51), 0, 0);
					gameplay::set_bit(&iLocal_241, Local_242.f_50);
				}
			}
			else if (func_9(&(Local_242.f_51), 750, 0))
			{
				func_13(&(Local_242.f_51));
				Local_242.f_50++;
			}
			break;
		
		case 6:
			if (!func_11(&(Local_242.f_51)))
			{
				if (!gameplay::is_bit_set(iLocal_241, Local_242.f_50))
				{
					vVar0 = { Local_299[network::participant_id_to_int() /*5*/].f_2 + Vector(0f, 10f, 10f) };
					vVar0.z = vLocal_63.y;
					vVar3 = { Local_299[network::participant_id_to_int() /*5*/].f_2 + Vector(0f, 10f, 10f) };
					vVar3 = { vVar3 + Vector(0f, 0.1f, 0.1f) };
					gameplay::get_ground_z_for_3d_coord(vVar3 + Vector(10f, 0f, 0f), &(vVar3.f_2), 0);
					vVar3.z = (vVar3.y - 25f);
					gameplay::_0xBFE5756E7407064A(vVar0, vVar3, iVar6, 1, joaat("weapon_airstrike_rocket"), network::net_to_ped(Local_242.f_2.f_3), 1, 0, -1f, player::player_ped_id(), 1, 0, 0, 0);
					func_10(&(Local_242.f_51), 0, 0);
					gameplay::set_bit(&iLocal_241, Local_242.f_50);
				}
			}
			else if (func_9(&(Local_242.f_51), 500, 0))
			{
				func_13(&(Local_242.f_51));
				Local_242.f_50++;
			}
			break;
		
		case 7:
			if (!func_11(&(Local_242.f_51)))
			{
				if (!gameplay::is_bit_set(iLocal_241, Local_242.f_50))
				{
					vVar0 = { Local_299[network::participant_id_to_int() /*5*/].f_2 + Vector(0f, -10f, -10f) };
					vVar0.z = vLocal_63.y;
					vVar3 = { Local_299[network::participant_id_to_int() /*5*/].f_2 + Vector(0f, -10f, -10f) };
					vVar3 = { vVar3 + Vector(0f, 0.1f, 0.1f) };
					gameplay::get_ground_z_for_3d_coord(vVar3 + Vector(10f, 0f, 0f), &(vVar3.f_2), 0);
					vVar3.z = (vVar3.y - 25f);
					gameplay::_0xBFE5756E7407064A(vVar0, vVar3, iVar6, 1, joaat("weapon_airstrike_rocket"), network::net_to_ped(Local_242.f_2.f_3), 1, 0, -1f, player::player_ped_id(), 1, 0, 0, 0);
					func_10(&(Local_242.f_51), 0, 0);
					gameplay::set_bit(&iLocal_241, Local_242.f_50);
				}
			}
			else if (func_9(&(Local_242.f_51), 500, 0))
			{
				func_13(&(Local_242.f_51));
				Local_242.f_50++;
			}
			break;
		
		case 8:
			if (!func_11(&(Local_242.f_51)))
			{
				if (!gameplay::is_bit_set(iLocal_241, Local_242.f_50))
				{
					vVar0 = { Local_299[network::participant_id_to_int() /*5*/].f_2 + Vector(0f, 10f, -10f) };
					vVar0.z = vLocal_63.y;
					vVar3 = { Local_299[network::participant_id_to_int() /*5*/].f_2 + Vector(0f, 10f, -10f) };
					vVar3 = { vVar3 + Vector(0f, 0.1f, 0.1f) };
					gameplay::get_ground_z_for_3d_coord(vVar3 + Vector(10f, 0f, 0f), &(vVar3.f_2), 0);
					vVar3.z = (vVar3.y - 25f);
					gameplay::_0xBFE5756E7407064A(vVar0, vVar3, iVar6, 1, joaat("weapon_airstrike_rocket"), network::net_to_ped(Local_242.f_2.f_3), 1, 0, -1f, player::player_ped_id(), 1, 0, 0, 0);
					func_10(&(Local_242.f_51), 0, 0);
					gameplay::set_bit(&iLocal_241, Local_242.f_50);
				}
			}
			else if (func_9(&(Local_242.f_51), 500, 0))
			{
				func_13(&(Local_242.f_51));
				Local_242.f_50++;
			}
			break;
		
		case 9:
			if (!func_11(&(Local_242.f_51)))
			{
				if (!gameplay::is_bit_set(iLocal_241, Local_242.f_50))
				{
					vVar0 = { Local_299[network::participant_id_to_int() /*5*/].f_2 + Vector(0f, -10f, 10f) };
					vVar0.z = vLocal_63.y;
					vVar3 = { Local_299[network::participant_id_to_int() /*5*/].f_2 + Vector(0f, -10f, 10f) };
					vVar3 = { vVar3 + Vector(0f, 0.1f, 0.1f) };
					gameplay::get_ground_z_for_3d_coord(vVar3 + Vector(10f, 0f, 0f), &(vVar3.f_2), 0);
					vVar3.z = (vVar3.y - 25f);
					gameplay::_0xBFE5756E7407064A(vVar0, vVar3, iVar6, 1, joaat("weapon_airstrike_rocket"), network::net_to_ped(Local_242.f_2.f_3), 1, 0, -1f, player::player_ped_id(), 1, 0, 0, 0);
					Local_242.f_50++;
					iLocal_57 = 0;
					gameplay::set_bit(&iLocal_241, Local_242.f_50);
				}
			}
			break;
	}
}

void func_13(var uParam0)//Position - 0xD63
{
	uParam0->f_1 = 0;
}

int func_14(int iParam0)//Position - 0xD70
{
	if (network::network_does_network_id_exist(iParam0))
	{
		return !func_15(network::net_to_veh(iParam0));
	}
	return false;
}

bool func_15(int iParam0)//Position - 0xD90
{
	if (entity::does_entity_exist(iParam0))
	{
		if (entity::is_entity_dead(iParam0, 0))
		{
			return true;
		}
		else if (!vehicle::is_vehicle_driveable(iParam0, 0))
		{
			return true;
		}
	}
	else
	{
		return true;
	}
	return false;
}

bool func_16(vector3 vParam0)//Position - 0xDC9
{
	if ((vParam0.x == 0f && vParam0.y == 0f) && vParam0.y == 0f)
	{
		return true;
	}
	return false;
}

void func_17()//Position - 0xDF3
{
	int iVar0;
	vector3 vVar1;
	vector3 vVar4;
	int iVar7;
	int iVar8;
	
	if (func_14(Local_242.f_2))
	{
		iVar0 = network::net_to_veh(Local_242.f_2);
		vVar4 = { entity::get_entity_coords(iVar0, 1) };
	}
	if (!iLocal_59)
	{
		if (!func_16(Local_299[network::participant_id_to_int() /*5*/].f_2))
		{
			vVar1 = { Local_299[network::participant_id_to_int() /*5*/].f_2 };
		}
		else if (func_23(player::player_id(), 1, 1))
		{
			vVar1 = { entity::get_entity_coords(player::player_ped_id(), 1) };
		}
	}
	if (iLocal_58)
	{
		if (!iLocal_59)
		{
			if (func_14(Local_242.f_2))
			{
				if (!entity::is_entity_at_coord(iVar0, vLocal_60, 75f, 75f, 1000f, false, true, 0))
				{
					fLocal_66 = gameplay::get_distance_between_coords(vVar4, vVar1, 0);
				}
				else
				{
					iLocal_59 = 1;
				}
			}
			else
			{
				iLocal_59 = 1;
			}
		}
		else
		{
			fLocal_66 = (fLocal_66 - 3.75f);
		}
		iVar7 = system::floor(fLocal_66);
		if (fLocal_66 <= 200f)
		{
			iVar8 = 6;
		}
		else
		{
			iVar8 = 1;
		}
		if (fLocal_66 >= 0f)
		{
			func_18(iVar7, "AIRSTRIKE_2", -1, iVar8, 2, 0, "AIRSTRIKE_6", 0, 0f, 0, 0, iVar8, 0, 0, 0, 0, 0, 0, 0);
		}
	}
}

void func_18(int iParam0, char* sParam1, int iParam2, int iParam3, int iParam4, int iParam5, char* sParam6, int iParam7, float fParam8, int iParam9, int iParam10, int iParam11, int iParam12, int iParam13, int iParam14, int iParam15, int iParam16, int iParam17, int iParam18)//Position - 0xF03
{
	int iVar0;
	int iVar1;
	int iVar2;
	int iVar3;
	int iVar4;
	
	iVar0 = -1;
	iVar1 = 0;
	while (iVar1 <= 9)
	{
		if (iVar0 == -1)
		{
			if (func_22(6, iVar1) == 0)
			{
				iVar0 = iVar1;
			}
		}
		iVar1++;
	}
	if (iVar0 > -1)
	{
		Global_1344178.f_1 = 1;
		func_21(6, iVar0);
		Global_1344178.f_3579[iVar0] = iParam0;
		StringCopy(&(Global_1344178.f_3579.f_11[iVar0 /*16*/]), sParam1, 64);
		Global_1344178.f_3579.f_183[iVar0] = iParam3;
		Global_1344178.f_3579.f_172[iVar0] = iParam2;
		Global_1344178.f_3579.f_260[iVar0] = iParam4;
		Global_1344178.f_3579.f_271[iVar0] = iParam5;
		StringCopy(&(Global_1344178.f_3579.f_282[iVar0 /*16*/]), sParam6, 64);
		Global_1344178.f_3579.f_443[iVar0] = iParam7;
		Global_1344178.f_3579.f_454[iVar0] = fParam8;
		Global_1344178.f_3579.f_497[iVar0] = iParam9;
		Global_1344178.f_3579.f_508[iVar0] = iParam10;
		Global_1344178.f_3579.f_205[iVar0] = iParam11;
		Global_1344178.f_3579.f_216[iVar0] = iParam12;
		Global_1344178.f_3579.f_227[iVar0] = iParam13;
		Global_1344178.f_3579.f_238[iVar0] = iParam14;
		Global_1344178.f_3579.f_249[iVar0] = iParam15;
		Global_1344178.f_3579.f_519[iVar0] = iParam16;
		Global_1344178.f_3579.f_530[iVar0] = iParam17;
		Global_1344178.f_3579.f_541[iVar0] = iParam18;
		if (iParam15 == 4 && func_20())
		{
			Global_1344178.f_941 = 1;
		}
		if (gameplay::is_pc_version())
		{
			iVar2 = 0;
			graphics::_get_screen_active_resolution(&iVar3, &iVar4);
			if (iVar3 == 1280 && iVar4 >= 960)
			{
				iVar2 = 1;
			}
			if (iParam0 > 99999999)
			{
				Global_1344178.f_945 = 1;
			}
			else if (iParam0 > 9999999 || iVar2)
			{
				Global_1344178.f_944 = 1;
			}
			else if (iParam0 > 999)
			{
				Global_1344178.f_941 = 1;
			}
			if (func_19())
			{
				Global_1344178.f_945 = 1;
			}
		}
	}
}

bool func_19()//Position - 0x1105
{
	int iVar0;
	var uVar1;
	
	if (gameplay::is_pc_version())
	{
		graphics::_get_screen_active_resolution(&iVar0, &uVar1);
		if (iVar0 <= 1024)
		{
			return true;
		}
	}
	return false;
}

bool func_20()//Position - 0x1129
{
	if ((unk::_get_ui_language_id() == 8 || unk::_get_ui_language_id() == 9) || unk::_get_ui_language_id() == 10)
	{
		return true;
	}
	return false;
}

void func_21(int iParam0, int iParam1)//Position - 0x115A
{
	gameplay::set_bit(&(Global_1344178.f_5139[iParam0]), iParam1);
}

int func_22(int iParam0, int iParam1)//Position - 0x1173
{
	return gameplay::is_bit_set(Global_1344178.f_5139[iParam0], iParam1);
}

bool func_23(int iParam0, int iParam1, int iParam2)//Position - 0x118C
{
	int iVar0;
	
	iVar0 = iParam0;
	if (iVar0 != -1)
	{
		if (network::network_is_player_active(iParam0))
		{
			if (iParam1)
			{
				if (!player::is_player_playing(iParam0))
				{
					return false;
				}
			}
			if (iParam2)
			{
				if (!Global_2432628.f_3[iVar0])
				{
					return false;
				}
			}
			return true;
		}
	}
	return false;
}

void func_24()//Position - 0x11D6
{
}

void func_25()//Position - 0x11DE
{
	vector3 vVar0;
	int iVar3;
	
	func_80();
	if (entity::does_entity_exist(player::player_ped_id()))
	{
		if (!entity::is_entity_dead(player::player_ped_id(), 0))
		{
			if (!iLocal_56)
			{
				if (script::_get_number_of_instances_of_streamed_script(joaat("cellphone_flashhand")) <= 0)
				{
					iVar3 = !func_79();
					weapon::give_weapon_to_ped(player::player_ped_id(), joaat("weapon_flare"), 1, iVar3, iVar3);
					weapon::set_current_ped_weapon(player::player_ped_id(), joaat("weapon_flare"), iVar3);
					iLocal_56 = 1;
				}
			}
			else if (gameplay::_0xDFB4138EEFED7B81(player::player_ped_id(), joaat("weapon_flare"), 100f, &(Local_299[network::participant_id_to_int() /*5*/].f_2), 1))
			{
				if (func_78(Local_299[network::participant_id_to_int() /*5*/].f_2, 0f, 0f, 0f, 0))
				{
					Local_299[network::participant_id_to_int() /*5*/].f_2 = { vVar0 };
				}
				if (func_7("AIRSTRIKE_1"))
				{
					ui::clear_help(1);
				}
				if (!iLocal_55)
				{
					if (!func_77(Local_242.f_2.f_3))
					{
						if (func_14(Local_242.f_2))
						{
							func_76();
							ai::clear_ped_tasks(network::net_to_ped(Local_242.f_2.f_3));
							ai::task_perform_sequence(network::net_to_ped(Local_242.f_2.f_3), iLocal_49);
							vehicle::_set_plane_min_height_above_ground(network::net_to_veh(Local_242.f_2), system::round(50f));
							iLocal_55 = 1;
						}
					}
				}
			}
			else if (!iLocal_54)
			{
				if (!ui::is_help_message_being_displayed())
				{
					if (func_75(player::player_ped_id()))
					{
						func_6("AIRSTRIKE_4", -1);
					}
					else
					{
						func_6("AIRSTRIKE_1", -1);
					}
					iLocal_54 = 1;
				}
			}
		}
	}
	func_49();
	func_26();
}

void func_26()//Position - 0x132D
{
	int iVar0;
	vector3 vVar1;
	vector3 vVar4;
	vector3 vVar7;
	
	switch (Local_242.f_2.f_2)
	{
		case 0:
			func_48();
			break;
		
		case 1:
			func_48();
			break;
		
		case 2:
			if (func_14(Local_242.f_2))
			{
				iLocal_58 = true;
				iVar0 = network::net_to_veh(Local_242.f_2);
				if (!ui::does_blip_exist(iLocal_47))
				{
					iLocal_47 = ui::add_blip_for_entity(iVar0);
					ui::set_blip_sprite(iLocal_47, 16);
					ui::set_blip_name_from_text_file(iLocal_47, "AIRSTRIKE_5");
					ui::_0x75A16C3DA34F1245(iLocal_47, false);
				}
				else
				{
					ui::set_blip_rotation(iLocal_47, system::ceil(entity::get_entity_heading(iVar0)));
				}
				if (!iLocal_53)
				{
					if (!func_16(Local_299[network::participant_id_to_int() /*5*/].f_2))
					{
						vVar7 = { Local_299[network::participant_id_to_int() /*5*/].f_2 };
					}
					else
					{
						vVar7 = { vLocal_60 };
					}
					if (gameplay::get_distance_between_coords(vVar7, entity::get_entity_coords(iVar0, 1), 1) <= (60f * 5f))
					{
						audio::play_stream_from_vehicle(network::net_to_veh(Local_242.f_2));
						iLocal_53 = 1;
					}
				}
				if (!iLocal_239)
				{
					if (!Local_242.f_54)
					{
						if (!func_77(Local_242.f_2.f_3))
						{
							if (!func_16(Local_299[network::participant_id_to_int() /*5*/].f_2))
							{
								if (gameplay::get_distance_between_coords(func_47(player::player_id()), entity::get_entity_coords(network::net_to_veh(Local_242.f_2.f_3), 1), 0) <= 250f)
								{
									if (gameplay::get_distance_between_coords(vVar7, entity::get_entity_coords(iVar0, 1), 1) >= (60f * 2.5f))
									{
										func_30(&uLocal_73, "CT_AUD", "MPCT_ASarr", 12, 0, 0, 0);
										iLocal_239 = 1;
									}
								}
							}
						}
					}
				}
				if (Local_242.f_50 < 10)
				{
					if (!Local_242.f_53)
					{
						if (!func_16(Local_299[network::participant_id_to_int() /*5*/].f_2))
						{
							if (func_29() == 2)
							{
								if (!func_11(&uLocal_67))
								{
									func_10(&uLocal_67, 0, 0);
								}
								else if (func_9(&uLocal_67, 7500, 0))
								{
									Local_242.f_53 = 1;
								}
								vVar1 = { Local_299[network::participant_id_to_int() /*5*/].f_2 - Vector(1000f, 25f, 25f) };
								vVar4 = { Local_299[network::participant_id_to_int() /*5*/].f_2 + Vector(1000f, 25f, 25f) };
								vVar1.z = -200f;
								vVar4.z = 1500f;
								if (entity::is_entity_at_coord(iVar0, Local_299[network::participant_id_to_int() /*5*/].f_2, 75f, 75f, 1000f, false, true, 0) && gameplay::is_projectile_type_in_area(vVar1, vVar4, joaat("weapon_flare"), 0))
								{
									Local_242.f_53 = 1;
								}
							}
							else if (func_29() == 1)
							{
								Local_242.f_53 = 1;
								Local_242.f_50 = 100;
							}
						}
						else if (entity::is_entity_at_coord(iVar0, vLocal_60, 75f, 75f, 1000f, false, true, 0))
						{
							Local_242.f_53 = 1;
							Local_242.f_50 = 100;
							Local_242.f_54 = 1;
							if (!iLocal_240)
							{
								func_30(&uLocal_73, "CT_AUD", "MPCT_ASflr", 12, 0, 0, 0);
								iLocal_240 = 1;
							}
						}
					}
				}
			}
			if (!func_14(Local_242.f_2) || func_77(Local_242.f_2.f_3))
			{
				func_27();
			}
			break;
		
		case 3:
			func_48();
			break;
	}
}

void func_27()//Position - 0x1620
{
	int iVar0;
	
	if (!func_77(Local_242.f_2.f_3))
	{
		if (func_28(Local_242.f_2.f_3))
		{
			if (network::network_has_control_of_network_id(Local_242.f_2.f_3))
			{
				iVar0 = network::net_to_ped(Local_242.f_2.f_3);
				entity::set_entity_health(iVar0, 0);
			}
		}
	}
}

bool func_28(int iParam0)//Position - 0x1663
{
	if (network::_0xA1607996431332DF(iParam0))
	{
		return true;
	}
	if (network::network_is_host_of_this_script())
	{
		network::network_request_control_of_network_id(iParam0);
	}
	return false;
}

var func_29()//Position - 0x1687
{
	if (Local_242.f_55 == 1)
	{
		return Local_242.f_55;
	}
	else if (Local_242.f_55 == 2)
	{
		return Local_242.f_55;
	}
	if (!interior::_are_coords_colliding_with_exterior(Local_299[network::participant_id_to_int() /*5*/].f_2 + Vector(0.5f, 0f, 0f)))
	{
		Local_242.f_55 = 1;
		return Local_242.f_55;
	}
	Local_242.f_55 = 2;
	return Local_242.f_55;
}

int func_30(var uParam0, char* sParam1, char* sParam2, int iParam3, int iParam4, int iParam5, int iParam6)//Position - 0x16E2
{
	func_46(uParam0, 145, sParam1, iParam4, iParam5, iParam6);
	if (iParam3 > 7)
	{
		if (iParam3 < 12)
		{
			iParam3 = 7;
		}
	}
	Global_15752 = 0;
	Global_15754 = 0;
	Global_15759 = 0;
	Global_16736 = 0;
	Global_16738 = 0;
	Global_16742 = 0;
	Global_2621441 = 1;
	return func_31(sParam2, iParam3, 0);
}

bool func_31(char* sParam0, int iParam1, int iParam2)//Position - 0x1730
{
	Global_15746 = 0;
	if (Global_15745 == 0 || Global_15747 == 2)
	{
		if (Global_15745 != 0)
		{
			if (iParam1 > Global_15747)
			{
				if (Global_15752 == 0)
				{
					audio::stop_scripted_conversation(false);
					Global_14443.f_1 = 3;
					Global_15745 = 0;
					Global_15746 = 1;
					Global_15798 = 0;
					Global_15741 = 0;
					Global_15742 = 0;
					Global_15756 = 0;
					Global_15755 = 0;
					Global_14442 = 0;
				}
				else
				{
					func_45();
					return false;
				}
			}
			else
			{
				return false;
			}
		}
		if (audio::is_scripted_conversation_ongoing())
		{
			return false;
		}
		if (func_44(8, -1))
		{
			return false;
		}
		Global_15821 = { Global_15815 };
		func_43();
		Global_15034 = { Global_15199 };
		Global_15751 = Global_15752;
		Global_15758 = Global_15759;
		Global_2621442 = Global_2621441;
		Global_15760 = { Global_15776 };
		Global_15753 = Global_15754;
		Global_16735 = Global_16736;
		Global_16743 = { Global_16749 };
		Global_16737 = Global_16738;
		Global_16739 = Global_16740;
		Global_16741 = Global_16742;
		Global_15364.f_370 = Global_16734;
		Global_15364.f_368 = Global_16732;
		Global_15364.f_369 = Global_16733;
		Global_15741 = Global_15742;
		if (Global_15751)
		{
			gameplay::clear_bit(&Global_2313, 20);
			gameplay::clear_bit(&Global_2314, 17);
			gameplay::clear_bit(&Global_2315, 0);
			if (iParam2)
			{
				func_36();
				if (Global_3118[Global_14443 /*2811*/][0 /*281*/].f_259 == 2)
				{
					if (iParam1 == 13)
					{
					}
					else
					{
						return false;
					}
				}
				if (Global_14443.f_1 > 3)
				{
					return false;
				}
			}
			if (Global_14409 == 1)
			{
				return false;
			}
			if (player::is_player_playing(player::player_id()))
			{
				if (ped::is_ped_in_melee_combat(player::player_ped_id()))
				{
					return false;
				}
				if (func_35())
				{
					return false;
				}
				if (ai::is_ped_sprinting(player::player_ped_id()))
				{
					return false;
				}
				if (ped::is_ped_ragdoll(player::player_ped_id()))
				{
					return false;
				}
				if (ped::is_ped_in_parachute_free_fall(player::player_ped_id()))
				{
					return false;
				}
				if (weapon::get_is_ped_gadget_equipped(player::player_ped_id(), joaat("gadget_parachute")))
				{
					return false;
				}
				if (!Global_69617)
				{
					if (entity::is_entity_in_water(player::player_ped_id()))
					{
						return false;
					}
					if (player::is_player_climbing(player::player_id()))
					{
						return false;
					}
					if (ped::is_ped_planting_bomb(player::player_ped_id()))
					{
						return false;
					}
					if (player::is_special_ability_active(player::player_id()))
					{
						return false;
					}
				}
			}
			if (func_34())
			{
				return false;
			}
			else
			{
				switch (Global_14443.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_2313, 9))
				{
					return false;
				}
			}
			func_33();
			Global_15755 = iParam2;
		}
		Global_15747 = iParam1;
		StringCopy(&Global_15364, sParam0, 24);
		Global_14611 = 0;
		func_32();
		return true;
	}
	if (Global_15745 == 5)
	{
		return false;
	}
	if (iParam1 < Global_15747 || iParam1 == Global_15747)
	{
		return false;
	}
	if (iParam1 == 2)
	{
	}
	else
	{
		func_45();
	}
	return false;
}

void func_32()//Position - 0x19FC
{
	int iVar0;
	
	iVar0 = 0;
	while (iVar0 <= 69)
	{
		StringCopy(&(Global_14613[iVar0 /*6*/]), "", 24);
		iVar0++;
	}
	audio::stop_scripted_conversation(false);
	Global_15745 = 1;
}

void func_33()//Position - 0x1A2D
{
	Global_15798 = Global_15797;
	Global_15792 = Global_15793;
	Global_15839 = { Global_15827 };
	Global_15845 = { Global_15833 };
	Global_15800 = Global_15799;
	Global_15869 = { Global_15851 };
	Global_15875 = { Global_15857 };
	Global_15881 = { Global_15863 };
	Global_15887 = { Global_15893 };
	Global_1628 = Global_1629;
	Global_1630 = Global_1631;
	Global_15756 = Global_15757;
	Global_15758 = Global_15759;
	Global_15760 = { Global_15776 };
	Global_15749 = Global_15750;
	Global_16761 = 0;
	Global_15794 = 0;
	Global_15795 = 0;
	gameplay::clear_bit(&Global_2314, 16);
}

bool func_34()//Position - 0x1AC2
{
	if (Global_14443.f_1 == 1 || Global_14443.f_1 == 0)
	{
		return true;
	}
	return false;
}

bool func_35()//Position - 0x1AE9
{
	int iVar0;
	int iVar1;
	
	if (Global_69617)
	{
		iVar0 = 0;
		weapon::get_current_ped_weapon(player::player_ped_id(), &iVar1, 1);
		if (player::is_player_playing(player::player_id()))
		{
			if ((iVar1 == joaat("weapon_sniperrifle") || iVar1 == joaat("weapon_heavysniper")) || iVar1 == joaat("weapon_remotesniper"))
			{
				iVar0 = 1;
			}
		}
		if (cam::is_aim_cam_active() && iVar0 == 1)
		{
			return true;
		}
		else
		{
			return false;
		}
	}
	if (player::is_player_playing(player::player_id()))
	{
		if (ped::get_ped_config_flag(player::player_ped_id(), 78, 1))
		{
			return true;
		}
		else
		{
			return false;
		}
	}
	return true;
}

void func_36()//Position - 0x1B82
{
	if (func_42(14))
	{
		if (!entity::is_entity_dead(player::player_ped_id(), 0))
		{
			if (entity::get_entity_model(player::player_ped_id()) == Global_101553.f_32740[0 /*29*/])
			{
				Global_14443 = 0;
			}
			else if (entity::get_entity_model(player::player_ped_id()) == Global_101553.f_32740[1 /*29*/])
			{
				Global_14443 = 1;
			}
			else if (entity::get_entity_model(player::player_ped_id()) == Global_101553.f_32740[2 /*29*/])
			{
				Global_14443 = 2;
			}
			else
			{
				Global_14443 = 0;
			}
		}
	}
	else
	{
		Global_14443 = func_37();
		if (Global_14443 == 145)
		{
			Global_14443 = 3;
		}
		if (Global_69617)
		{
			Global_14443 = 3;
		}
		if (Global_14443 > 3)
		{
			Global_14443 = 3;
		}
	}
}

var func_37()//Position - 0x1C24
{
	func_38();
	return Global_101553.f_1991.f_539.f_3549;
}

void func_38()//Position - 0x1C3D
{
	int iVar0;
	
	if (entity::does_entity_exist(player::player_ped_id()))
	{
		if (func_41(Global_101553.f_1991.f_539.f_3549) != entity::get_entity_model(player::player_ped_id()))
		{
			iVar0 = func_40(player::player_ped_id());
			if (func_39(iVar0) && (!func_42(14) || Global_100505))
			{
				if (Global_101553.f_1991.f_539.f_3549 != iVar0 && func_39(Global_101553.f_1991.f_539.f_3549))
				{
					Global_101553.f_1991.f_539.f_3550 = Global_101553.f_1991.f_539.f_3549;
				}
				Global_101553.f_1991.f_539.f_3551 = iVar0;
				Global_101553.f_1991.f_539.f_3549 = iVar0;
				return;
			}
		}
		else
		{
			if (Global_101553.f_1991.f_539.f_3549 != 145)
			{
				Global_101553.f_1991.f_539.f_3551 = Global_101553.f_1991.f_539.f_3549;
			}
			return;
		}
	}
	Global_101553.f_1991.f_539.f_3549 = 145;
}

int func_39(int iParam0)//Position - 0x1D3A
{
	return iParam0 < 3;
}

int func_40(int iParam0)//Position - 0x1D46
{
	int iVar0;
	int iVar1;
	
	if (entity::does_entity_exist(iParam0))
	{
		iVar1 = entity::get_entity_model(iParam0);
		iVar0 = 0;
		while (iVar0 <= 2)
		{
			if (func_41(iVar0) == iVar1)
			{
				return iVar0;
			}
			iVar0++;
		}
	}
	return 145;
}

int func_41(int iParam0)//Position - 0x1D83
{
	if (func_39(iParam0))
	{
		return Global_101553.f_32740[iParam0 /*29*/];
	}
	else if (iParam0 != 145)
	{
	}
	return 0;
}

int func_42(int iParam0)//Position - 0x1DAD
{
	return Global_35775 == iParam0;
}

void func_43()//Position - 0x1DBB
{
	int iVar0;
	
	iVar0 = 0;
	while (iVar0 <= 15)
	{
		Global_15034[iVar0 /*10*/] = 0;
		StringCopy(&(Global_15034[iVar0 /*10*/].f_1), "", 24);
		Global_15034[iVar0 /*10*/].f_7 = 0;
		Global_15034[iVar0 /*10*/].f_8 = 0;
		iVar0++;
	}
	Global_15034.f_161 = -99;
	Global_15034.f_162 = { 0f, 0f, 0f };
}

int func_44(int iParam0, int iParam1)//Position - 0x1E12
{
	switch (iParam0)
	{
		case 5:
			if (iParam1 > -1)
			{
				return Global_1342783.f_203[iParam1];
			}
			break;
	}
	return gameplay::is_bit_set(Global_1342783.f_982, iParam0);
}

void func_45()//Position - 0x1E4D
{
	audio::restart_scripted_conversation();
	Global_16756 = 0;
	if ((audio::is_mobile_phone_call_ongoing() || Global_14443.f_1 == 9) || Global_14442 == 1)
	{
		audio::stop_scripted_conversation(false);
		Global_15745 = 6;
		Global_14443.f_1 = 3;
		return;
	}
	if (audio::is_scripted_conversation_ongoing())
	{
		audio::stop_scripted_conversation(true);
		Global_15745 = 6;
		return;
	}
}

void func_46(var uParam0, int iParam1, char* sParam2, int iParam3, int iParam4, var uParam5)//Position - 0x1EA4
{
	Global_15199 = { *uParam0 };
	Global_1629 = iParam1;
	StringCopy(&Global_15815, sParam2, 24);
	Global_16734 = uParam5;
	if (iParam3 == 0)
	{
		Global_16732 = 1;
		Global_16730 = 0;
	}
	else
	{
		Global_16732 = 0;
		Global_16730 = 1;
	}
	if (iParam4 == 0)
	{
		Global_16733 = 1;
		Global_16731 = 0;
	}
	else
	{
		Global_16733 = 0;
		Global_16731 = 1;
	}
}

Vector3 func_47(int iParam0)//Position - 0x1EFA
{
	return entity::get_entity_coords(player::get_player_ped(iParam0), 0);
}

void func_48()//Position - 0x1F0D
{
	if (ui::does_blip_exist(iLocal_47))
	{
		ui::remove_blip(&iLocal_47);
	}
}

void func_49()//Position - 0x1F24
{
	switch (Local_242.f_2.f_2)
	{
		case 0:
			func_74(1);
			break;
		
		case 1:
			if (func_50())
			{
				func_74(2);
			}
			break;
		
		case 2:
			if (!func_14(Local_242.f_2))
			{
				if (func_77(Local_242.f_2.f_3))
				{
					func_74(3);
				}
			}
			else if (func_77(Local_242.f_2.f_3))
			{
				func_74(3);
			}
			break;
		
		case 3:
			break;
	}
}

bool func_50()//Position - 0x1F9F
{
	if (!func_11(&uLocal_71))
	{
		func_10(&uLocal_71, 0, 0);
	}
	else if (func_73(Local_242.f_2.f_1) && func_73(Local_242.f_2.f_3.f_1))
	{
		if (func_9(&uLocal_71, 3000, 0))
		{
			if (func_54() && func_51())
			{
				return true;
			}
		}
	}
	return false;
}

bool func_51()//Position - 0x1FFC
{
	if ((!network::network_does_network_id_exist(Local_242.f_2.f_3) && func_73(Local_242.f_2.f_3.f_1)) && network::network_does_network_id_exist(Local_242.f_2))
	{
		if (func_14(Local_242.f_2))
		{
			if (func_53(&(Local_242.f_2.f_3), Local_242.f_2, 22, Local_242.f_2.f_3.f_1, -1, 1, 1, 1))
			{
				ped::set_blocking_of_non_temporary_events(network::net_to_ped(Local_242.f_2.f_3), true);
				ped::set_ped_relationship_group_hash(network::net_to_ped(Local_242.f_2.f_3), Global_1574273);
				ped::set_ped_random_component_variation(network::net_to_ped(Local_242.f_2.f_3), 0);
				ped::set_ped_keep_task(network::net_to_ped(Local_242.f_2.f_3), true);
				func_52();
				ai::task_perform_sequence(network::net_to_ped(Local_242.f_2.f_3), iLocal_48);
				vehicle::_set_plane_min_height_above_ground(network::net_to_veh(Local_242.f_2), system::round(50f));
			}
		}
	}
	if (!network::network_does_network_id_exist(Local_242.f_2.f_3))
	{
		return false;
	}
	streaming::set_model_as_no_longer_needed(Local_242.f_2.f_3.f_1);
	return true;
}

void func_52()//Position - 0x20E1
{
	if (!iLocal_50)
	{
		if (func_14(Local_242.f_2))
		{
			ai::open_sequence_task(&iLocal_48);
			ai::task_plane_mission(0, network::net_to_veh(Local_242.f_2), 0, 0, vLocal_60 + Vector((50f + 5f), 0f, 0f), 4, 60f, 15f, -1f, system::ceil((50f + 5f)), 20);
			ai::task_plane_mission(0, network::net_to_veh(Local_242.f_2), 0, 0, Local_242.f_2.f_14, 4, 60f, 25f, -1f, system::ceil((50f + 5f)), 20);
			ai::close_sequence_task(iLocal_48);
			iLocal_50 = 1;
		}
	}
}

bool func_53(var uParam0, int iParam1, int iParam2, int iParam3, int iParam4, int iParam5, int iParam6, int iParam7)//Position - 0x216F
{
	if (!network::can_register_mission_peds(1))
	{
		return false;
	}
	if (!network::network_does_network_id_exist(iParam1))
	{
		return false;
	}
	if (!vehicle::is_vehicle_driveable(network::net_to_veh(iParam1), 0))
	{
		return false;
	}
	*uParam0 = network::ped_to_net(ped::create_ped_inside_vehicle(network::net_to_veh(iParam1), iParam2, iParam3, iParam4, iParam6, iParam5));
	if (network::network_does_network_id_exist(*uParam0))
	{
		entity::_0x3910051CCECDB00C(network::net_to_ped(*uParam0), iParam7);
		if (network::_0xC7827959479DCC78(network::net_to_ped(*uParam0)))
		{
			if (iParam5)
			{
				network::set_network_id_exists_on_all_machines(*uParam0, 1);
			}
		}
		return true;
	}
	return false;
}

bool func_54()//Position - 0x21F7
{
	vector3 vVar0;
	float fVar3;
	
	if (!network::network_does_network_id_exist(Local_242.f_2))
	{
		if (func_73(Local_242.f_2.f_1))
		{
			if (audio::load_stream("AIRSTRIKE_FLYOVER", 0))
			{
				func_69(&vVar0, &fVar3);
				if (func_56(vVar0, 6f, 1f, 1f, 5f, 1, 1, 1, 1123024896, 0, -1, 1, 0, 0, 0, 0, 0))
				{
					if (func_55(&(Local_242.f_2), Local_242.f_2.f_1, vVar0, fVar3, 1, 1, 1, 0, 1, 1, 0))
					{
						Local_242.f_2.f_14 = { vVar0 * Vector(0f, -1f, -1f) };
						vehicle::set_vehicle_doors_locked(network::net_to_veh(Local_242.f_2), 2);
						entity::freeze_entity_position(network::net_to_veh(Local_242.f_2), false);
						entity::set_entity_dynamic(network::net_to_veh(Local_242.f_2), 1);
						rope::activate_physics(network::net_to_veh(Local_242.f_2));
						vehicle::set_vehicle_forward_speed(network::net_to_veh(Local_242.f_2), 60f);
						vehicle::set_vehicle_engine_on(network::net_to_veh(Local_242.f_2), true, 1, 0);
						vehicle::_0x79DF7E806202CE01(network::net_to_veh(Local_242.f_2), 1000);
						entity::_0x3910051CCECDB00C(network::net_to_veh(Local_242.f_2), false);
						vehicle::_set_vehicle_landing_gear(network::net_to_veh(Local_242.f_2), 3);
						vehicle::open_bomb_bay_doors(network::net_to_veh(Local_242.f_2));
						streaming::set_model_as_no_longer_needed(Local_242.f_2.f_1);
						return true;
					}
				}
			}
		}
	}
	return false;
}

bool func_55(var uParam0, int iParam1, vector3 vParam2, float fParam5, int iParam6, int iParam7, int iParam8, int iParam9, int iParam10, int iParam11, int iParam12)//Position - 0x2312
{
	int iVar0;
	
	if (!network::can_register_mission_vehicles(1))
	{
		return false;
	}
	if (iParam11)
	{
		gameplay::clear_area_of_vehicles(vParam2, 1f, 0, 0, 1, 1, true);
	}
	iVar0 = vehicle::create_vehicle(iParam1, vParam2, fParam5, iParam7, iParam6);
	*uParam0 = network::veh_to_net(iVar0);
	if (network::network_does_network_id_exist(*uParam0))
	{
		entity::_0x3910051CCECDB00C(iVar0, iParam10);
		if (network::_0xC7827959479DCC78(iVar0))
		{
			if (iParam8)
			{
				network::set_network_id_exists_on_all_machines(*uParam0, 1);
			}
			else
			{
				network::set_network_id_exists_on_all_machines(*uParam0, 0);
			}
		}
		vehicle::set_vehicle_is_stolen(iVar0, iParam9);
		if (iParam12)
		{
			unk_0xFC40CBF7B90CA77C(iVar0);
			vehicle::set_vehicle_door_control(iVar0, 5, 5, 1f);
		}
		return true;
	}
	return false;
}

bool func_56(vector3 vParam0, float fParam3, float fParam4, float fParam5, float fParam6, int iParam7, int iParam8, int iParam9, float fParam10, int iParam11, int iParam12, int iParam13, float fParam14, int iParam15, float fParam16, int iParam17, int iParam18)//Position - 0x23A9
{
	Global_2404993.f_2 = 0;
	if (fParam3 > 0f)
	{
		if (vehicle::is_any_vehicle_near_point(vParam0, fParam3))
		{
			return false;
		}
	}
	if (fParam4 > 0f)
	{
		if (ped::is_any_ped_near_point(vParam0.x, vParam0.y, (vParam0.y + 1f), fParam4) || ped::is_any_ped_near_point(vParam0, fParam4))
		{
			return false;
		}
	}
	if (fParam5 > 0f)
	{
		if (object::is_any_object_near_point(vParam0, fParam5, iParam18))
		{
			return false;
		}
	}
	Global_2404993.f_2++;
	if (iParam13)
	{
		if (fire::get_number_of_fires_in_range(vParam0, 2.5f) > 0)
		{
			return false;
		}
	}
	Global_2404993.f_2++;
	if (fParam14 > 0f)
	{
		if (func_62(vParam0, fParam14, 1, 1, iParam15, iParam17, 0, iParam15))
		{
			return false;
		}
	}
	Global_2404993.f_2++;
	if (iParam8)
	{
		if (fParam6 > 0f)
		{
			if (func_57(vParam0, fParam6, iParam7, iParam9, fParam10, iParam11, iParam12, fParam16, iParam17))
			{
				return false;
			}
		}
	}
	Global_2404993.f_2++;
	return true;
}

bool func_57(vector3 vParam0, float fParam3, int iParam4, int iParam5, float fParam6, int iParam7, int iParam8, float fParam9, int iParam10)//Position - 0x24B9
{
	int iVar0;
	int iVar1;
	float fVar2;
	
	if (iParam4 && !iParam7)
	{
		if (func_23(player::player_id(), 1, 1))
		{
			if (!cam::is_screen_faded_out())
			{
				fVar2 = fParam6;
				if (fParam9 > 0f)
				{
					fVar2 = fParam9;
				}
				if (gameplay::get_distance_between_coords(func_47(player::player_id()), vParam0, 1) <= (fVar2 + fParam3))
				{
					if (cam::is_sphere_visible(vParam0, fParam3))
					{
						return true;
					}
				}
			}
		}
	}
	iVar0 = 0;
	while (iVar0 < 32)
	{
		iVar1 = iVar0;
		if (func_23(iVar1, 1, 1))
		{
			if (!func_59(iVar1, 0) && network::_0x9DE986FC9A87C474(player::player_id(), iVar1))
			{
				if (iParam4 == 1 || (iParam4 == 0 && iVar1 != player::player_id()))
				{
					if ((func_58(iVar1) || !iParam10) && !Global_2421327[iVar1 /*353*/].f_258)
					{
						fVar2 = fParam6;
						if (fParam9 > 0f)
						{
							if (!player::get_player_team(iVar1) == -1)
							{
								if (player::get_player_team(iVar1) == player::get_player_team(player::player_id()))
								{
									fVar2 = fParam9;
								}
							}
						}
						if (!iParam7)
						{
							if ((iParam5 || (iParam5 == 0 && player::get_player_team(iVar1) != player::get_player_team(player::player_id()))) || player::get_player_team(iVar1) == -1)
							{
								if (gameplay::get_distance_between_coords(func_47(iVar1), vParam0, 1) <= (fVar2 + fParam3))
								{
									if (network::is_sphere_visible_to_player(iVar1, vParam0, fParam3))
									{
										return true;
									}
								}
							}
						}
						else if (player::get_player_team(iVar1) != iParam8 || player::get_player_team(iVar1) == -1)
						{
							if (gameplay::get_distance_between_coords(func_47(iVar1), vParam0, 1) <= (fVar2 + fParam3))
							{
								if (network::is_sphere_visible_to_player(iVar1, vParam0, fParam3))
								{
									return true;
								}
							}
						}
					}
				}
			}
		}
		iVar0++;
	}
	return false;
}

bool func_58(int iParam0)//Position - 0x2671
{
	if (entity::is_entity_visible_to_script(player::get_player_ped(iParam0)) || Global_2421327[iParam0 /*353*/].f_244)
	{
		return true;
	}
	return false;
}

int func_59(int iParam0, int iParam1)//Position - 0x269C
{
	int iVar0;
	
	if (iParam0 == player::player_id())
	{
		iVar0 = func_60(-1, 0) == 8;
	}
	else
	{
		iVar0 = Global_1588660[iParam0 /*532*/].f_201 == 8;
	}
	if (iParam1 == 1)
	{
		if (network::network_is_player_active(iParam0))
		{
			iVar0 = player::get_player_team(iParam0) == 8;
		}
	}
	return iVar0;
}

int func_60(int iParam0, int iParam1)//Position - 0x26E7
{
	int iVar0;
	int iVar1;
	
	iVar1 = iParam0;
	if (iVar1 == -1)
	{
		iVar1 = func_61();
	}
	if (Global_1315209[iVar1] == 1)
	{
		if (iParam1)
		{
		}
		iVar0 = 8;
	}
	else
	{
		iVar0 = Global_1312725[iVar1];
		if (iParam1)
		{
		}
	}
	return iVar0;
}

var func_61()//Position - 0x2728
{
	return Global_1312731;
}

bool func_62(vector3 vParam0, float fParam3, int iParam4, int iParam5, int iParam6, int iParam7, int iParam8, var uParam9)//Position - 0x2734
{
	int iVar0;
	int iVar1;
	
	iVar0 = 0;
	while (iVar0 < 32)
	{
		iVar1 = iVar0;
		if ((iParam8 == 1 && player::player_id() != iVar1) || iParam8 == 0)
		{
			if (func_23(iVar1, iParam4, iParam5))
			{
				if (network::_0x9DE986FC9A87C474(player::player_id(), iVar1))
				{
					if (!iParam7 || (!ped::is_ped_injured(player::get_player_ped(iVar1)) && func_58(iVar1)))
					{
						if ((!iParam6 || (iParam6 == 1 && player::get_player_team(player::player_id()) != player::get_player_team(iVar1))) || player::get_player_team(player::player_id()) == -1)
						{
							if (((player::get_player_team(player::player_id()) == -1 && uParam9) && iParam6) && func_63(iVar1))
							{
							}
							else if (entity::does_entity_exist(player::get_player_ped(iVar1)))
							{
								if (gameplay::get_distance_between_coords(func_47(iVar1), vParam0, 1) < fParam3)
								{
									return true;
								}
							}
						}
					}
				}
			}
		}
		iVar0++;
	}
	return false;
}

bool func_63(int iParam0)//Position - 0x2830
{
	if (func_68(player::player_id(), iParam0))
	{
		return true;
	}
	Global_2471194 = { func_67(iParam0) };
	if (network::network_is_friend(&Global_2471194))
	{
		return true;
	}
	if (func_64(player::player_id(), iParam0))
	{
		return true;
	}
	return false;
}

bool func_64(int iParam0, int iParam1)//Position - 0x2877
{
	int iVar0;
	
	iVar0 = func_66(iParam0);
	if (!iVar0 == func_65())
	{
		if (iVar0 == func_66(iParam1))
		{
			return true;
		}
	}
	return false;
}

int func_65()//Position - 0x28A2
{
	return -1;
}

int func_66(int iParam0)//Position - 0x28AB
{
	if (iParam0 != func_65())
	{
		return Global_1614576[iParam0 /*324*/].f_10;
	}
	return func_65();
}

struct<13> func_67(int iParam0)//Position - 0x28CE
{
	struct<13> Var0;
	
	network::network_handle_from_player(iParam0, &Var0, 13);
	return Var0;
}

bool func_68(int iParam0, int iParam1)//Position - 0x28E5
{
	if (network::_network_player_is_in_clan())
	{
		Global_2471194 = { func_67(iParam0) };
		Global_2471207 = { func_67(iParam1) };
		if (network::network_clan_player_is_active(&Global_2471194))
		{
			if (network::network_clan_player_is_active(&Global_2471207))
			{
				network::network_clan_player_get_desc(&Global_2471124, 35, &Global_2471194);
				network::network_clan_player_get_desc(&Global_2471159, 35, &Global_2471207);
				if (Global_2471124 == Global_2471159)
				{
					return true;
				}
			}
		}
	}
	return false;
}

void func_69(var uParam0, var uParam1)//Position - 0x2952
{
	float fVar0;
	
	*uParam0 = { func_71(vLocal_60 + Vector(200f, 0f, 0f), 600f, 600f, (200f / 2f)) };
	fVar0 = pathfind::_0x8ABE8608576D9CE3((*uParam0 - 600f), (uParam0->f_1 - 600f), (*uParam0 + 600f), (uParam0->f_1 + 600f));
	if (uParam0->f_2 < fVar0)
	{
		uParam0->f_2 = fVar0;
	}
	*uParam1 = func_70(*uParam0, vLocal_60);
}

float func_70(struct<2> Param0, var uParam2, struct<2> Param3, var uParam5)//Position - 0x29CA
{
	return gameplay::get_heading_from_vector_2d((Param3 - Param0), (Param3.f_1 - Param0.f_1));
}

Vector3 func_71(vector3 vParam0, float fParam3, float fParam4, float fParam5)//Position - 0x29E4
{
	vector3 vVar0;
	float fVar3;
	
	vVar0 = { gameplay::get_random_float_in_range(-1f, 1f), gameplay::get_random_float_in_range(-1f, 1f), 0f };
	fVar3 = (fParam5 / 2f);
	vVar0 = { func_72(vVar0, gameplay::get_random_float_in_range(fParam3, fParam4)) };
	vVar0.z = gameplay::get_random_float_in_range(-fVar3, fVar3);
	return vParam0 + vVar0;
}

Vector3 func_72(vector3 vParam0, float fParam3)//Position - 0x2A2D
{
	float fVar0;
	
	if (fParam3 == 0f)
	{
		return 0f, 0f, 0f;
	}
	fVar0 = system::vmag(vParam0);
	if (fVar0 != 0f)
	{
		return vParam0 * FtoV((fParam3 / fVar0));
	}
	return 0f, 0f, 0f;
}

int func_73(int iParam0)//Position - 0x2A64
{
	if (iParam0 == 0)
	{
		return true;
	}
	streaming::request_model(iParam0);
	return streaming::has_model_loaded(iParam0);
}

void func_74(int iParam0)//Position - 0x2A82
{
	Local_242.f_2.f_2 = iParam0;
}

bool func_75(int iParam0)//Position - 0x2A92
{
	int iVar0;
	
	if (ped::is_ped_in_any_heli(iParam0))
	{
		iVar0 = ped::get_vehicle_ped_is_in(iParam0, 0);
		if (vehicle::is_vehicle_driveable(iVar0, 0))
		{
			if (vehicle::get_ped_in_vehicle_seat(iVar0, -1, 0) == iParam0)
			{
				return true;
			}
		}
	}
	return false;
}

void func_76()//Position - 0x2AC8
{
	if (!iLocal_51)
	{
		if (func_14(Local_242.f_2))
		{
			ai::open_sequence_task(&iLocal_49);
			ai::task_plane_mission(0, network::net_to_veh(Local_242.f_2), 0, 0, Local_299[network::participant_id_to_int() /*5*/].f_2 + Vector((50f + 5f), 0f, 0f), 4, 60f, 15f, -1f, system::ceil((50f + 5f)), 20);
			ai::task_plane_mission(0, network::net_to_veh(Local_242.f_2), 0, 0, Local_242.f_2.f_14, 4, 60f, 25f, -1f, system::ceil((50f + 5f)), 20);
			ai::close_sequence_task(iLocal_49);
			iLocal_51 = 1;
		}
	}
}

int func_77(int iParam0)//Position - 0x2B5F
{
	if (network::network_does_network_id_exist(iParam0))
	{
		return ped::is_ped_injured(network::net_to_ped(iParam0));
	}
	return true;
}

int func_78(vector3 vParam0, vector3 vParam3, int iParam6)//Position - 0x2B7E
{
	if (iParam6)
	{
		return (vParam0.x == vParam3.x && vParam0.y == vParam3.y);
	}
	return ((vParam0.x == vParam3.x && vParam0.y == vParam3.y) && vParam0.y == vParam3.y);
}

int func_79()//Position - 0x2BC5
{
	return Global_91458.f_303 > 0;
}

void func_80()//Position - 0x2BD6
{
	if (!iLocal_238)
	{
		if (!func_77(Local_242.f_2.f_3))
		{
			func_81(&uLocal_73, 3, network::net_to_ped(Local_242.f_2.f_3), "FM_Pilot_Air", 1, 1);
			iLocal_238 = 1;
		}
	}
}

void func_81(var uParam0, int iParam1, int iParam2, char* sParam3, int iParam4, int iParam5)//Position - 0x2C0B
{
	if ((uParam0[iParam1 /*10*/])->f_7 == 1)
	{
	}
	(*uParam0)[iParam1 /*10*/] = iParam2;
	StringCopy(&((uParam0[iParam1 /*10*/])->f_1), sParam3, 24);
	(uParam0[iParam1 /*10*/])->f_7 = 1;
	(uParam0[iParam1 /*10*/])->f_8 = iParam4;
	(uParam0[iParam1 /*10*/])->f_9 = iParam5;
	if (!Global_69617)
	{
		if (!ped::is_ped_injured(iParam2))
		{
			if ((uParam0[iParam1 /*10*/])->f_8 == 0)
			{
				ped::set_ped_can_play_ambient_anims(iParam2, 0);
			}
			else
			{
				ped::set_ped_can_play_ambient_anims(iParam2, 1);
			}
		}
		if (!ped::is_ped_injured(iParam2))
		{
			if ((uParam0[iParam1 /*10*/])->f_9 == 0)
			{
				ped::set_ped_can_use_auto_conversation_lookat(iParam2, 0);
			}
			else
			{
				ped::set_ped_can_use_auto_conversation_lookat(iParam2, 1);
			}
		}
	}
}

int func_82()//Position - 0x2CA6
{
	return Local_242;
}

var func_83(int iParam0)//Position - 0x2CB0
{
	return Local_299[iParam0 /*5*/];
}

void func_84()//Position - 0x2CBF
{
}

void func_85()//Position - 0x2CC7
{
	if (network::network_does_network_id_exist(Local_242.f_2.f_3) && network::network_does_network_id_exist(Local_242.f_2))
	{
		if (func_14(Local_242.f_2) && !func_77(Local_242.f_2.f_3))
		{
			ai::task_plane_mission(network::net_to_ped(Local_242.f_2.f_3), network::net_to_veh(Local_242.f_2), 0, player::player_ped_id(), 1f, 1f, 1f, 8, 60f, 1000f, -1f, 400, 400);
		}
	}
	func_87(func_88(1, 1), 11, func_65());
	func_86();
}

void func_86()//Position - 0x2D49
{
	script::terminate_this_thread();
}

void func_87(int iParam0, int iParam1, var uParam2)//Position - 0x2D55
{
	struct<4> Var0;
	
	Var0 = 338;
	Var0.f_1 = player::player_id();
	Var0.f_3 = iParam1;
	Var0.f_2 = uParam2;
	if (!iParam0 == 0)
	{
		script::trigger_script_event(1, &Var0, 6, iParam0);
	}
}

var func_88(int iParam0, int iParam1)//Position - 0x2D8B
{
	var uVar0;
	int iVar1;
	int iVar2;
	
	iVar1 = 0;
	while (iVar1 < 32)
	{
		iVar2 = player::int_to_playerindex(iVar1);
		if (func_23(iVar2, 0, 0))
		{
			if (iVar2 != player::player_id() || iParam0)
			{
				if (iParam1)
				{
					gameplay::set_bit(&uVar0, iVar1);
				}
				else if (!func_59(iVar2, 0))
				{
					gameplay::set_bit(&uVar0, iVar1);
				}
			}
		}
		iVar1++;
	}
	return uVar0;
}

bool func_89()//Position - 0x2DF0
{
	int iVar0;
	var uVar1;
	
	func_96(&iVar0, &uVar1);
	if (iVar0)
	{
		return true;
	}
	if (Global_1315206 == 0)
	{
		if (!network::network_is_game_in_progress())
		{
			return true;
		}
	}
	if (func_95())
	{
		return true;
	}
	if (Global_2453962)
	{
		return true;
	}
	if (func_94())
	{
		return true;
	}
	if (func_93(157))
	{
		if (!func_92())
		{
			return true;
		}
	}
	if (func_93(155))
	{
		return true;
	}
	if (!network::network_is_signed_online())
	{
		return true;
	}
	if (func_90() != 0)
	{
		if (script::_get_number_of_instances_of_streamed_script(func_90()) == 0)
		{
			return true;
		}
	}
	return false;
}

int func_90()//Position - 0x2E85
{
	switch (func_91())
	{
		case 0:
			return joaat("freemode");
			break;
		
		case 2:
			return joaat("creator");
			break;
	}
	return 0;
}

var func_91()//Position - 0x2EB9
{
	return Global_25185;
}

var func_92()//Position - 0x2EC4
{
	return Global_2442442.f_576;
}

bool func_93(int iParam0)//Position - 0x2ED3
{
	if (script::get_event_exists(1, iParam0))
	{
		return true;
	}
	return false;
}

var func_94()//Position - 0x2EEA
{
	return Global_2451777;
}

var func_95()//Position - 0x2EF6
{
	return Global_2442442.f_571;
}

void func_96(var uParam0, var uParam1)//Position - 0x2F05
{
	int iVar0;
	int iVar1;
	int iVar2;
	vector3 vVar4;
	
	iVar0 = 0;
	while (iVar0 < script::get_number_of_events(1))
	{
		iVar1 = script::get_event_at_index(1, iVar0);
		if (iVar1 == 168)
		{
			script::get_event_data(1, iVar0, &iVar2, 2);
			switch (iVar2)
			{
				case 351:
					func_97(iVar0);
					break;
				
				case 2:
					script::get_event_data(1, iVar0, &vVar4, 3);
					if (vVar4.y == 55)
					{
						*uParam0 = 1;
					}
					else if (vVar4.y == 32)
					{
						*uParam1 = 1;
					}
					break;
				}
		}
		iVar0++;
	}
}

void func_97(int iParam0)//Position - 0x2F85
{
	vector3 vVar0;
	int iVar3;
	int iVar4;
	int iVar5;
	
	if (script::get_event_data(1, iParam0, &vVar0, 3))
	{
		if (func_23(vVar0.y, 1, 1))
		{
			iVar3 = player::get_player_ped(vVar0.y);
			if (entity::does_entity_exist(iVar3))
			{
				if (ped::is_ped_in_any_vehicle(iVar3, 0))
				{
					iVar4 = ped::get_vehicle_ped_is_in(iVar3, 0);
					if (vehicle::is_vehicle_window_intact(iVar4, vVar0.y) && network::network_get_this_script_is_network_script())
					{
						if (func_98(iVar4, &iVar5))
						{
							vehicle::remove_vehicle_window(iVar4, vVar0.y);
						}
						if (iVar5)
						{
							entity::set_vehicle_as_no_longer_needed(&iVar4);
						}
					}
				}
			}
		}
	}
}

bool func_98(int iParam0, var uParam1)//Position - 0x3006
{
	if (entity::does_entity_exist(iParam0))
	{
		if (!entity::is_entity_a_mission_entity(iParam0))
		{
			if (network::network_get_entity_is_local(iParam0))
			{
				entity::set_entity_as_mission_entity(iParam0, false, 1);
				*uParam1 = 1;
			}
		}
		if (entity::does_entity_belong_to_this_script(iParam0, 0))
		{
			if (network::network_has_control_of_entity(iParam0))
			{
				return true;
			}
		}
	}
	return false;
}

void func_99()//Position - 0x3054
{
	system::wait(0);
}

void func_100(struct<20> Param0)//Position - 0x3061
{
	func_106(func_107(Param0), Param0);
	network::reserve_network_mission_peds(1);
	network::reserve_network_mission_vehicles(1);
	func_104(0, -1, 0);
	network::network_register_host_broadcast_variables(&Local_242, 57);
	network::network_register_player_broadcast_variables(&Local_299, 11);
	gameplay::set_this_script_can_be_paused(0);
	if (!func_103())
	{
		func_85();
	}
	if (entity::does_entity_exist(player::player_ped_id()))
	{
		vLocal_60 = { entity::get_entity_coords(player::player_ped_id(), 0) };
	}
	if (func_3(player::player_id(), 1))
	{
		iLocal_52 = true;
	}
	func_101(64, 1);
	Local_299[network::participant_id_to_int() /*5*/] = 0;
}

void func_101(int iParam0, int iParam1)//Position - 0x30E4
{
	int iVar0;
	
	iVar0 = 0;
	if (iParam1)
	{
		iVar0 = -1;
	}
	switch (iParam0)
	{
		case 59:
			Global_2097152[func_102() /*10106*/].f_7120.f_19 = iVar0;
			break;
		
		case 19:
			Global_2097152[func_102() /*10106*/].f_7120.f_18 = iVar0;
			break;
		
		case 74:
			Global_2097152[func_102() /*10106*/].f_7120.f_12 = iVar0;
			break;
		
		case 20:
			Global_2097152[func_102() /*10106*/].f_7120.f_13 = iVar0;
			break;
		
		case 29:
			Global_2097152[func_102() /*10106*/].f_7120.f_14 = iVar0;
			break;
		
		case 8:
			Global_2097152[func_102() /*10106*/].f_7120.f_15 = iVar0;
			break;
		
		case 31:
			Global_2097152[func_102() /*10106*/].f_7120.f_16 = iVar0;
			break;
		
		case 3:
			Global_2097152[func_102() /*10106*/].f_7120.f_20 = iVar0;
			break;
		
		case 6:
			Global_2097152[func_102() /*10106*/].f_7120.f_17 = iVar0;
			break;
		
		case 103:
		case 104:
		case 98:
		case 105:
			Global_2097152[func_102() /*10106*/].f_7120.f_23 = iVar0;
			break;
		
		case 76:
			Global_2097152[func_102() /*10106*/].f_7120.f_24 = iVar0;
			break;
		
		case 93:
			Global_2097152[func_102() /*10106*/].f_7120.f_25 = iVar0;
			break;
		
		case 61:
		case 62:
		case 63:
		case 64:
		case 77:
		case 81:
			Global_2097152[func_102() /*10106*/].f_7120.f_26 = iVar0;
			break;
		
		case 65:
		case 75:
		case 95:
			Global_2097152[func_102() /*10106*/].f_7120.f_27 = iVar0;
			break;
			break;
		
		case 97:
			Global_2097152[func_102() /*10106*/].f_7120.f_29 = iVar0;
			break;
		
		case 88:
			Global_2097152[func_102() /*10106*/].f_7120.f_28 = iVar0;
			break;
		
		case 100:
			Global_2097152[func_102() /*10106*/].f_7120.f_31 = iVar0;
			break;
		
		case 106:
			Global_2097152[func_102() /*10106*/].f_7120.f_32 = iVar0;
			break;
		
		case 99:
			Global_2097152[func_102() /*10106*/].f_7120.f_30 = iVar0;
			break;
	}
}

int func_102()//Position - 0x333E
{
	int iVar0;
	
	iVar0 = 0;
	return iVar0;
}

bool func_103()//Position - 0x334B
{
	int iVar0;
	
	iVar0 = 0;
	while (true)
	{
		iVar0++;
		if (!network::network_is_game_in_progress())
		{
			return false;
		}
		if (network::_0x5D10B3795F3FC886())
		{
			return true;
		}
		if (func_95())
		{
			return false;
		}
		if (func_93(155))
		{
			return false;
		}
		if (iVar0 >= 3600)
		{
			return false;
		}
		system::wait(0);
	}
	return false;
}

bool func_104(int iParam0, int iParam1, int iParam2)//Position - 0x33A4
{
	int iVar0;
	
	iVar0 = network::network_get_script_status();
	while (iVar0 != 2)
	{
		if (((iVar0 == 3 || iVar0 == 4) || iVar0 == 5) || iVar0 == 6)
		{
			if (!iParam2)
			{
				func_86();
			}
			else
			{
				return false;
			}
		}
		if (!func_105())
		{
			if (iParam0 == 0)
			{
				if (!network::network_is_game_in_progress())
				{
					if (!iParam2)
					{
						func_86();
					}
					else
					{
						return false;
					}
				}
				if (func_95())
				{
					if (!iParam2)
					{
						func_86();
					}
					else
					{
						return false;
					}
				}
				if (func_93(155))
				{
					if (!iParam2)
					{
						func_86();
					}
					else
					{
						return false;
					}
				}
			}
			else if (!network::network_is_in_session())
			{
				if (!iParam2)
				{
					func_86();
				}
				else
				{
					return false;
				}
			}
		}
		system::wait(0);
		iVar0 = network::network_get_script_status();
	}
	if (iParam1 > -1)
	{
		Global_1312496 = iVar0;
	}
	if (iParam0 == 0)
	{
		if (!network::network_is_game_in_progress())
		{
			if (!iParam2)
			{
				func_86();
			}
			else
			{
				return false;
			}
		}
	}
	else if (!network::network_is_in_session())
	{
		if (!iParam2)
		{
			func_86();
		}
		else
		{
			return false;
		}
	}
	return true;
}

var func_105()//Position - 0x34B9
{
	return Global_1315206;
}

void func_106(int iParam0, struct<17> Param1, var uParam18, var uParam19, var uParam20)//Position - 0x34C5
{
	if (!network::network_is_game_in_progress())
	{
		func_86();
	}
	network::network_set_this_script_is_network_script(iParam0, 0, Param1.f_16);
}

int func_107(int iParam0)//Position - 0x34E4
{
	switch (iParam0)
	{
		case 3:
			return 2;
		
		case 1:
			return 32;
		
		case 2:
			return 32;
		
		case 32:
			return 32;
		
		case 33:
			return 32;
		
		case 34:
			return 32;
		
		case 35:
			return 32;
		
		case 36:
			return 32;
		
		case 37:
			return 32;
		
		case 38:
			return 32;
		
		case 39:
			return 32;
		
		case 40:
			return 32;
		
		case 41:
			return 32;
		
		case 42:
			return 32;
		
		case 43:
			return 32;
		
		case 44:
			return 32;
		
		case 45:
			return 32;
		
		case 46:
			return 32;
		
		case 47:
			return 32;
		
		case 48:
			return 32;
		
		case 49:
			return 32;
		
		case 50:
			return 4;
		
		case 51:
			return 32;
		
		case 52:
			return 32;
		
		case 53:
			return 32;
		
		case 54:
			return 32;
		
		case 55:
			return 32;
		
		case 56:
			return 32;
		
		case 57:
			return 32;
		
		case 58:
			return 32;
		
		case 59:
			return 32;
		
		case 60:
			return 32;
		
		case 61:
			return 32;
		
		case 62:
			return 32;
		
		case 63:
			return 32;
		
		case 64:
			return 4;
		
		case 65:
			return 32;
		
		case 66:
			return 4;
		
		case 67:
			return 4;
		
		case 68:
			return 32;
		
		case 69:
			return 32;
		
		case 70:
			return 4;
		
		case 71:
			return 32;
		
		case 72:
			return 32;
		
		case 74:
			return 32;
		
		case 73:
			return 32;
		
		case 75:
			return 32;
		
		case 76:
			return 32;
		
		case 77:
			return 32;
		
		case 78:
			return 32;
		
		case 79:
			return 32;
		
		case 80:
			return 8;
		
		case 81:
			return 32;
		
		case 82:
			return 8;
		
		case 83:
			return 8;
		
		case 91:
			return 8;
		
		case 84:
			return 8;
		
		case 85:
			return 32;
		
		case 86:
			return 32;
		
		case 87:
			return 32;
		
		case 88:
			return 8;
		
		case 89:
			return 32;
		
		case 90:
			return 32;
		
		case 92:
			return 32;
		
		case 93:
			return 32;
		
		case 94:
			return 32;
		
		case 95:
			return 8;
		
		case 12:
			return 32;
		
		case 4:
			return 16;
		
		case 13:
			return 32;
		
		case 5:
			return 16;
		
		case 6:
			return 2;
		
		case 8:
			return 2;
		
		case 9:
			return 2;
		
		case 7:
			return 16;
		
		case 10:
			return 2;
		
		case 11:
			return 4;
		
		case 15:
			return 32;
		
		case 16:
			return 32;
		
		case 27:
			return 2;
		
		case 25:
			return 2;
		
		case 26:
			return 2;
		
		case 18:
			return 32;
		
		case 28:
			return 32;
		
		case 29:
			return 2;
		
		case 30:
			return 32;
		
		case 31:
			return 32;
		
		case 17:
			return 2;
		
		case 96:
			return 32;
		
		case 97:
			return 32;
		
		case 19:
			return 32;
		
		case 22:
			return 32;
		
		case 23:
			return 32;
		
		case 24:
			return 32;
		
		case 20:
			return 2;
		
		case 0:
			return 0;
		
		case 21:
			return 32;
		
		case 108:
			return 32;
		
		case 109:
			return 32;
		
		case 98:
			return 32;
		
		case 99:
			return 32;
		
		case 103:
			return 32;
		
		case 101:
			return 32;
		
		case 102:
			return 32;
		
		case 106:
			return 32;
		
		case 107:
			return 32;
		
		case 104:
			return 32;
		
		case 105:
			return 32;
		
		case 110:
			return 32;
		
		case 111:
			return 32;
		
		case 112:
			return 32;
		
		case 113:
			return 32;
		
		case 114:
			return 2;
		
		case 119:
			return 1;
		
		case 115:
			return 2;
		
		case 116:
			return 4;
		
		case 117:
			return 2;
		
		case 118:
			return 2;
		
		case 100:
			return 1;
		
		case 120:
			return 2;
		
		case 121:
		case 122:
		case 123:
		case 124:
		case 125:
		case 126:
			return 0;
		
		case 130:
			return 1;
		
		case 127:
			return 4;
		
		case 128:
			return 16;
		
		case 129:
			return 32;
		
		default:
	}
	return 0;
}

