#region Local Var
	var uLocal_0 = 0;
	var uLocal_1 = 0;
	int iLocal_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;
	var uLocal_12 = 0;
	var uLocal_13 = 0;
	float fLocal_14 = 0f;
	var uLocal_15 = 0;
	var uLocal_16 = 0;
	int iLocal_17 = 0;
	var uLocal_18 = 0;
	var uLocal_19 = 0;
	char* sLocal_20 = NULL;
	float fLocal_21 = 0f;
	var uLocal_22 = 0;
	var uLocal_23 = 0;
	var uLocal_24 = 0;
	float fLocal_25 = 0f;
	float fLocal_26 = 0f;
	var uLocal_27 = 0;
	int iLocal_28 = 0;
	int iLocal_29 = 0;
	int iLocal_30 = 0;
	int iLocal_31[1] = { 0 };
	int iLocal_33[13] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
	int iLocal_47 = 0;
	int iLocal_48 = 0;
	int iLocal_49[1] = { 0 };
	int iLocal_51[1] = { 0 };
	int iLocal_53 = 0;
	int iLocal_54 = 0;
	int iLocal_55 = 0;
	int iLocal_56 = 0;
	var uLocal_57 = 0;
	int iLocal_58 = 0;
	int iLocal_59 = 0;
	int iLocal_60 = 0;
	int iLocal_61 = 0;
	int iLocal_62 = 0;
	var uLocal_63[1] = { 0 };
	int iLocal_65 = 0;
	int iLocal_66 = 0;
	int iLocal_67 = 0;
	int iLocal_68 = 0;
	int iLocal_69 = 0;
	struct<8> Local_70[13];
	int iLocal_175 = 0;
	int iLocal_176 = 0;
	int iLocal_177 = 0;
	var uLocal_178 = 0;
	int iLocal_179 = 0;
	int iLocal_180 = 0;
	int iLocal_181 = 0;
	int iLocal_182 = 0;
	int iLocal_183 = 0;
	int iLocal_184 = 0;
	int iLocal_185 = 0;
	int iLocal_186 = 0;
	int iLocal_187 = 0;
	int iLocal_188 = 0;
	int iLocal_189 = 0;
	int iLocal_190 = 0;
	int iLocal_191 = 0;
	int iLocal_192 = 0;
	int iLocal_193 = 0;
	int iLocal_194 = 0;
	int iLocal_195 = 0;
	int iLocal_196 = 0;
	int iLocal_197 = 0;
	int iLocal_198 = 0;
	int iLocal_199 = 0;
	int iLocal_200 = 0;
	int iLocal_201 = 0;
	int iLocal_202[2] = { 0, 0 };
	int iLocal_205 = 0;
	int iLocal_206[2] = { 0, 0 };
	int iLocal_209 = 0;
	int iLocal_210 = 0;
	int iLocal_211 = 0;
	int iLocal_212 = 0;
	int iLocal_213 = 0;
	int iLocal_214 = 0;
	int iLocal_215[1] = { 0 };
	int iLocal_217[13] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
	int iLocal_231[13] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
	int iLocal_245[13] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
	int iLocal_259[13] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
	int iLocal_273 = 0;
	int iLocal_274 = 0;
	int iLocal_275[13] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
	int iLocal_289 = 0;
	int iLocal_290 = 0;
	int iLocal_291 = 0;
	int iLocal_292[2] = { 0, 0 };
	int iLocal_295 = 0;
	int iLocal_296 = 0;
	int iLocal_297 = 0;
	int iLocal_298 = 0;
	int iLocal_299 = 0;
	int iLocal_300 = 0;
	var uLocal_301 = 0;
	int iLocal_302 = 0;
	int iLocal_303 = 0;
	int iLocal_304 = 0;
	int iLocal_305 = 0;
	int iLocal_306 = 0;
	int iLocal_307 = 0;
	int iLocal_308 = 0;
	int iLocal_309 = 0;
	int iLocal_310 = 0;
	vector3 vLocal_311 = { 0f, 0f, 0f };
	vector3 vLocal_314 = { 0f, 0f, 0f };
	vector3 vLocal_317 = { 0f, 0f, 0f };
	vector3 vLocal_320 = { 0f, 0f, 0f };
	float fLocal_323 = 0f;
	char* sLocal_324 = NULL;
	var uLocal_325[4] = { 0, 0, 0, 0 };
	var uLocal_330 = 0;
	var uLocal_331 = 0;
	var uLocal_332 = 0;
	var uLocal_333 = 4;
	var uLocal_334 = 0;
	var uLocal_335 = 0;
	var uLocal_336 = 0;
	var uLocal_337 = 0;
	var uLocal_338 = 4;
	var uLocal_339 = 0;
	var uLocal_340 = 0;
	var uLocal_341 = 0;
	var uLocal_342 = 0;
	var uLocal_343 = 4;
	var uLocal_344 = 0;
	var uLocal_345 = 0;
	var uLocal_346 = 0;
	var uLocal_347 = 0;
	var uLocal_348 = 0;
	var uLocal_349 = 4;
	var uLocal_350 = 0;
	var uLocal_351 = 0;
	var uLocal_352 = 0;
	var uLocal_353 = 0;
	var uLocal_354 = 4;
	var uLocal_355 = 0;
	var uLocal_356 = 0;
	var uLocal_357 = 0;
	var uLocal_358 = 0;
	var uLocal_359 = 4;
	var uLocal_360 = 0;
	var uLocal_361 = 0;
	var uLocal_362 = 0;
	var uLocal_363 = 0;
	var uLocal_364 = 0;
	var uLocal_365 = 0;
	var uLocal_366 = 0;
	var uLocal_367 = 0;
	var uLocal_368 = 0;
	var uLocal_369 = 8;
	var uLocal_370 = 0;
	var uLocal_371 = 0;
	var uLocal_372 = 0;
	var uLocal_373 = 0;
	var uLocal_374 = 0;
	var uLocal_375 = 0;
	var uLocal_376 = 0;
	var uLocal_377 = 0;
	var uLocal_378 = 0;
	var uLocal_379 = 0;
	var uLocal_380 = 0;
	var uLocal_381 = 0;
	var uLocal_382 = 0;
	var uLocal_383 = 0;
	var uLocal_384 = 0;
	var uLocal_385 = 0;
	var uLocal_386 = 0;
	var uLocal_387 = 0;
	var uLocal_388 = 0;
	var uLocal_389 = 0;
	var uLocal_390 = 0;
	var uLocal_391 = 0;
	var uLocal_392 = 0;
	var uLocal_393 = 0;
	var uLocal_394 = 0;
	var uLocal_395 = 0;
	var uLocal_396 = 0;
	var uLocal_397 = 0;
	var uLocal_398 = 0;
	var uLocal_399 = 0;
	var uLocal_400 = 0;
	var uLocal_401 = 0;
	var uLocal_402 = 0;
	var uLocal_403 = 16;
	var uLocal_404 = 0;
	var uLocal_405 = 0;
	var uLocal_406 = 0;
	var uLocal_407 = 0;
	var uLocal_408 = 0;
	var uLocal_409 = 0;
	var uLocal_410 = 0;
	var uLocal_411 = 0;
	var uLocal_412 = 0;
	var uLocal_413 = 0;
	var uLocal_414 = 0;
	var uLocal_415 = 0;
	var uLocal_416 = 0;
	var uLocal_417 = 0;
	var uLocal_418 = 0;
	var uLocal_419 = 0;
	var uLocal_420 = 0;
	var uLocal_421 = 0;
	var uLocal_422 = 0;
	var uLocal_423 = 0;
	var uLocal_424 = 0;
	var uLocal_425 = 0;
	var uLocal_426 = 0;
	var uLocal_427 = 0;
	var uLocal_428 = 0;
	var uLocal_429 = 0;
	var uLocal_430 = 0;
	var uLocal_431 = 0;
	var uLocal_432 = 0;
	var uLocal_433 = 0;
	var uLocal_434 = 0;
	var uLocal_435 = 0;
	var uLocal_436 = 0;
	var uLocal_437 = 0;
	var uLocal_438 = 0;
	var uLocal_439 = 0;
	var uLocal_440 = 0;
	var uLocal_441 = 0;
	var uLocal_442 = 0;
	var uLocal_443 = 0;
	var uLocal_444 = 0;
	var uLocal_445 = 0;
	var uLocal_446 = 0;
	var uLocal_447 = 0;
	var uLocal_448 = 0;
	var uLocal_449 = 0;
	var uLocal_450 = 0;
	var uLocal_451 = 0;
	var uLocal_452 = 0;
	var uLocal_453 = 0;
	var uLocal_454 = 0;
	var uLocal_455 = 0;
	var uLocal_456 = 0;
	var uLocal_457 = 0;
	var uLocal_458 = 0;
	var uLocal_459 = 0;
	var uLocal_460 = 0;
	var uLocal_461 = 0;
	var uLocal_462 = 0;
	var uLocal_463 = 0;
	var uLocal_464 = 0;
	var uLocal_465 = 0;
	var uLocal_466 = 0;
	var uLocal_467 = 0;
	var uLocal_468 = 0;
	var uLocal_469 = 0;
	var uLocal_470 = 0;
	var uLocal_471 = 0;
	var uLocal_472 = 0;
	var uLocal_473 = 0;
	var uLocal_474 = 0;
	var uLocal_475 = 0;
	var uLocal_476 = 0;
	var uLocal_477 = 0;
	var uLocal_478 = 0;
	var uLocal_479 = 0;
	var uLocal_480 = 0;
	var uLocal_481 = 0;
	var uLocal_482 = 0;
	var uLocal_483 = 0;
	var uLocal_484 = 0;
	var uLocal_485 = 0;
	var uLocal_486 = 0;
	var uLocal_487 = 0;
	var uLocal_488 = 0;
	var uLocal_489 = 0;
	var uLocal_490 = 0;
	var uLocal_491 = 0;
	var uLocal_492 = 0;
	var uLocal_493 = 0;
	var uLocal_494 = 0;
	var uLocal_495 = 0;
	var uLocal_496 = 0;
	var uLocal_497 = 0;
	var uLocal_498 = 0;
	var uLocal_499 = 0;
	var uLocal_500 = 0;
	var uLocal_501 = 0;
	var uLocal_502 = 0;
	var uLocal_503 = 0;
	var uLocal_504 = 0;
	var uLocal_505 = 0;
	var uLocal_506 = 0;
	var uLocal_507 = 0;
	var uLocal_508 = 0;
	var uLocal_509 = 0;
	var uLocal_510 = 0;
	var uLocal_511 = 0;
	var uLocal_512 = 0;
	var uLocal_513 = 0;
	var uLocal_514 = 0;
	var uLocal_515 = 0;
	var uLocal_516 = 0;
	var uLocal_517 = 0;
	var uLocal_518 = 0;
	var uLocal_519 = 0;
	var uLocal_520 = 0;
	var uLocal_521 = 0;
	var uLocal_522 = 0;
	var uLocal_523 = 0;
	var uLocal_524 = 0;
	var uLocal_525 = 0;
	var uLocal_526 = 0;
	var uLocal_527 = 0;
	var uLocal_528 = 0;
	var uLocal_529 = 0;
	var uLocal_530 = 0;
	var uLocal_531 = 0;
	var uLocal_532 = 0;
	var uLocal_533 = 0;
	var uLocal_534 = 0;
	var uLocal_535 = 0;
	var uLocal_536 = 0;
	var uLocal_537 = 0;
	var uLocal_538 = 0;
	var uLocal_539 = 0;
	var uLocal_540 = 0;
	var uLocal_541 = 0;
	var uLocal_542 = 0;
	var uLocal_543 = 0;
	var uLocal_544 = 0;
	var uLocal_545 = 0;
	var uLocal_546 = 0;
	var uLocal_547 = 0;
	var uLocal_548 = 0;
	var uLocal_549 = 0;
	var uLocal_550 = 0;
	var uLocal_551 = 0;
	var uLocal_552 = 0;
	var uLocal_553 = 0;
	var uLocal_554 = 0;
	var uLocal_555 = 0;
	var uLocal_556 = 0;
	var uLocal_557 = 0;
	var uLocal_558 = 0;
	var uLocal_559 = 0;
	var uLocal_560 = 0;
	var uLocal_561 = 0;
	var uLocal_562 = 0;
	var uLocal_563 = 0;
	var uLocal_564 = 0;
	var uLocal_565 = 0;
	var uLocal_566 = 0;
	var uLocal_567 = 0;
	var uLocal_568 = 3;
	var uLocal_569 = 0;
	var uLocal_570 = 0;
	var uLocal_571 = 0;
	int iLocal_572 = 0;
#endregion

void __EntryFunction__()//Position - 0x0
{
	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;
	vLocal_311 = { -2145.486f, 3018.294f, 31.81f };
	vLocal_314 = { 1744.308f, 3270.673f, 40.2076f };
	fLocal_323 = 330.4836f;
	gameplay::set_mission_flag(1);
	if (player::has_force_cleanup_occurred(3))
	{
		func_249();
		func_247();
	}
	gameplay::_set_weather_type_over_time("EXTRASUNNY", 30f);
	func_245();
	if (!func_244())
	{
		iLocal_28 = 0;
	}
	else
	{
		iLocal_28 = 1;
	}
	while (true)
	{
		system::wait(0);
		unk1::_0x208784099002BC30("M_ThePortOfLSHeistPrep2B", 0);
		func_243();
		func_237();
		func_236();
		func_235();
		func_233();
		switch (iLocal_28)
		{
			case 0:
				func_232();
				break;
			
			case 1:
				func_227();
				break;
			
			case 2:
				func_209();
				break;
			
			case 3:
				func_201();
				break;
			
			case 4:
				func_116();
				break;
			
			case 5:
				func_28();
				break;
			
			case 6:
				func_4();
				break;
		}
		if (iLocal_28 != 6)
		{
			if (iLocal_197 == 1)
			{
				func_1();
			}
		}
	}
}

void func_1()//Position - 0x149
{
	if ((iLocal_28 == 2 || iLocal_28 == 3) || iLocal_28 == 4)
	{
		if (iLocal_200 == 1)
		{
			func_3(1);
			return;
		}
	}
	if (iLocal_28 == 2)
	{
		if (entity::does_entity_exist(iLocal_48))
		{
			if (vehicle::is_vehicle_driveable(iLocal_48, 0))
			{
				if (func_2(iLocal_48, player::player_ped_id(), 1) > 850f)
				{
					func_3(2);
					return;
				}
			}
		}
	}
	if (iLocal_28 == 3 || iLocal_28 == 4)
	{
		if (entity::does_entity_exist(iLocal_48))
		{
			if (vehicle::is_vehicle_driveable(iLocal_48, 0))
			{
				if (func_2(iLocal_48, player::player_ped_id(), 1) > 100f)
				{
					func_3(2);
					return;
				}
				else if ((vehicle::is_vehicle_stuck_timer_up(iLocal_48, 3, 30000) || vehicle::is_vehicle_stuck_timer_up(iLocal_48, 1, 40000)) || vehicle::is_vehicle_stuck_timer_up(iLocal_48, 0, 7000))
				{
					func_3(3);
					return;
				}
			}
		}
	}
}

float func_2(int iParam0, int iParam1, int iParam2)//Position - 0x228
{
	vector3 vVar0;
	vector3 vVar3;
	
	if (!entity::is_entity_dead(iParam0, 0))
	{
		vVar0 = { entity::get_entity_coords(iParam0, 1) };
	}
	else
	{
		vVar0 = { entity::get_entity_coords(iParam0, 0) };
	}
	if (!entity::is_entity_dead(iParam1, 0))
	{
		vVar3 = { entity::get_entity_coords(iParam1, 1) };
	}
	else
	{
		vVar3 = { entity::get_entity_coords(iParam1, 0) };
	}
	return gameplay::get_distance_between_coords(vVar0, vVar3, iParam2);
}

void func_3(int iParam0)//Position - 0x286
{
	iLocal_29 = iParam0;
	if (iLocal_28 != 6)
	{
		iLocal_28 = 6;
		iLocal_175 = 0;
	}
}

void func_4()//Position - 0x29E
{
	switch (iLocal_175)
	{
		case 0:
			ui::clear_prints();
			ui::clear_help(1);
			switch (iLocal_29)
			{
				case 0:
					break;
				
				case 1:
					sLocal_324 = "DP_FAIL1";
					break;
				
				case 2:
					sLocal_324 = "DP_FAIL2";
					break;
				
				case 3:
					sLocal_324 = "DP_FAIL3";
					break;
			}
			if (iLocal_29 == 0)
			{
				func_13(0);
			}
			else
			{
				func_11(sLocal_324);
			}
			iLocal_175 = 1;
			break;
		
		case 1:
			if (func_10())
			{
				if (func_9())
				{
				}
				else
				{
					func_7(-1139.164f, 2662.465f, 16.9873f, 74.9925f);
					func_5(-1147.504f, 2663.104f, 17.0938f, 40.2433f);
				}
				func_247();
			}
			break;
	}
}

void func_5(vector3 vParam0, float fParam3)//Position - 0x362
{
	func_6(&(Global_95993.f_2311), vParam0, fParam3);
}

void func_6(var uParam0, vector3 vParam1, var uParam4)//Position - 0x37B
{
	*uParam0 = { vParam1 };
	uParam0->f_6 = uParam4;
}

void func_7(vector3 vParam0, float fParam3)//Position - 0x391
{
	if (func_8(Global_69937, 0f, 0f, 0f, 0))
	{
		Global_69937 = { vParam0 };
		Global_69940 = fParam3;
	}
}

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

bool func_9()//Position - 0x404
{
	if (Global_91486 == 7)
	{
		return true;
	}
	return false;
}

bool func_10()//Position - 0x419
{
	if (Global_3)
	{
		return true;
	}
	if (Global_91486 == 7 || Global_91486 == 8)
	{
		return true;
	}
	return false;
}

void func_11(char* sParam0)//Position - 0x446
{
	func_12(sParam0);
	func_13(0);
}

void func_12(char* sParam0)//Position - 0x459
{
	if (!gameplay::is_string_null_or_empty(sParam0))
	{
		if (ui::get_length_of_literal_string(sParam0) <= 16)
		{
			StringCopy(&Global_69929, sParam0, 16);
			StringCopy(&Global_69933, "", 16);
			if (unk1::_is_recording())
			{
				unk1::_stop_recording_and_save_clip();
			}
		}
	}
}

void func_13(int iParam0)//Position - 0x498
{
	int iVar0;
	
	if (Global_101652.f_8028 || func_27(0))
	{
		iVar0 = func_26();
		if (!func_14(iVar0))
		{
			return;
		}
		gameplay::set_bit(&(Global_82571[iVar0 /*5*/].f_1), 5);
		Global_91522 = iParam0;
	}
}

bool func_14(int iParam0)//Position - 0x4DD
{
	var uVar0;
	int iVar1;
	
	func_19();
	if (player::is_player_playing(player::player_id()))
	{
		player::start_firing_amnesty(5000);
	}
	uVar0 = Global_82571[iParam0 /*5*/];
	iVar1 = Global_69966.f_109[uVar0 /*4*/];
	func_18(iVar1, 1);
	player::_0xC9A763D8FE87436A(player::player_id());
	player::special_ability_deactivate(player::player_id());
	func_15(&(Global_101652.f_2079.f_539), iVar1);
	if (Global_85994 == Global_91523)
	{
		Global_101652.f_8028.f_330[iVar1 /*6*/].f_1++;
	}
	if (!gameplay::is_bit_set(Global_82607[iVar1 /*34*/].f_15, 1))
	{
		if (!player::is_player_playing(player::player_id()))
		{
			gameplay::set_fade_in_after_death_arrest(0);
		}
	}
	Global_101652.f_8028.f_330[iVar1 /*6*/].f_2++;
	Global_85994 = Global_91523;
	if (iParam0 == -1)
	{
		if (Global_101652.f_8028)
		{
		}
		return false;
	}
	if (gameplay::is_bit_set(Global_82571[iParam0 /*5*/].f_1, 4))
	{
		return false;
	}
	if (gameplay::is_bit_set(Global_82571[iParam0 /*5*/].f_1, 5))
	{
		return false;
	}
	return true;
}

void func_15(var uParam0, int iParam1)//Position - 0x5F4
{
	int iVar0;
	int iVar1;
	vector3 vVar2;
	float fVar5;
	
	if (iParam1 == 94)
	{
		return;
	}
	iVar0 = 0;
	while (iVar0 < 3)
	{
		iVar1 = Global_101652.f_17476[iVar0];
		if ((((iVar1 == 8 || iVar1 == 9) || iVar1 == 10) || (((iVar1 == 11 || iVar1 == 34) || iVar1 == 72) || iVar1 == 73)) && !gameplay::is_bit_set(Global_101652.f_8028.f_99.f_219[0], 9))
		{
		}
		else
		{
			vVar2 = { 0f, 0f, 0f };
			fVar5 = 0f;
			if (!func_17(Global_101652.f_17476[iVar0], &vVar2, &fVar5))
			{
				Global_101652.f_17476[iVar0] = 318;
				func_16(&(uParam0->f_1524[iVar0]));
				uParam0->f_1528[iVar0 /*3*/] = { 0f, 0f, 0f };
				uParam0->f_1538[iVar0] = 0f;
				uParam0->f_1542[iVar0] = 0;
				uParam0->f_1546[iVar0 /*3*/] = { 0f, 0f, 0f };
				uParam0->f_1556[iVar0] = 0;
				Global_89209[iVar0 /*29*/] = { 0f, 0f, 0f };
				Global_89209[iVar0 /*29*/].f_9 = 0f;
				Global_89209[iVar0 /*29*/].f_12 = 0f;
				Global_89209[iVar0 /*29*/].f_3 = { 0f, 0f, 0f };
				Global_89209[iVar0 /*29*/].f_10 = 0f;
				Global_89209[iVar0 /*29*/].f_13 = 0f;
				Global_89209[iVar0 /*29*/].f_6 = { 0f, 0f, 0f };
				Global_89209[iVar0 /*29*/].f_11 = 0f;
				Global_89209[iVar0 /*29*/].f_14 = 0f;
				Global_89209[iVar0 /*29*/].f_17 = { 0f, 0f, 0f };
				Global_89209[iVar0 /*29*/].f_26 = 0f;
				Global_89209[iVar0 /*29*/].f_20 = { 0f, 0f, 0f };
				Global_89209[iVar0 /*29*/].f_27 = 0f;
				Global_89209[iVar0 /*29*/].f_23 = { 0f, 0f, 0f };
				Global_89209[iVar0 /*29*/].f_28 = 0f;
			}
		}
		iVar0++;
	}
}

void func_16(var uParam0)//Position - 0x7BD
{
	*uParam0 = -15;
}

int func_17(int iParam0, var uParam1, float fParam2)//Position - 0x7CB
{
	switch (iParam0)
	{
		case 11:
			*uParam1 = { 115.1569f, -1286.684f, 28.2613f };
			*fParam2 = 111f;
			return 1;
			break;
		
		case 8:
			*uParam1 = { -90.0089f, -1324.195f, 28.3203f };
			*fParam2 = 194.1887f;
			return 1;
			break;
		
		case 9:
			return func_17(8, uParam1, fParam2);
			break;
		
		case 10:
			return func_17(8, uParam1, fParam2);
			break;
		
		case 13:
			*uParam1 = { -807.2979f, -48.4004f, 36.8173f };
			*fParam2 = 201.6328f;
			return 1;
			break;
		
		case 14:
			*uParam1 = { 1432.34f, -1887.383f, 70.5768f };
			*fParam2 = 350.0509f;
			return 1;
			break;
		
		case 15:
			*uParam1 = { 1666.204f, 1967.25f, 143.3213f };
			*fParam2 = 0.7896f;
			return 1;
			break;
		
		case 12:
			*uParam1 = { -1440.22f, -127.02f, 50f };
			*fParam2 = 42f;
			return 1;
			break;
		
		case 16:
			*uParam1 = { 135.055f, -1759.64f, 27.8957f };
			*fParam2 = -129f;
			return 1;
			break;
		
		case 17:
			*uParam1 = { 687.6992f, -1744.03f, 28.3624f };
			*fParam2 = 267.1409f;
			return 1;
			break;
		
		case 18:
			*uParam1 = { 56.5117f, -744.6122f, 43.1356f };
			*fParam2 = 340.0526f;
			return 1;
			break;
		
		case 19:
			*uParam1 = { 506.485f, -1884.967f, 24.764f };
			*fParam2 = 22.9566f;
			return 1;
			break;
		
		case 20:
			*uParam1 = { 1555.958f, 953.6136f, 77.2063f };
			*fParam2 = 152.8118f;
			return 1;
			break;
		
		case 21:
			*uParam1 = { 0f, 0f, 0f };
			*fParam2 = 0f;
			return 1;
			break;
		
		case 22:
			*uParam1 = { 220.72f, -64.4177f, 68.2922f };
			*fParam2 = (250.4535f - 360f);
			return 1;
			break;
		
		case 74:
			*uParam1 = { 2048.07f, 3840.84f, 34.2238f };
			*fParam2 = 119.603f;
			return 1;
			break;
		
		case 23:
			*uParam1 = { -464.22f, -1592.98f, 38.73f };
			*fParam2 = 168f;
			return 1;
			break;
		
		case 24:
			*uParam1 = { (744.79f + 0.0186f), (-465.86f - 0.0114f), 36.6399f };
			*fParam2 = 51.7279f;
			return 1;
			break;
		
		case 67:
			*uParam1 = { -9f, 508.1f, 173.6278f };
			*fParam2 = 151.2504f;
			return 1;
			break;
		
		case 25:
			*uParam1 = { 72.2278f, -1464.68f, 28.2915f };
			*fParam2 = 156.8827f;
			return 1;
			break;
		
		case 27:
			*uParam1 = { 763f, -906f, 24.2312f };
			*fParam2 = 7.2736f;
			return 1;
			break;
		
		case 26:
			*uParam1 = { 257.9167f, -1120.786f, 28.3684f };
			*fParam2 = 97.2736f;
			return 1;
			break;
		
		case 28:
			*uParam1 = { 422.5858f, -978.6332f, 69.7073f };
			*fParam2 = 4f;
			return 1;
			break;
		
		case 29:
			*uParam1 = { 0f, 0f, 0f };
			*fParam2 = 0f;
			return 1;
			break;
		
		case 30:
			*uParam1 = { 0f, 0f, 0f };
			*fParam2 = 0f;
			return 1;
			break;
		
		case 31:
			*uParam1 = { 0f, 0f, 0f };
			*fParam2 = 0f;
			return 1;
			break;
		
		case 32:
			*uParam1 = { 0f, 0f, 0f };
			*fParam2 = 0f;
			return 1;
			break;
		
		case 33:
			*uParam1 = { 0f, 0f, 0f };
			*fParam2 = 0f;
			return 1;
			break;
		
		case 34:
			*uParam1 = { 0f, 0f, 0f };
			*fParam2 = 0f;
			return 1;
			break;
		
		case 35:
			*uParam1 = { 0f, 0f, 0f };
			*fParam2 = 0f;
			return 1;
			break;
		
		case 36:
			*uParam1 = { 0f, 0f, 0f };
			*fParam2 = 0f;
			return 1;
			break;
		
		case 37:
			*uParam1 = { 0f, 0f, 0f };
			*fParam2 = 0f;
			return 1;
			break;
		
		case 58:
			*uParam1 = { 294.8521f, 882.9366f, 197.8527f };
			*fParam2 = 162.693f;
			return 1;
			break;
		
		case 59:
			*uParam1 = { -1771.802f, 794.4316f, 138.4211f };
			*fParam2 = 128.9946f;
			return 1;
			break;
		
		case 60:
			*uParam1 = { 1495.595f, -1848.821f, 70.2075f };
			*fParam2 = 32.2721f;
			return 1;
			break;
		
		case 38:
			*uParam1 = { 2897.554f, 4032.241f, 50.1419f };
			*fParam2 = 192.8091f;
			return 1;
			break;
		
		case 39:
			*uParam1 = { 1973.355f, 3818.204f, 32.005f };
			*fParam2 = 32f;
			return 1;
			break;
		
		case 40:
			*uParam1 = { 1973.355f, 3818.204f, 32.005f };
			*fParam2 = 32f;
			return 1;
			break;
		
		case 41:
			*uParam1 = { 1397f, 3725.8f, 33.0673f };
			*fParam2 = -3.7534f;
			return 1;
			break;
		
		case 42:
			*uParam1 = { Vector(4.0205f, -2975.341f, 798.4536f) + Vector(1f, 0f, 0f) };
			*fParam2 = 90f;
			return 1;
			break;
		
		case 43:
			*uParam1 = { 709.0244f, -2916.479f, 5.0589f };
			*fParam2 = 355.326f;
			return 1;
			break;
		
		case 44:
			*uParam1 = { 643.5248f, -2917.325f, 5.1337f };
			*fParam2 = 334.1068f;
			return 1;
			break;
		
		case 45:
			*uParam1 = { 595.2742f, -2819.183f, 5.0559f };
			*fParam2 = 46.8853f;
			return 1;
			break;
		
		case 46:
			*uParam1 = { 0f, 0f, 0f };
			*fParam2 = 0f;
			return 1;
			break;
		
		case 47:
			*uParam1 = { 314.4171f, 965.207f, 208.4024f };
			*fParam2 = 165.9421f;
			return 1;
			break;
		
		case 49:
			*uParam1 = { 3321.537f, 4975.455f, 25.9097f };
			*fParam2 = 221.228f;
			return 1;
			break;
		
		case 48:
			*uParam1 = { -111.1318f, 6316.479f, 30.4904f };
			*fParam2 = (42f + 180f);
			return 1;
			break;
		
		case 50:
			*uParam1 = { -731.3261f, 106.68f, 54.7169f };
			*fParam2 = 98.9764f;
			return 1;
			break;
		
		case 51:
			*uParam1 = { -1257.5f, -526.9999f, 30.2361f };
			*fParam2 = 220.9554f;
			return 1;
			break;
		
		case 52:
			*uParam1 = { 736.9869f, -2050.678f, 28.2718f };
			*fParam2 = 83.9922f;
			return 1;
			break;
		
		case 66:
			*uParam1 = { 262.5499f, -2540.15f, 4.8433f };
			*fParam2 = -64.1366f;
			return 1;
			break;
		
		case 53:
			*uParam1 = { 0f, 0f, 0f };
			*fParam2 = 0f;
			return 1;
			break;
		
		case 55:
			*uParam1 = { -315.7789f, 6201.355f, 30.4322f };
			*fParam2 = 127.7547f;
			return 1;
			break;
		
		case 56:
			*uParam1 = { 118.0988f, -1264.916f, 32.3637f };
			*fParam2 = -63f;
			return 1;
			break;
		
		case 57:
			*uParam1 = { 37.5988f, -1351.52f, 28.2954f };
			*fParam2 = 90.0339f;
			return 1;
			break;
		
		case 61:
			*uParam1 = { -558.2693f, 261.1167f, 82.07f };
			*fParam2 = 84.6231f;
			return 1;
			break;
		
		case 62:
			*uParam1 = { -196.9999f, 507.9999f, 132.477f };
			*fParam2 = 99.6049f;
			return 1;
			break;
		
		case 63:
			*uParam1 = { 1312.01f, -1645.87f, 51.2f };
			*fParam2 = 120f;
			return 1;
			break;
		
		case 68:
			*uParam1 = { 0f, 0f, 0f };
			*fParam2 = 0f;
			return 1;
			break;
		
		case 69:
			*uParam1 = { -818.7374f, 6.4824f, 41.2432f };
			*fParam2 = 211.8223f;
			return 1;
			break;
		
		case 64:
			*uParam1 = { 2091.258f, 4714.852f, 40.1936f };
			*fParam2 = 136.0867f;
			return 1;
			break;
		
		case 54:
			*uParam1 = { 1762.59f, 3247.212f, 40.735f };
			*fParam2 = 27.0648f;
			return 1;
			break;
		
		case 65:
			*uParam1 = { 1764.013f, 3252.902f, 40.735f };
			*fParam2 = 27.0648f;
			return 1;
			break;
		
		case 70:
			*uParam1 = { 0f, 0f, 0f };
			*fParam2 = 0f;
			return 1;
			break;
		
		case 71:
			*uParam1 = { 0f, 0f, 0f };
			*fParam2 = 0f;
			return 1;
			break;
		
		case 72:
			*uParam1 = { 0f, 0f, 0f };
			*fParam2 = 0f;
			return 1;
			break;
		
		case 73:
			*uParam1 = { 0f, 0f, 0f };
			*fParam2 = 0f;
			return 1;
			break;
		
		default:
			break;
	}
	return 0;
}

void func_18(int iParam0, int iParam1)//Position - 0x113A
{
	if (iParam1)
	{
		if ((iParam0 != 88 && iParam0 != 89) && iParam0 != 92)
		{
			Global_85804[iParam0 /*2*/] = 1;
		}
	}
	else
	{
		Global_85804[iParam0 /*2*/] = 0;
	}
}

void func_19()//Position - 0x1178
{
	Global_91521 = 1;
	if (player::is_player_being_arrested(player::player_id(), 1))
	{
		if (gameplay::is_string_null_or_empty(&Global_69929))
		{
			switch (func_20())
			{
				case 0:
					StringCopy(&Global_69929, "CMN_MARRE", 16);
					break;
				
				case 1:
					StringCopy(&Global_69929, "CMN_FARRE", 16);
					break;
				
				case 2:
					StringCopy(&Global_69929, "CMN_TARRE", 16);
					break;
			}
			StringCopy(&Global_69933, "", 16);
		}
		Global_91521 = 0;
	}
	else if (!player::is_player_playing(player::player_id()))
	{
		if (gameplay::is_string_null_or_empty(&Global_69929))
		{
			switch (func_20())
			{
				case 0:
					StringCopy(&Global_69929, "CMN_MDIED", 16);
					break;
				
				case 1:
					StringCopy(&Global_69929, "CMN_FDIED", 16);
					break;
				
				case 2:
					StringCopy(&Global_69929, "CMN_TDIED", 16);
					break;
			}
			StringCopy(&Global_69933, "", 16);
		}
		Global_91521 = 0;
		gameplay::set_bit(&(Global_91486.f_20), 25);
	}
}

var func_20()//Position - 0x125F
{
	func_21();
	return Global_101652.f_2079.f_539.f_3549;
}

void func_21()//Position - 0x1278
{
	int iVar0;
	
	if (entity::does_entity_exist(player::player_ped_id()))
	{
		if (func_25(Global_101652.f_2079.f_539.f_3549) != entity::get_entity_model(player::player_ped_id()))
		{
			iVar0 = func_24(player::player_ped_id());
			if (func_23(iVar0) && (!func_22(14) || Global_100604))
			{
				if (Global_101652.f_2079.f_539.f_3549 != iVar0 && func_23(Global_101652.f_2079.f_539.f_3549))
				{
					Global_101652.f_2079.f_539.f_3550 = Global_101652.f_2079.f_539.f_3549;
				}
				Global_101652.f_2079.f_539.f_3551 = iVar0;
				Global_101652.f_2079.f_539.f_3549 = iVar0;
				return;
			}
		}
		else
		{
			if (Global_101652.f_2079.f_539.f_3549 != 145)
			{
				Global_101652.f_2079.f_539.f_3551 = Global_101652.f_2079.f_539.f_3549;
			}
			return;
		}
	}
	Global_101652.f_2079.f_539.f_3549 = 145;
}

int func_22(int iParam0)//Position - 0x1375
{
	return Global_35777 == iParam0;
}

int func_23(int iParam0)//Position - 0x1383
{
	return iParam0 < 3;
}

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

int func_25(int iParam0)//Position - 0x13CC
{
	if (func_23(iParam0))
	{
		return Global_101652.f_26993[iParam0 /*29*/];
	}
	else if (iParam0 != 145)
	{
	}
	return 0;
}

int func_26()//Position - 0x13F6
{
	int iVar0;
	
	iVar0 = 0;
	iVar0 = 0;
	while (iVar0 < 7)
	{
		if (gameplay::is_bit_set(Global_82571[iVar0 /*5*/].f_1, 2))
		{
			return iVar0;
		}
		iVar0++;
	}
	return -1;
}

int func_27(int iParam0)//Position - 0x142B
{
	if (!iParam0 && script::_get_number_of_instances_of_streamed_script(joaat("benchmark")) > 0)
	{
		return true;
	}
	return gameplay::is_bit_set(Global_69945, 0);
}

void func_28()//Position - 0x1456
{
	func_108();
	if (iLocal_175 == 0)
	{
		if (iLocal_196 == 1)
		{
			iLocal_197 = 0;
			func_33();
			iLocal_196 = 0;
		}
		if (entity::does_entity_exist(iLocal_48))
		{
			entity::freeze_entity_position(iLocal_48, false);
		}
		if (!ped::is_ped_injured(player::player_ped_id()))
		{
			ped::set_ped_using_action_mode(player::player_ped_id(), false, -1, 0);
		}
		if (cam::is_screen_faded_out())
		{
			streaming::load_scene(entity::get_entity_coords(player::player_ped_id(), 1));
		}
		if (!cam::is_screen_faded_in())
		{
			cam::do_screen_fade_in(800);
		}
		player::set_player_control(player::player_id(), false, 0);
		if (entity::does_entity_exist(iLocal_48))
		{
			if (vehicle::is_vehicle_driveable(iLocal_48, 0))
			{
				if (ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_48, 0))
				{
					ai::task_leave_vehicle(player::player_ped_id(), iLocal_48, 0);
				}
			}
		}
		iLocal_197 = 1;
		iLocal_175 = 1;
	}
	if (iLocal_175 == 1)
	{
		if (entity::does_entity_exist(iLocal_48))
		{
			if (vehicle::is_vehicle_driveable(iLocal_48, 0))
			{
				if (!ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_48, 1))
				{
					vehicle::set_vehicle_door_shut(iLocal_48, 0, 0);
					vehicle::set_vehicle_door_shut(iLocal_48, 1, 0);
					vehicle::set_vehicle_doors_locked(iLocal_48, 2);
					vehicle::set_vehicle_is_considered_by_player(iLocal_48, 0);
					entity::freeze_entity_position(iLocal_48, true);
					func_29();
				}
			}
		}
	}
}

void func_29()//Position - 0x154F
{
	func_31(0, 0);
	func_30(1, 1);
	func_247();
}

void func_30(int iParam0, int iParam1)//Position - 0x1567
{
	Global_69965 = iParam1;
	if (Global_55812)
	{
		return;
	}
	if (Global_55839)
	{
		Global_55839 = 0;
		return;
	}
	if (script::_get_number_of_instances_of_streamed_script(joaat("mission_stat_watcher")) > 0)
	{
		if (Global_55812)
		{
		}
		Global_55838 = iParam0;
		Global_55812 = 1;
		Global_55823 = 1;
	}
}

void func_31(int iParam0, int iParam1)//Position - 0x15B1
{
	int iVar0;
	var uVar1;
	var uVar2;
	
	if (!Global_55820)
	{
		Global_55820 = iParam1;
	}
	if (iParam0)
	{
		if ((func_27(0) && Global_69943.f_1 == 1) && func_32(Global_69943))
		{
		}
		else
		{
			Global_55818 = 1;
		}
	}
	if (Global_101652.f_8028 || func_27(0))
	{
		iVar0 = func_26();
		uVar1 = Global_82571[iVar0 /*5*/];
		uVar2 = Global_69966.f_109[uVar1 /*4*/];
		if (iVar0 == -1)
		{
			if (Global_101652.f_8028)
			{
			}
			return;
		}
		if (gameplay::is_bit_set(Global_82571[iVar0 /*5*/].f_1, 4))
		{
			return;
		}
		if (gameplay::is_bit_set(Global_82571[iVar0 /*5*/].f_1, 5))
		{
			return;
		}
		gameplay::set_bit(&(Global_82571[iVar0 /*5*/].f_1), 4);
		gameplay::set_bit(&Global_69945, 1);
		Global_69961 = uVar2;
		Global_69962 = gameplay::get_game_timer();
	}
}

bool func_32(int iParam0)//Position - 0x1687
{
	switch (iParam0)
	{
		case 71:
			return true;
			break;
		
		case 86:
			return true;
			break;
		
		case 91:
			return true;
			break;
		
		default:
			return false;
			break;
	}
	return false;
}

void func_33()//Position - 0x16C5
{
	func_106();
	func_105();
	func_36();
	if (!func_35() || func_27(0))
	{
		func_34();
	}
	cam::set_gameplay_cam_relative_heading(0f);
}

void func_34()//Position - 0x16F5
{
	switch (iLocal_28)
	{
		case 2:
			ai::clear_ped_tasks(player::player_ped_id());
			if (entity::does_entity_exist(iLocal_55))
			{
				if (!ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_55, 0))
				{
					ped::set_ped_into_vehicle(player::player_ped_id(), iLocal_55, -1);
				}
			}
			else
			{
				entity::set_entity_coords(player::player_ped_id(), -1565.084f, 2780.813f, 16.4022f, 1, false, 0, 1);
				entity::set_entity_heading(player::player_ped_id(), 53.6086f);
			}
			break;
		
		case 3:
			ai::clear_ped_tasks(player::player_ped_id());
			if (func_20() == 2)
			{
				if (entity::does_entity_exist(iLocal_48))
				{
					if (vehicle::is_vehicle_driveable(iLocal_48, 0))
					{
						if (!ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_48, 0))
						{
							ped::set_ped_into_vehicle(player::player_ped_id(), iLocal_48, -1);
						}
						entity::freeze_entity_position(iLocal_48, false);
					}
				}
			}
			break;
		
		case 4:
			ai::clear_ped_tasks(player::player_ped_id());
			if (func_20() == 2)
			{
				if (entity::does_entity_exist(iLocal_48))
				{
					if (vehicle::is_vehicle_driveable(iLocal_48, 0))
					{
						if (!ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_48, 0))
						{
							ped::set_ped_into_vehicle(player::player_ped_id(), iLocal_48, -1);
						}
					}
				}
			}
			break;
		
		case 5:
			ai::clear_ped_tasks(player::player_ped_id());
			if (func_20() == 2)
			{
				if (entity::does_entity_exist(iLocal_48))
				{
					if (vehicle::is_vehicle_driveable(iLocal_48, 0))
					{
						if (!ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_48, 0))
						{
							ped::set_ped_into_vehicle(player::player_ped_id(), iLocal_48, -1);
						}
					}
				}
			}
			break;
	}
}

int func_35()//Position - 0x183C
{
	return gameplay::is_bit_set(Global_91486.f_20, 13);
}

void func_36()//Position - 0x1850
{
	switch (iLocal_28)
	{
		case 2:
			gameplay::clear_area(-1588.1f, 2794.9f, 17.2f, 20f, 1, 0, 0, false);
			func_98(-1720.5f, 2568.4f, 67.1f, -1523.2f, 3002f, -70f, 100f, -1155.06f, 2665.979f, 17.0939f, 219.2079f, 1, 0, 1, 0, 0);
			gameplay::clear_area_of_objects(-1588.1f, 2794.9f, 17.2f, 20f, 6);
			streaming::request_model(joaat("cargobob"));
			streaming::request_model(joaat("s_m_y_marine_01"));
			streaming::request_model(joaat("s_m_m_pilot_02"));
			streaming::request_model(joaat("buzzard"));
			while (((!streaming::has_model_loaded(joaat("cargobob")) || !streaming::has_model_loaded(joaat("s_m_y_marine_01"))) || !streaming::has_model_loaded(joaat("s_m_m_pilot_02"))) || !streaming::has_model_loaded(joaat("buzzard")))
			{
				system::wait(0);
			}
			if (func_244())
			{
				if (func_97())
				{
					if (!vehicle::is_this_model_a_heli(func_96()) && !vehicle::is_this_model_a_plane(func_96()))
					{
						func_94();
						while (!func_93())
						{
							system::wait(0);
						}
					}
				}
			}
			iLocal_201 = 0;
			iLocal_176 = 0;
			while (iLocal_176 <= 12)
			{
				iLocal_275[iLocal_176] = 0;
				iLocal_176++;
			}
			if (!entity::does_entity_exist(iLocal_48))
			{
				gameplay::clear_area(vLocal_311, 10f, 1, 0, 0, false);
				iLocal_48 = vehicle::create_vehicle(joaat("cargobob"), vLocal_311, fLocal_323, 1, true);
				vehicle::set_vehicle_can_be_targetted(iLocal_48, 0);
				entity::freeze_entity_position(iLocal_48, true);
				entity::set_entity_load_collision_flag(iLocal_48, true);
				streaming::set_model_as_no_longer_needed(joaat("cargobob"));
				vehicle::set_vehicle_model_is_suppressed(joaat("cargobob"), true);
				vehicle::set_vehicle_strong(iLocal_48, true);
				vehicle::set_vehicle_engine_can_degrade(iLocal_48, false);
				func_92(iLocal_48, 0);
			}
			func_89();
			if (!entity::does_entity_exist(iLocal_49[0]))
			{
				if (streaming::has_model_loaded(joaat("buzzard")))
				{
					gameplay::clear_area(-1866.446f, 3071.395f, 31.8104f, 10f, 1, 0, 0, false);
					iLocal_49[0] = vehicle::create_vehicle(joaat("buzzard"), -1866.446f, 3071.395f, 31.8104f, 150.2863f, 1, true);
					entity::set_entity_load_collision_flag(iLocal_49[0], true);
					vehicle::set_vehicle_can_be_targetted(iLocal_49[0], 1);
					vehicle::set_vehicle_on_ground_properly(iLocal_49[0], 1084227584);
					audio::_0x153973AB99FE8980(iLocal_49[0], "DH_P_2B_ENEMY_CHOPPERS", 0f);
					streaming::set_model_as_no_longer_needed(joaat("buzzard"));
					vehicle::set_vehicle_is_considered_by_player(iLocal_49[0], 0);
				}
			}
			if (func_244())
			{
				if (!entity::does_entity_exist(iLocal_55))
				{
					if (func_97())
					{
						if (!vehicle::is_this_model_a_heli(func_96()) && !vehicle::is_this_model_a_plane(func_96()))
						{
							iLocal_55 = func_37(-1535.209f, 2744.551f, 16.6437f, 47.9754f);
							streaming::set_model_as_no_longer_needed(func_96());
							vehicle::set_vehicle_has_strong_axles(iLocal_55, true);
							vehicle::set_vehicle_strong(iLocal_55, true);
						}
					}
				}
			}
			weapon::set_current_ped_weapon(player::player_ped_id(), joaat("weapon_unarmed"), true);
			player::set_player_wanted_level(player::player_id(), 0, 0);
			player::set_player_wanted_level_now(player::player_id(), 0);
			player::set_police_radar_blips(1);
			break;
		
		case 3:
			audio::prepare_alarm("PORT_OF_LS_HEIST_FORT_ZANCUDO_ALARMS");
			system::wait(1500);
			streaming::request_model(joaat("cargobob"));
			streaming::request_model(joaat("buzzard"));
			streaming::request_model(joaat("s_m_y_marine_01"));
			streaming::request_model(joaat("s_m_m_pilot_02"));
			while (((!streaming::has_model_loaded(joaat("cargobob")) || !streaming::has_model_loaded(joaat("buzzard"))) || !streaming::has_model_loaded(joaat("s_m_y_marine_01"))) || !streaming::has_model_loaded(joaat("s_m_m_pilot_02")))
			{
				system::wait(0);
			}
			iLocal_201 = 0;
			iLocal_176 = 0;
			while (iLocal_176 <= 12)
			{
				iLocal_275[iLocal_176] = 0;
				iLocal_176++;
			}
			if (!entity::does_entity_exist(iLocal_48))
			{
				gameplay::clear_area(vLocal_311, 10f, 1, 0, 0, false);
				iLocal_48 = vehicle::create_vehicle(joaat("cargobob"), vLocal_311, fLocal_323, 1, true);
				entity::freeze_entity_position(iLocal_48, true);
				entity::set_entity_load_collision_flag(iLocal_48, true);
				vehicle::set_heli_blades_full_speed(iLocal_48);
				streaming::set_model_as_no_longer_needed(joaat("cargobob"));
				vehicle::set_vehicle_model_is_suppressed(joaat("cargobob"), true);
				vehicle::set_vehicle_strong(iLocal_48, true);
				vehicle::set_vehicle_engine_can_degrade(iLocal_48, false);
				func_92(iLocal_48, 0);
			}
			func_89();
			if (!entity::does_entity_exist(iLocal_49[0]))
			{
				if (streaming::has_model_loaded(joaat("buzzard")))
				{
					gameplay::clear_area(-1866.446f, 3071.395f, 31.8104f, 10f, 1, 0, 0, false);
					iLocal_49[0] = vehicle::create_vehicle(joaat("buzzard"), -1866.446f, 3071.395f, 31.8104f, 150.2863f, 1, true);
					entity::set_entity_load_collision_flag(iLocal_49[0], true);
					vehicle::set_vehicle_can_be_targetted(iLocal_49[0], 1);
					vehicle::set_vehicle_on_ground_properly(iLocal_49[0], 1084227584);
					audio::_0x153973AB99FE8980(iLocal_49[0], "DH_P_2B_ENEMY_CHOPPERS", 0f);
					streaming::set_model_as_no_longer_needed(joaat("buzzard"));
					vehicle::set_vehicle_is_considered_by_player(iLocal_49[0], 0);
				}
			}
			if (!entity::does_entity_exist(iLocal_31[0]))
			{
				iLocal_31[0] = ped::create_ped_inside_vehicle(iLocal_49[0], 26, joaat("s_m_m_pilot_02"), -1, 1, true);
				streaming::set_model_as_no_longer_needed(joaat("s_m_m_pilot_02"));
			}
			else if (!ped::is_ped_in_vehicle(iLocal_31[0], iLocal_49[0], 0))
			{
				ped::set_ped_into_vehicle(iLocal_31[0], iLocal_49[0], -1);
			}
			weapon::give_weapon_to_ped(player::player_ped_id(), joaat("gadget_parachute"), -1, false, true);
			audio::start_alarm("PORT_OF_LS_HEIST_FORT_ZANCUDO_ALARMS", true);
			audio::set_ambient_zone_state("AZ_AFB_ALARM_SPEECH", 1, 1);
			break;
		
		case 4:
			streaming::request_model(joaat("cargobob"));
			player::set_player_wanted_level(player::player_id(), 0, 0);
			player::set_player_wanted_level_now(player::player_id(), 0);
			while (!streaming::has_model_loaded(joaat("cargobob")))
			{
				system::wait(0);
			}
			if (!entity::does_entity_exist(iLocal_48))
			{
				gameplay::clear_area(vLocal_311, 10f, 1, 0, 0, false);
				iLocal_48 = vehicle::create_vehicle(joaat("cargobob"), -629.1677f, 2871.31f, 385.0313f, 283.1214f, 1, true);
				entity::set_entity_load_collision_flag(iLocal_48, true);
				streaming::set_model_as_no_longer_needed(joaat("cargobob"));
				vehicle::set_vehicle_model_is_suppressed(joaat("cargobob"), true);
				vehicle::set_vehicle_engine_can_degrade(iLocal_48, false);
				vehicle::set_vehicle_strong(iLocal_48, true);
				vehicle::set_vehicle_engine_on(iLocal_48, true, 1, 0);
				vehicle::set_heli_blades_full_speed(iLocal_48);
				vehicle::set_vehicle_forward_speed(iLocal_48, 30f);
				func_92(iLocal_48, 0);
			}
			weapon::give_weapon_to_ped(player::player_ped_id(), joaat("gadget_parachute"), -1, false, true);
			break;
		
		case 5:
			streaming::request_model(joaat("cargobob"));
			streaming::request_model(joaat("sandking"));
			while (!streaming::has_model_loaded(joaat("cargobob")) || !streaming::has_model_loaded(joaat("sandking")))
			{
				system::wait(0);
			}
			if (!entity::does_entity_exist(iLocal_48))
			{
				gameplay::clear_area(1749.61f, 3272.95f, 40.1533f, 5f, 1, 0, 0, false);
				iLocal_48 = vehicle::create_vehicle(joaat("cargobob"), 1749.61f, 3272.95f, 40.1533f, 51.128f, 1, true);
				entity::set_entity_load_collision_flag(iLocal_48, true);
				streaming::set_model_as_no_longer_needed(joaat("cargobob"));
				vehicle::set_vehicle_strong(iLocal_48, true);
				vehicle::set_vehicle_engine_can_degrade(iLocal_48, false);
				func_92(iLocal_48, 0);
			}
			if (!entity::does_entity_exist(iLocal_51[0]))
			{
				iLocal_51[0] = vehicle::create_vehicle(joaat("sandking"), 1754.951f, 3290.994f, 40.1176f, 182.397f, 1, true);
				entity::freeze_entity_position(iLocal_51[0], true);
				streaming::set_model_as_no_longer_needed(joaat("sandking"));
			}
			if (entity::does_entity_exist(iLocal_51[0]))
			{
				iLocal_214 = 1;
			}
			break;
	}
}

int func_37(vector3 vParam0, float fParam3)//Position - 0x1F21
{
	return func_38(&(Global_95993.f_2311), vParam0, fParam3, 0);
}

int func_38(var uParam0, vector3 vParam1, float fParam4, int iParam5)//Position - 0x1F3B
{
	int iVar0;
	vector3 vVar1;
	int iVar4;
	var uVar5;
	int iVar8;
	
	if (func_88(uParam0))
	{
		if (func_8(vParam1, 0f, 0f, 0f, 0))
		{
			vParam1 = { *uParam0 };
			fParam4 = uParam0->f_6;
		}
		if (uParam0->f_12.f_66 == joaat("monster") || uParam0->f_12.f_66 == joaat("marshall"))
		{
			if (object::is_point_in_angled_area(vParam1, -816.8716f, 185.6238f, 71.40275f, -807.4894f, 189.3762f, 75.27323f, 6.5f, 0, true))
			{
				vParam1 = { -850.93f, 158.82f, 65.7f };
				fParam4 = 89.5f;
			}
		}
		if (func_87(uParam0))
		{
			gameplay::clear_area(vParam1, 5f, 1, 0, 0, false);
			func_86(vParam1, 5f, 0);
			iVar0 = vehicle::create_vehicle(uParam0->f_12.f_66, vParam1, fParam4, 1, true);
			if (entity::does_entity_exist(iVar0))
			{
				vVar1 = { entity::get_entity_coords(iVar0, 1) };
				if (system::vdist2(vVar1, -1151.15f, -1530.32f, 7.48925f) <= 3f)
				{
					entity::set_entity_coords_no_offset(iVar0, vParam1, 0, 0, 1);
				}
				func_78(iVar0, &(uParam0->f_12), 0, 1);
				iVar4 = true;
				if (vehicle::is_this_model_a_boat(uParam0->f_12.f_66) || vehicle::_is_this_model_an_emergency_boat(uParam0->f_12.f_66))
				{
					if (!water::test_probe_against_water(vParam1.x, vParam1.y, (vParam1.y + 30f), vParam1.x, vParam1.y, (vParam1.y - 30f), &uVar5))
					{
						iVar4 = false;
					}
				}
				if (iVar4)
				{
					vehicle::set_vehicle_on_ground_properly(iVar0, 1084227584);
				}
				if (uParam0->f_7 == 1)
				{
					if (iParam5)
					{
						if (vehicle::is_this_model_a_car(entity::get_entity_model(iVar0)))
						{
							func_77(uParam0->f_11, 1);
						}
						else if (vehicle::is_this_model_a_bike(entity::get_entity_model(iVar0)))
						{
							func_77(uParam0->f_11, 2);
						}
					}
					vehicle::_0xAB04325045427AAE(iVar0, 0);
					vehicle::_0x428BACCDF5E26EAD(iVar0, false);
					vehicle::set_vehicle_has_strong_axles(iVar0, true);
					func_76(iVar0, uParam0->f_11);
				}
				else if ((!func_73(iVar0, uParam0->f_3, uParam0->f_8) && uParam0->f_10) && gameplay::are_strings_equal(script::get_this_script_name(), "startup_positioning"))
				{
					iVar8 = func_72(iVar0);
					if (iVar8 == -1)
					{
						uParam0->f_10 = 0;
					}
					else
					{
						func_65(iVar8);
					}
				}
				if (((Global_91486 != 13 && Global_91486 != 10) && Global_91486 != 11) && Global_91486 != 12)
				{
					if (gameplay::get_hash_key(&(Global_91486.f_3)) == Global_69514)
					{
						if (uParam0->f_12.f_66 == Global_101652.f_31373.f_69[21 /*78*/].f_66)
						{
							func_62(24, 0);
							func_65(24);
						}
					}
				}
				if (uParam0->f_9 == 1)
				{
					func_39(iVar0, uParam0->f_11);
				}
				streaming::set_model_as_no_longer_needed(uParam0->f_12.f_66);
				vVar1 = { entity::get_entity_coords(iVar0, 1) };
			}
			return iVar0;
		}
	}
	return iVar0;
}

void func_39(int iParam0, int iParam1)//Position - 0x21EB
{
	int iVar0;
	int iVar1;
	int iVar2;
	
	if (!func_44(iParam0))
	{
		return;
	}
	if ((iParam1 != 0 && iParam1 != 1) && iParam1 != 2)
	{
		iVar0 = vehicle::get_ped_in_vehicle_seat(iParam0, -1, 0);
		if (!entity::does_entity_exist(iVar0))
		{
			iVar0 = vehicle::get_last_ped_in_vehicle_seat(iParam0, -1);
		}
		if (entity::does_entity_exist(iVar0) && !ped::is_ped_injured(iVar0))
		{
			if (entity::get_entity_model(iVar0) == joaat("player_zero"))
			{
				iParam1 = 0;
			}
			else if (entity::get_entity_model(iVar0) == joaat("player_one"))
			{
				iParam1 = 1;
			}
			else if (entity::get_entity_model(iVar0) == joaat("player_two"))
			{
				iParam1 = 2;
			}
		}
		if ((iParam1 != 0 && iParam1 != 1) && iParam1 != 2)
		{
			iParam1 = Global_101652.f_2079.f_539.f_3549;
		}
	}
	iVar1 = 0;
	while (iVar1 < 3)
	{
		iVar2 = 0;
		while (iVar2 < 2)
		{
			if (entity::get_entity_model(iParam0) == Global_101652.f_31373.f_5038[iVar1 /*157*/][iVar2 /*78*/].f_66)
			{
				if (!gameplay::is_string_null_or_empty(&(Global_101652.f_31373.f_5038[iVar1 /*157*/][iVar2 /*78*/].f_1)))
				{
					if (gameplay::are_strings_equal(vehicle::get_vehicle_number_plate_text(iParam0), &(Global_101652.f_31373.f_5038[iVar1 /*157*/][iVar2 /*78*/].f_1)))
					{
						Global_101652.f_31373.f_5038[iVar1 /*157*/][iVar2 /*78*/].f_66 = 0;
						Global_101652.f_31373.f_5592[iVar1] = iVar2;
					}
				}
			}
			iVar2++;
		}
		iVar1++;
	}
	iVar1 = 0;
	while (iVar1 < 3)
	{
		if (entity::get_entity_model(iParam0) == Global_101652.f_31373.f_5600[iVar1 /*78*/].f_66)
		{
			if (!gameplay::is_string_null_or_empty(&(Global_101652.f_31373.f_5600[iVar1 /*78*/].f_1)))
			{
				if (gameplay::are_strings_equal(vehicle::get_vehicle_number_plate_text(iParam0), &(Global_101652.f_31373.f_5600[iVar1 /*78*/].f_1)))
				{
					Global_101652.f_31373.f_5600[iVar1 /*78*/].f_66 = 0;
				}
			}
		}
		iVar1++;
	}
	Global_101652.f_31373.f_5590 = iParam1;
	Global_69431 = iParam0;
	Global_101652.f_31373.f_5588 = 1;
	func_40(iParam0, &(Global_101652.f_31373.f_5510));
}

void func_40(int iParam0, var uParam1)//Position - 0x23ED
{
	int iVar0;
	
	if (vehicle::is_vehicle_driveable(iParam0, 0))
	{
		func_43(uParam1);
		uParam1->f_66 = entity::get_entity_model(iParam0);
		StringCopy(&(uParam1->f_1), vehicle::get_vehicle_number_plate_text(iParam0), 16);
		*uParam1 = vehicle::get_vehicle_number_plate_text_index(iParam0);
		vehicle::get_vehicle_colours(iParam0, &(uParam1->f_5), &(uParam1->f_6));
		vehicle::get_vehicle_extra_colours(iParam0, &(uParam1->f_7), &(uParam1->f_8));
		vehicle::get_vehicle_tyre_smoke_color(iParam0, &(uParam1->f_62), &(uParam1->f_63), &(uParam1->f_64));
		uParam1->f_65 = vehicle::get_vehicle_window_tint(iParam0);
		uParam1->f_67 = vehicle::get_vehicle_livery(iParam0);
		uParam1->f_69 = vehicle::get_vehicle_wheel_type(iParam0);
		uParam1->f_70 = vehicle::get_vehicle_door_lock_status(iParam0);
		vehicle::get_vehicle_custom_secondary_colour(iParam0, &(uParam1->f_71), &(uParam1->f_72), &(uParam1->f_73));
		vehicle::_get_vehicle_neon_lights_colour(iParam0, &(uParam1->f_74), &(uParam1->f_75), &(uParam1->f_76));
		if (vehicle::_is_vehicle_neon_light_enabled(iParam0, 2))
		{
			gameplay::set_bit(&(uParam1->f_77), 28);
		}
		if (vehicle::_is_vehicle_neon_light_enabled(iParam0, 3))
		{
			gameplay::set_bit(&(uParam1->f_77), 29);
		}
		if (vehicle::_is_vehicle_neon_light_enabled(iParam0, 0))
		{
			gameplay::set_bit(&(uParam1->f_77), 30);
		}
		if (vehicle::_is_vehicle_neon_light_enabled(iParam0, 1))
		{
			gameplay::set_bit(&(uParam1->f_77), 31);
		}
		if (uParam1->f_65 == -1 && uParam1->f_66 != joaat("granger"))
		{
			uParam1->f_65 = 0;
		}
		if (vehicle::is_vehicle_a_convertible(iParam0, 0))
		{
			uParam1->f_68 = vehicle::get_convertible_roof_state(iParam0);
		}
		if (vehicle::is_this_model_a_plane(uParam1->f_66))
		{
			if (vehicle::_0x4198AB0022B15F87(iParam0))
			{
				switch (vehicle::get_landing_gear_state(iParam0))
				{
					case 2:
					case 0:
						gameplay::clear_bit(&(uParam1->f_77), 23);
						gameplay::set_bit(&(uParam1->f_77), 22);
						break;
					
					case 3:
					case 1:
						gameplay::clear_bit(&(uParam1->f_77), 23);
						gameplay::clear_bit(&(uParam1->f_77), 22);
						break;
					
					case 4:
						gameplay::set_bit(&(uParam1->f_77), 23);
						break;
				}
			}
			else
			{
				gameplay::set_bit(&(uParam1->f_77), 23);
			}
		}
		if (!vehicle::get_vehicle_tyres_can_burst(iParam0))
		{
			gameplay::set_bit(&(uParam1->f_77), 9);
		}
		if (vehicle::is_vehicle_stolen(iParam0))
		{
			gameplay::set_bit(&(uParam1->f_77), 10);
		}
		if (vehicle::get_is_vehicle_primary_colour_custom(iParam0))
		{
			gameplay::set_bit(&(uParam1->f_77), 13);
			vehicle::get_vehicle_custom_primary_colour(iParam0, &(uParam1->f_71), &(uParam1->f_72), &(uParam1->f_73));
		}
		if (vehicle::get_is_vehicle_secondary_colour_custom(iParam0))
		{
			gameplay::set_bit(&(uParam1->f_77), 12);
		}
		func_42(&iParam0, &(uParam1->f_9), &(uParam1->f_59));
		iVar0 = 0;
		while (iVar0 <= 11)
		{
			if (vehicle::is_vehicle_extra_turned_on(iParam0, iVar0 + 1))
			{
				gameplay::set_bit(&(uParam1->f_77), func_41(iVar0 + 1));
			}
			iVar0++;
		}
		if (graphics::_does_vehicle_have_decal(iParam0, 0))
		{
			gameplay::set_bit(&(uParam1->f_77), 11);
		}
		else
		{
			gameplay::clear_bit(&(uParam1->f_77), 11);
		}
		if (decorator::decor_exist_on(iParam0, "IgnoredByQuickSave") && decorator::decor_get_bool(iParam0, "IgnoredByQuickSave"))
		{
			gameplay::set_bit(&(uParam1->f_77), 27);
		}
		else
		{
			gameplay::clear_bit(&(uParam1->f_77), 27);
		}
	}
}

int func_41(int iParam0)//Position - 0x2697
{
	switch (iParam0)
	{
		case 1:
			return 0;
			break;
		
		case 2:
			return 1;
			break;
		
		case 3:
			return 2;
			break;
		
		case 4:
			return 3;
			break;
		
		case 5:
			return 4;
			break;
		
		case 6:
			return 5;
			break;
		
		case 7:
			return 6;
			break;
		
		case 8:
			return 7;
			break;
		
		case 9:
			return 8;
			break;
		
		case 10:
			return 24;
			break;
		
		case 11:
			return 25;
			break;
		
		case 12:
			return 26;
			break;
	}
	return 0;
}

bool func_42(int iParam0, var uParam1, var uParam2)//Position - 0x2747
{
	int iVar0;
	int iVar1;
	
	if (!vehicle::is_vehicle_driveable(*iParam0, 0))
	{
		return false;
	}
	if (vehicle::get_num_mod_kits(*iParam0) == 0)
	{
		return false;
	}
	iVar0 = 0;
	while (iVar0 < *uParam1)
	{
		iVar1 = iVar0;
		if (((((iVar1 == 17 || iVar1 == 18) || iVar1 == 19) || iVar1 == 20) || iVar1 == 21) || iVar1 == 22)
		{
			(*uParam1)[iVar0] = 0;
			if (vehicle::is_toggle_mod_on(*iParam0, iVar1))
			{
				(*uParam1)[iVar0] = 1;
			}
		}
		else
		{
			(*uParam1)[iVar0] = vehicle::get_vehicle_mod(*iParam0, iVar0) + 1;
			if (iVar0 == 23)
			{
				(*uParam2)[0] = vehicle::get_vehicle_mod_variation(*iParam0, iVar0);
			}
			else if (iVar0 == 24)
			{
				(*uParam2)[1] = vehicle::get_vehicle_mod_variation(*iParam0, iVar0);
			}
		}
		iVar0++;
	}
	return true;
}

void func_43(var uParam0)//Position - 0x2821
{
	int iVar0;
	
	uParam0->f_66 = 0;
	uParam0->f_77 = 0;
	uParam0->f_65 = 0;
	uParam0->f_62 = 0;
	uParam0->f_63 = 0;
	uParam0->f_64 = 0;
	uParam0->f_74 = 0;
	uParam0->f_75 = 0;
	uParam0->f_76 = 0;
	*uParam0 = 0;
	StringCopy(&(uParam0->f_1), "", 16);
	uParam0->f_5 = 0;
	uParam0->f_6 = 0;
	uParam0->f_7 = 0;
	uParam0->f_8 = 0;
	iVar0 = 0;
	while (iVar0 < 49)
	{
		uParam0->f_9[iVar0] = 0;
		iVar0++;
	}
	iVar0 = 0;
	while (iVar0 < 2)
	{
		uParam0->f_59[iVar0] = 0;
		iVar0++;
	}
	uParam0->f_67 = 0;
	uParam0->f_68 = 0;
	uParam0->f_69 = 0;
	uParam0->f_70 = 1;
	uParam0->f_71 = 0;
	uParam0->f_72 = 0;
	uParam0->f_73 = 0;
}

bool func_44(int iParam0)//Position - 0x28D1
{
	if ((((((((((!entity::does_entity_exist(iParam0) || !vehicle::is_vehicle_driveable(iParam0, 0)) || func_60(iParam0, 0, 0)) || func_60(iParam0, 1, 0)) || func_60(iParam0, 2, 0)) || func_59(iParam0) != 145) || func_58(iParam0)) || func_57(iParam0)) || func_56(iParam0)) || func_55(iParam0)) || !func_45(entity::get_entity_model(iParam0)))
	{
		if (func_57(iParam0))
		{
		}
		if (func_57(iParam0))
		{
		}
		if (func_60(iParam0, 0, 0))
		{
		}
		if (func_60(iParam0, 1, 0))
		{
		}
		if (func_60(iParam0, 2, 0))
		{
		}
		if (func_59(iParam0) != 145)
		{
		}
		return false;
	}
	return true;
}

bool func_45(int iParam0)//Position - 0x29AE
{
	if (iParam0 == 0)
	{
		return false;
	}
	if (!func_46(iParam0, 0))
	{
		return false;
	}
	if (((vehicle::is_this_model_a_boat(iParam0) || vehicle::is_this_model_a_plane(iParam0)) || vehicle::is_this_model_a_heli(iParam0)) || vehicle::is_this_model_a_train(iParam0))
	{
		return false;
	}
	switch (iParam0)
	{
		case joaat("bus"):
		case joaat("stretch"):
		case joaat("barracks"):
		case joaat("armytanker"):
		case joaat("rhino"):
		case joaat("armytrailer"):
		case joaat("barracks2"):
		case joaat("flatbed"):
		case joaat("ripley"):
		case joaat("towtruck"):
		case joaat("towtruck2"):
		case joaat("airbus"):
		case joaat("coach"):
		case joaat("rentalbus"):
		case joaat("tourbus"):
		case 1938952078:
		case joaat("pbus"):
		case joaat("trash"):
		case joaat("benson"):
		case joaat("boattrailer"):
		case joaat("biff"):
		case joaat("hauler"):
		case joaat("docktrailer"):
		case joaat("phantom"):
		case joaat("pounder"):
		case joaat("tractor2"):
		case joaat("bulldozer"):
		case joaat("handler"):
		case joaat("tiptruck"):
		case joaat("cutter"):
		case joaat("dump"):
		case joaat("mixer"):
		case joaat("mixer2"):
		case joaat("rubble"):
		case joaat("scrap"):
		case joaat("tiptruck2"):
		case joaat("camper"):
		case joaat("taco"):
		case joaat("boxville"):
		case joaat("boxville2"):
		case joaat("boxville3"):
		case joaat("journey"):
		case joaat("mule"):
		case joaat("mule2"):
		case joaat("police"):
		case joaat("police2"):
		case joaat("police3"):
		case joaat("police4"):
		case joaat("policeb"):
		case joaat("policeold1"):
		case joaat("policeold2"):
		case joaat("policet"):
		case joaat("taxi"):
		case joaat("submersible"):
		case joaat("submersible2"):
		case joaat("monster"):
			return false;
			break;
	}
	return true;
}

bool func_46(int iParam0, int iParam1)//Position - 0x2B5F
{
	int iVar0;
	struct<2> Var1;
	
	if (iParam0 == 0)
	{
		return false;
	}
	if (!streaming::is_model_a_vehicle(iParam0))
	{
		return false;
	}
	if ((((((((((((iParam0 == joaat("dodo") || iParam0 == joaat("dukes")) || iParam0 == joaat("dukes2")) || (iParam0 == joaat("dominator2") && !network::network_is_game_in_progress())) || (iParam0 == joaat("buffalo3") && !network::network_is_game_in_progress())) || (iParam0 == joaat("gauntlet2") && !network::network_is_game_in_progress())) || iParam0 == joaat("blimp2")) || iParam0 == joaat("stalion")) || (iParam0 == joaat("stalion2") && !network::network_is_game_in_progress())) || iParam0 == joaat("submersible2")) || iParam0 == joaat("marshall")) || iParam0 == joaat("blista2")) || iParam0 == joaat("blista3"))
	{
		if (!func_54())
		{
			return false;
		}
	}
	else
	{
		iVar0 = 0;
		while (iVar0 < dlc1::get_num_dlc_vehicles())
		{
			if (dlc1::get_dlc_vehicle_data(iVar0, &Var1))
			{
				if (iParam0 == Var1.f_1)
				{
					if (dlc1::_is_dlc_data_empty(Var1))
					{
						return false;
					}
				}
			}
			iVar0++;
		}
	}
	if (iParam0 == joaat("blimp"))
	{
		if ((((!func_53() && !func_52()) && !func_51()) && !func_50()) && !func_54())
		{
			return false;
		}
	}
	if ((iParam0 == joaat("hotknife") || iParam0 == joaat("carbonrs")) || iParam0 == joaat("khamelion"))
	{
		if ((gameplay::is_durango_version() || gameplay::is_pc_version()) || gameplay::is_orbis_version())
		{
		}
		else if (!func_51())
		{
			return false;
		}
	}
	if (iParam1)
	{
		if (!func_49(iParam0))
		{
			return false;
		}
	}
	if (!func_47(iParam0))
	{
		return false;
	}
	return true;
}

bool func_47(int iParam0)//Position - 0x2D4F
{
	int iVar0;
	var uVar1;
	char cVar2[64];
	
	if (!func_48())
	{
		return true;
	}
	unk3::_0x897433D292B44130(&iVar0, &uVar1);
	if (iVar0 == 4)
	{
		return true;
	}
	switch (iParam0)
	{
		case joaat("dune4"):
			StringCopy(&cVar2, "VE_DUNE4_t0_v3", 64);
			break;
		
		case joaat("voltic2"):
			StringCopy(&cVar2, "VE_VOLTIC2_t0_v3", 64);
			break;
		
		case joaat("ruiner2"):
			StringCopy(&cVar2, "VE_RUINER2_t0_v3", 64);
			break;
		
		case joaat("phantom2"):
			StringCopy(&cVar2, "VE_PHANTOM2_t0_v3", 64);
			break;
		
		case joaat("technical2"):
			StringCopy(&cVar2, "VE_TECHNICAL2_t0_v3", 64);
			break;
		
		case joaat("boxville5"):
			StringCopy(&cVar2, "VE_BOXVILLE5_t0_v3", 64);
			break;
		
		case joaat("wastelander"):
			StringCopy(&cVar2, "VE_WASTELANDER_t0_v3", 64);
			break;
		
		case joaat("blazer5"):
			StringCopy(&cVar2, "VE_BLAZER5_t0_v3", 64);
			break;
		
		default:
			return true;
			break;
	}
	if (!mobile::_0xBD4D7EAF8A30F637(&cVar2))
	{
		return false;
	}
	return true;
}

bool func_48()//Position - 0x2E1A
{
	if (gameplay::is_pc_version())
	{
		return true;
	}
	return false;
}

int func_49(int iParam0)//Position - 0x2E2E
{
	int iVar0;
	int iVar1;
	
	if (Global_2482045)
	{
		return 1;
	}
	iVar0 = 1;
	iVar1 = network::_get_posix_time();
	if (iParam0 == joaat("btype3"))
	{
		if ((!Global_262145.f_5431 && !Global_262145.f_11409) && iVar1 < Global_262145.f_11410)
		{
			iVar0 = 0;
		}
	}
	if (iParam0 == joaat("faction3"))
	{
		if (!Global_262145.f_12221 && iVar1 < Global_262145.f_12233)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("virgo3") || iParam0 == joaat("virgo2"))
	{
		if (!Global_262145.f_12217 && iVar1 < Global_262145.f_12229)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("sabregt2"))
	{
		if (!Global_262145.f_12218 && iVar1 < Global_262145.f_12230)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("tornado5"))
	{
		if (!Global_262145.f_12219 && iVar1 < Global_262145.f_12231)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("minivan2"))
	{
		if (!Global_262145.f_12220 && iVar1 < Global_262145.f_12232)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("slamvan3"))
	{
		if (!Global_262145.f_12222 && iVar1 < Global_262145.f_12234)
		{
			iVar0 = 0;
		}
	}
	if (iParam0 == joaat("prototipo"))
	{
		if (!Global_262145.f_12223 && iVar1 < Global_262145.f_12226)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("seven70"))
	{
		if (!Global_262145.f_12224 && iVar1 < Global_262145.f_12227)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("pfister811"))
	{
		if (!Global_262145.f_12225 && iVar1 < Global_262145.f_12228)
		{
			iVar0 = 0;
		}
	}
	if (iParam0 == joaat("bf400"))
	{
		if (!Global_262145.f_14848 && iVar1 < Global_262145.f_14813)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("brioso"))
	{
		if (!Global_262145.f_14843 && iVar1 < Global_262145.f_14808)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("cliffhanger"))
	{
		if (!Global_262145.f_14847 && iVar1 < Global_262145.f_14812)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("contender"))
	{
		if (!Global_262145.f_14846 && iVar1 < Global_262145.f_14811)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("le7b"))
	{
		if (!Global_262145.f_14840 && iVar1 < Global_262145.f_14805)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("omnis"))
	{
		if (!Global_262145.f_14841 && iVar1 < Global_262145.f_14806)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("trophytruck"))
	{
		if (!Global_262145.f_14844 && iVar1 < Global_262145.f_14809)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("trophytruck2"))
	{
		if (!Global_262145.f_14845 && iVar1 < Global_262145.f_14810)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("tropos"))
	{
		if (!Global_262145.f_14842 && iVar1 < Global_262145.f_14807)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("gargoyle"))
	{
		if (!Global_262145.f_14850 && iVar1 < Global_262145.f_14815)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("rallytruck"))
	{
		if (!Global_262145.f_14851 && iVar1 < Global_262145.f_14816)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("tampa2"))
	{
		if (!Global_262145.f_14839 && iVar1 < Global_262145.f_14804)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("tyrus"))
	{
		if (!Global_262145.f_14838 && iVar1 < Global_262145.f_14803)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("sheava"))
	{
		if (!Global_262145.f_14837 && iVar1 < Global_262145.f_14802)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("lynx"))
	{
		if (!Global_262145.f_14849 && iVar1 < Global_262145.f_14814)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("stalion2"))
	{
		if (!Global_262145.f_14852 && iVar1 < Global_262145.f_14817)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("gauntlet2"))
	{
		if (!Global_262145.f_14853 && iVar1 < Global_262145.f_14818)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("dominator2"))
	{
		if (!Global_262145.f_14854 && iVar1 < Global_262145.f_14819)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("buffalo3"))
	{
		if (!Global_262145.f_14855 && iVar1 < Global_262145.f_14820)
		{
			iVar0 = 0;
		}
	}
	if (iParam0 == joaat("defiler"))
	{
		if (!Global_262145.f_15000 && iVar1 < Global_262145.f_15022)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("nightblade"))
	{
		if (!Global_262145.f_15001 && iVar1 < Global_262145.f_15023)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("zombiea"))
	{
		if (!Global_262145.f_15002 && iVar1 < Global_262145.f_15024)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("esskey"))
	{
		if (!Global_262145.f_15003 && iVar1 < Global_262145.f_15025)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("avarus"))
	{
		if (!Global_262145.f_15004 && iVar1 < Global_262145.f_15026)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("zombieb"))
	{
		if (!Global_262145.f_15005 && iVar1 < Global_262145.f_15027)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("hakuchou2"))
	{
		if (!Global_262145.f_15007 && iVar1 < Global_262145.f_15028)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("vortex"))
	{
		if (!Global_262145.f_15008 && iVar1 < Global_262145.f_15029)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("shotaro"))
	{
		if (!Global_262145.f_15009 && iVar1 < Global_262145.f_15030)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("chimera"))
	{
		if (!Global_262145.f_15010 && iVar1 < Global_262145.f_15031)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("raptor"))
	{
		if (!Global_262145.f_15011 && iVar1 < Global_262145.f_15032)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("daemon2"))
	{
		if (!Global_262145.f_15012 && iVar1 < Global_262145.f_15033)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("blazer4"))
	{
		if (!Global_262145.f_15013 && iVar1 < Global_262145.f_15034)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("tornado6"))
	{
		if (!Global_262145.f_15019 && iVar1 < Global_262145.f_15041)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("youga2"))
	{
		if (!Global_262145.f_15016 && iVar1 < Global_262145.f_15037)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("wolfsbane"))
	{
		if (!Global_262145.f_15017 && iVar1 < Global_262145.f_15038)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("faggio3"))
	{
		if (!Global_262145.f_15018 && iVar1 < Global_262145.f_15039)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("faggio"))
	{
		if (!Global_262145.f_15006 && iVar1 < Global_262145.f_15040)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("bagger"))
	{
		if (!Global_262145.f_15020 && iVar1 < Global_262145.f_15042)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("sanctus"))
	{
		if (!Global_262145.f_15014 && iVar1 < Global_262145.f_15035)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("manchez"))
	{
		if (!Global_262145.f_15015 && iVar1 < Global_262145.f_15036)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("ratbike"))
	{
		if (!Global_262145.f_15021 && iVar1 < Global_262145.f_15043)
		{
			iVar0 = 0;
		}
	}
	if (iParam0 == joaat("voltic2"))
	{
		if (!Global_262145.f_16649 && iVar1 < Global_262145.f_16690)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("ruiner2"))
	{
		if (!Global_262145.f_16650 && iVar1 < Global_262145.f_16691)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("dune4"))
	{
		if (!Global_262145.f_16651 && iVar1 < Global_262145.f_16692)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("dune5"))
	{
		if (!Global_262145.f_16652 && iVar1 < Global_262145.f_16693)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("phantom2"))
	{
		if (!Global_262145.f_16653 && iVar1 < Global_262145.f_16694)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("technical2"))
	{
		if (!Global_262145.f_16654 && iVar1 < Global_262145.f_16695)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("boxville5"))
	{
		if (!Global_262145.f_16655 && iVar1 < Global_262145.f_16696)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("wastelander"))
	{
		if (!Global_262145.f_16656 && iVar1 < Global_262145.f_16697)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("blazer5"))
	{
		if (!Global_262145.f_16657 && iVar1 < Global_262145.f_16698)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("comet2"))
	{
		if (!Global_262145.f_16658 && iVar1 < Global_262145.f_16699)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("comet3"))
	{
		if (!Global_262145.f_16659 && iVar1 < Global_262145.f_16700)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("diablous"))
	{
		if (!Global_262145.f_16660 && iVar1 < Global_262145.f_16701)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("diablous2"))
	{
		if (!Global_262145.f_16661 && iVar1 < Global_262145.f_16702)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("elegy"))
	{
		if (!Global_262145.f_16662 && iVar1 < Global_262145.f_16703)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("elegy2"))
	{
		if (!Global_262145.f_16663 && iVar1 < Global_262145.f_16704)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("fcr"))
	{
		if (!Global_262145.f_16664 && iVar1 < Global_262145.f_16705)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("fcr2"))
	{
		if (!Global_262145.f_16665 && iVar1 < Global_262145.f_16706)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("italigtb"))
	{
		if (!Global_262145.f_16666 && iVar1 < Global_262145.f_16707)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("italigtb2"))
	{
		if (!Global_262145.f_16667 && iVar1 < Global_262145.f_16708)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("nero"))
	{
		if (!Global_262145.f_16668 && iVar1 < Global_262145.f_16709)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("nero2"))
	{
		if (!Global_262145.f_16669 && iVar1 < Global_262145.f_16710)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("penetrator"))
	{
		if (!Global_262145.f_16670 && iVar1 < Global_262145.f_16711)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("specter"))
	{
		if (!Global_262145.f_16671 && iVar1 < Global_262145.f_16712)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("specter2"))
	{
		if (!Global_262145.f_16672 && iVar1 < Global_262145.f_16713)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("tempesta"))
	{
		if (!Global_262145.f_16673 && iVar1 < Global_262145.f_16714)
		{
			iVar0 = 0;
		}
	}
	return iVar0;
}

bool func_50()//Position - 0x3ACC
{
	return false;
}

bool func_51()//Position - 0x3AD5
{
	return true;
}

bool func_52()//Position - 0x3ADE
{
	return true;
}

bool func_53()//Position - 0x3AE7
{
	if (dlc2::is_dlc_present(-1226939934))
	{
		return true;
	}
	return false;
}

bool func_54()//Position - 0x3B00
{
	int iVar0;
	
	if (network::network_is_signed_in())
	{
		if (network::_network_are_ros_available())
		{
			if (network::_0x593570C289A77688())
			{
				stats::stat_get_int(joaat("sp_unlock_exclus_content"), &iVar0, -1);
				gameplay::set_bit(&iVar0, 2);
				gameplay::set_bit(&iVar0, 4);
				gameplay::set_bit(&iVar0, 6);
				gameplay::set_bit(&Global_25, 2);
				gameplay::set_bit(&Global_25, 4);
				gameplay::set_bit(&Global_25, 6);
				stats::stat_set_int(joaat("sp_unlock_exclus_content"), iVar0, 1);
				if (gameplay::_0x5AA3BEFA29F03AD4())
				{
					iVar0 = gameplay::get_profile_setting(866);
					gameplay::set_bit(&iVar0, 0);
					stats::_0xDAC073C7901F9E15(iVar0);
				}
				return true;
			}
		}
	}
	if (Global_139115 == 2)
	{
		return true;
	}
	else if (Global_139115 == 3)
	{
		return false;
	}
	if (gameplay::_0x5AA3BEFA29F03AD4())
	{
		if (gameplay::is_bit_set(gameplay::get_profile_setting(866), 0))
		{
			return true;
		}
	}
	return false;
}

bool func_55(int iParam0)//Position - 0x3BBB
{
	int iVar0;
	char* sVar1;
	
	iVar0 = entity::get_entity_model(iParam0);
	sVar1 = vehicle::get_vehicle_number_plate_text(iParam0);
	if (iVar0 == joaat("speedo") && gameplay::are_strings_equal(sVar1, "LAMAR G "))
	{
		return true;
	}
	if (!func_46(iVar0, 0))
	{
		return true;
	}
	return false;
}

bool func_56(int iParam0)//Position - 0x3C01
{
	int iVar0;
	
	iVar0 = 0;
	while (iVar0 < 3)
	{
		if (entity::does_entity_exist(Global_89180[iVar0]))
		{
			if (Global_89180[iVar0] == iParam0)
			{
				return true;
			}
		}
		iVar0++;
	}
	return false;
}

bool func_57(int iParam0)//Position - 0x3C3C
{
	int iVar0;
	
	if (entity::does_entity_exist(iParam0) && vehicle::is_vehicle_driveable(iParam0, 0))
	{
		iVar0 = 0;
		while (iVar0 < 9)
		{
			if (entity::does_entity_exist(Global_89150[iVar0]) && vehicle::is_vehicle_driveable(Global_89150[iVar0], 0))
			{
				if (Global_89150[iVar0] == iParam0 && entity::get_entity_model(Global_89150[iVar0]) == entity::get_entity_model(iParam0))
				{
					return true;
				}
			}
			iVar0++;
		}
	}
	return false;
}

bool func_58(int iParam0)//Position - 0x3CB8
{
	int iVar0;
	
	if (entity::does_entity_exist(Global_68526.f_484[24]))
	{
		if (iParam0 == Global_68526.f_484[24])
		{
			return false;
		}
	}
	iVar0 = 0;
	while (iVar0 < 68)
	{
		if (entity::does_entity_exist(Global_68526.f_484[iVar0]))
		{
			if ((((((((((((iVar0 != 24 && iVar0 != 21) && iVar0 != 22) && iVar0 != 23) && iVar0 != 27) && iVar0 != 30) && iVar0 != 33) && iVar0 != 28) && iVar0 != 31) && iVar0 != 34) && iVar0 != 26) && iVar0 != 29) && iVar0 != 32)
			{
				if (iParam0 == Global_68526.f_484[iVar0])
				{
					return true;
				}
			}
		}
		iVar0++;
	}
	return false;
}

int func_59(int iParam0)//Position - 0x3DA0
{
	int iVar0;
	
	if (!entity::does_entity_exist(iParam0))
	{
		return 145;
	}
	if (!vehicle::is_vehicle_driveable(iParam0, 0))
	{
		return 145;
	}
	iVar0 = 0;
	while (iVar0 < 9)
	{
		if (entity::does_entity_exist(Global_89150[iVar0]))
		{
			if (Global_89150[iVar0] == iParam0)
			{
				return Global_89160[iVar0];
			}
		}
		iVar0++;
	}
	return 145;
}

bool func_60(int iParam0, int iParam1, int iParam2)//Position - 0x3E03
{
	int iVar0;
	char* sVar1;
	var uVar9;
	
	if (!entity::does_entity_exist(iParam0) || !vehicle::is_vehicle_driveable(iParam0, 0))
	{
		return false;
	}
	iVar0 = 0;
	while (func_61(iParam1, iVar0, &sVar1, &uVar9))
	{
		if (!iParam2 || gameplay::is_bit_set(Global_101652.f_6172[uVar9], 0))
		{
			if (vehicle::is_vehicle_in_garage_area(&sVar1, iParam0))
			{
				return true;
			}
		}
		iVar0++;
	}
	return false;
}

bool func_61(int iParam0, int iParam1, char* sParam2, var uParam3)//Position - 0x3E74
{
	StringCopy(sParam2, "", 32);
	switch (iParam0)
	{
		case 0:
			if (iParam1 == 0)
			{
				StringCopy(sParam2, "Michael - Beverly Hills", 32);
				*uParam3 = 0;
				return true;
			}
			else if (iParam1 == 1)
			{
				StringCopy(sParam2, "Trevor - Countryside", 32);
				*uParam3 = 1;
				return true;
			}
			break;
		
		case 1:
			if (iParam1 == 0)
			{
				StringCopy(sParam2, "Franklin - Aunt", 32);
				*uParam3 = 5;
				return true;
			}
			else if (iParam1 == 1)
			{
				StringCopy(sParam2, "Franklin - Hills", 32);
				*uParam3 = 6;
				return true;
			}
			break;
		
		case 2:
			if (iParam1 == 0)
			{
				StringCopy(sParam2, "Trevor - Countryside", 32);
				*uParam3 = 2;
				return true;
			}
			else if (iParam1 == 1)
			{
				StringCopy(sParam2, "Trevor - City", 32);
				*uParam3 = 3;
				return true;
			}
			else if (iParam1 == 2)
			{
				StringCopy(sParam2, "Trevor - Stripclub", 32);
				*uParam3 = 4;
				return true;
			}
			break;
	}
	return false;
}

void func_62(int iParam0, int iParam1)//Position - 0x3F4C
{
	if (iParam0 == -1)
	{
		return;
	}
	if (iParam1)
	{
		if (!func_64(iParam0, 0))
		{
			func_63(iParam0, 1, 0);
			func_63(iParam0, 2, 0);
			func_63(iParam0, 3, 0);
			func_63(iParam0, 4, 0);
			func_63(iParam0, 0, 1);
			Global_68526[iParam0] = 1;
		}
	}
	else
	{
		func_63(iParam0, 0, 0);
	}
}

void func_63(int iParam0, int iParam1, int iParam2)//Position - 0x3FA9
{
	if (iParam0 == -1)
	{
		return;
	}
	if (iParam2)
	{
		gameplay::set_bit(&(Global_101652.f_31373[iParam0]), iParam1);
	}
	else
	{
		gameplay::clear_bit(&(Global_101652.f_31373[iParam0]), iParam1);
	}
}

int func_64(int iParam0, int iParam1)//Position - 0x3FE4
{
	if (iParam0 == -1)
	{
		return false;
	}
	return gameplay::is_bit_set(Global_101652.f_31373[iParam0], iParam1);
}

void func_65(int iParam0)//Position - 0x4009
{
	int iVar0;
	
	if (iParam0 == -1)
	{
		return;
	}
	if (func_69(&(Global_68526.f_555[0 /*21*/]), iParam0))
	{
		if (entity::does_entity_exist(Global_68526.f_139[iParam0]))
		{
			iVar0 = true;
			if (!ped::is_ped_injured(player::player_ped_id()))
			{
				if (vehicle::is_vehicle_driveable(Global_68526.f_139[iParam0], 0))
				{
					if (ped::is_ped_in_vehicle(player::player_ped_id(), Global_68526.f_139[iParam0], 0))
					{
						iVar0 = false;
					}
				}
			}
			if (iVar0)
			{
				entity::set_entity_as_mission_entity(Global_68526.f_139[iParam0], true, 1);
				vehicle::delete_vehicle(&(Global_68526.f_139[iParam0]));
			}
		}
		Global_68526[iParam0] = 1;
		if (gameplay::is_bit_set(Global_68526.f_555[0 /*21*/].f_9, 13))
		{
			if (((((iParam0 == 24 && func_64(iParam0, 0)) && Global_69435.f_66 == 0) && Global_101652.f_31373.f_1958[Global_68526.f_555[0 /*21*/].f_14] != 0) && Global_101652.f_31373.f_1958[Global_68526.f_555[0 /*21*/].f_14] > 3) && (!func_67(0, Global_68526.f_555[0 /*21*/].f_12) || !func_67(1, Global_68526.f_555[0 /*21*/].f_12)))
			{
				func_66(&(Global_101652.f_31373.f_69[Global_68526.f_555[0 /*21*/].f_14 /*78*/]), &Global_69435);
				Global_69513 = Global_101652.f_31373.f_5591;
			}
			func_62(iParam0, 0);
		}
	}
}

void func_66(var uParam0, var uParam1)//Position - 0x417B
{
	uParam1->f_66 = uParam0->f_66;
	*uParam1 = *uParam0;
	uParam1->f_1 = { uParam0->f_1 };
	uParam1->f_5 = uParam0->f_5;
	uParam1->f_6 = uParam0->f_6;
	uParam1->f_7 = uParam0->f_7;
	uParam1->f_8 = uParam0->f_8;
	uParam1->f_9 = { uParam0->f_9 };
	uParam1->f_59 = { uParam0->f_59 };
	uParam1->f_62 = uParam0->f_62;
	uParam1->f_63 = uParam0->f_63;
	uParam1->f_64 = uParam0->f_64;
	uParam1->f_65 = uParam0->f_65;
	uParam1->f_77 = uParam0->f_77;
	uParam1->f_67 = uParam0->f_67;
	uParam1->f_69 = uParam0->f_69;
	uParam1->f_68 = uParam0->f_68;
	uParam1->f_71 = uParam0->f_71;
	uParam1->f_72 = uParam0->f_72;
	uParam1->f_73 = uParam0->f_73;
	uParam1->f_74 = uParam0->f_74;
	uParam1->f_75 = uParam0->f_75;
	uParam1->f_76 = uParam0->f_76;
}

int func_67(int iParam0, int iParam1)//Position - 0x4247
{
	int iVar0;
	
	switch (iParam1)
	{
		case 0:
			iVar0 = 0;
			break;
		
		case 1:
			iVar0 = 1;
			break;
		
		case 2:
			iVar0 = 2;
			break;
	}
	if (iParam0 < 0 || iParam0 >= func_68(&(Global_101652.f_31373.f_5038[iVar0 /*157*/])))
	{
		return 0;
	}
	return func_46(Global_101652.f_31373.f_5038[iVar0 /*157*/][iParam0 /*78*/].f_66, 0);
}

var func_68(var uParam0)//Position - 0x42B9
{
	return *uParam0;
}

int func_69(var uParam0, int iParam1)//Position - 0x42C4
{
	int iVar0;
	int iVar1;
	
	*uParam0 = { 0f, 0f, 0f };
	uParam0->f_3 = 0f;
	uParam0->f_4 = 0;
	StringCopy(&(uParam0->f_5), "", 16);
	uParam0->f_9 = 0;
	uParam0->f_10 = 0;
	uParam0->f_11 = 0;
	uParam0->f_12 = 145;
	uParam0->f_13 = -1;
	uParam0->f_14 = 0;
	uParam0->f_15 = { 0f, 0f, 0f };
	uParam0->f_18 = { 0f, 0f, 0f };
	switch (iParam1)
	{
		case 0:
			*uParam0 = { -831.8538f, 172.1154f, 69.9058f };
			uParam0->f_3 = 157.5705f;
			uParam0->f_4 = func_70(0, 1);
			uParam0->f_12 = 0;
			gameplay::set_bit(&(uParam0->f_9), 20);
			gameplay::set_bit(&(uParam0->f_9), 7);
			iVar0 = 1;
			break;
		
		case 1:
			*uParam0 = { 1970.943f, 3801.684f, 31.1396f };
			uParam0->f_3 = 301.3964f;
			uParam0->f_4 = func_70(0, 1);
			uParam0->f_12 = 0;
			gameplay::set_bit(&(uParam0->f_9), 20);
			gameplay::set_bit(&(uParam0->f_9), 7);
			iVar0 = 1;
			break;
		
		case 2:
			*uParam0 = { -22.6297f, -1439.137f, 29.6549f };
			uParam0->f_3 = 180.0808f;
			uParam0->f_4 = func_70(1, 1);
			uParam0->f_12 = 1;
			gameplay::set_bit(&(uParam0->f_9), 20);
			gameplay::set_bit(&(uParam0->f_9), 7);
			iVar0 = 1;
			break;
		
		case 3:
			*uParam0 = { -22.5229f, -1434.699f, 29.6552f };
			uParam0->f_3 = 141.6114f;
			uParam0->f_4 = func_70(1, 2);
			uParam0->f_12 = 1;
			gameplay::set_bit(&(uParam0->f_9), 19);
			gameplay::set_bit(&(uParam0->f_9), 7);
			iVar0 = 1;
			break;
		
		case 4:
			*uParam0 = { 10.9281f, 545.669f, 174.7951f };
			uParam0->f_3 = 61.392f;
			uParam0->f_4 = func_70(1, 1);
			uParam0->f_12 = 1;
			gameplay::set_bit(&(uParam0->f_9), 20);
			gameplay::set_bit(&(uParam0->f_9), 7);
			iVar0 = 1;
			break;
		
		case 5:
			*uParam0 = { 6.1093f, 544.9742f, 174.2835f };
			uParam0->f_3 = 92.1548f;
			uParam0->f_4 = func_70(1, 2);
			uParam0->f_12 = 1;
			gameplay::set_bit(&(uParam0->f_9), 19);
			gameplay::set_bit(&(uParam0->f_9), 7);
			iVar0 = 1;
			break;
		
		case 6:
			*uParam0 = { 1981.416f, 3808.131f, 31.1384f };
			uParam0->f_3 = 117.2557f;
			uParam0->f_4 = func_70(2, 1);
			uParam0->f_12 = 2;
			gameplay::set_bit(&(uParam0->f_9), 20);
			gameplay::set_bit(&(uParam0->f_9), 7);
			iVar0 = 1;
			break;
		
		case 7:
			*uParam0 = { -1158.488f, -1529.367f, 3.8995f };
			uParam0->f_3 = 35.7505f;
			uParam0->f_4 = func_70(2, 1);
			uParam0->f_12 = 2;
			gameplay::set_bit(&(uParam0->f_9), 20);
			gameplay::set_bit(&(uParam0->f_9), 7);
			iVar0 = 1;
			break;
		
		case 8:
			*uParam0 = { 148.2868f, -1270.569f, 28.2252f };
			uParam0->f_3 = 208.4685f;
			uParam0->f_4 = func_70(2, 1);
			uParam0->f_12 = 2;
			gameplay::set_bit(&(uParam0->f_9), 20);
			gameplay::set_bit(&(uParam0->f_9), 7);
			iVar0 = 1;
			break;
		
		case 9:
			*uParam0 = { 1459.509f, -1380.45f, 78.3259f };
			uParam0->f_3 = 99.6211f;
			uParam0->f_4 = joaat("scorcher");
			gameplay::set_bit(&(uParam0->f_9), 6);
			iVar0 = 1;
			break;
		
		case 10:
			*uParam0 = { -1518.947f, -1387.865f, -0.5134f };
			uParam0->f_3 = 98.3867f;
			uParam0->f_4 = joaat("seashark");
			iVar0 = 1;
			gameplay::set_bit(&(uParam0->f_9), 6);
			break;
		
		case 11:
			*uParam0 = { 353.0926f, 3577.593f, 32.351f };
			uParam0->f_3 = 16.6205f;
			uParam0->f_4 = joaat("duster");
			iVar0 = 1;
			gameplay::set_bit(&(uParam0->f_9), 6);
			break;
		
		case 12:
			uParam0->f_14 = 0;
			*uParam0 = { -1652.004f, -3142.348f, 12.9921f };
			uParam0->f_3 = 329.1082f;
			uParam0->f_12 = 0;
			uParam0->f_13 = 359;
			gameplay::set_bit(&(uParam0->f_9), 0);
			gameplay::set_bit(&(uParam0->f_9), 21);
			gameplay::set_bit(&(uParam0->f_9), 14);
			gameplay::set_bit(&(uParam0->f_9), 7);
			gameplay::set_bit(&(uParam0->f_9), 10);
			gameplay::set_bit(&(uParam0->f_9), 12);
			gameplay::set_bit(&(uParam0->f_9), 28);
			iVar0 = 1;
			break;
		
		case 13:
			uParam0->f_14 = 1;
			*uParam0 = { -1271.649f, -3380.685f, 12.9451f };
			uParam0->f_3 = 329.5137f;
			uParam0->f_12 = 1;
			uParam0->f_13 = 359;
			gameplay::set_bit(&(uParam0->f_9), 0);
			gameplay::set_bit(&(uParam0->f_9), 21);
			gameplay::set_bit(&(uParam0->f_9), 14);
			gameplay::set_bit(&(uParam0->f_9), 7);
			gameplay::set_bit(&(uParam0->f_9), 10);
			gameplay::set_bit(&(uParam0->f_9), 12);
			gameplay::set_bit(&(uParam0->f_9), 28);
			iVar0 = 1;
			break;
		
		case 14:
			uParam0->f_14 = 2;
			*uParam0 = { 1735.586f, 3294.531f, 40.1651f };
			uParam0->f_3 = 194.9525f;
			uParam0->f_12 = 2;
			uParam0->f_13 = 359;
			gameplay::set_bit(&(uParam0->f_9), 0);
			gameplay::set_bit(&(uParam0->f_9), 21);
			gameplay::set_bit(&(uParam0->f_9), 14);
			gameplay::set_bit(&(uParam0->f_9), 7);
			gameplay::set_bit(&(uParam0->f_9), 10);
			gameplay::set_bit(&(uParam0->f_9), 12);
			gameplay::set_bit(&(uParam0->f_9), 28);
			iVar0 = 1;
			break;
		
		case 15:
			uParam0->f_14 = 3;
			*uParam0 = { -846.27f, -1363.19f, 0.22f };
			uParam0->f_3 = 108.78f;
			uParam0->f_12 = 0;
			uParam0->f_13 = 356;
			gameplay::set_bit(&(uParam0->f_9), 0);
			gameplay::set_bit(&(uParam0->f_9), 21);
			gameplay::set_bit(&(uParam0->f_9), 14);
			gameplay::set_bit(&(uParam0->f_9), 7);
			gameplay::set_bit(&(uParam0->f_9), 10);
			gameplay::set_bit(&(uParam0->f_9), 12);
			gameplay::set_bit(&(uParam0->f_9), 22);
			gameplay::set_bit(&(uParam0->f_9), 28);
			iVar0 = 1;
			break;
		
		case 16:
			uParam0->f_14 = 4;
			*uParam0 = { -849.47f, -1354.99f, 0.24f };
			uParam0->f_3 = 109.84f;
			uParam0->f_12 = 1;
			uParam0->f_13 = 356;
			gameplay::set_bit(&(uParam0->f_9), 0);
			gameplay::set_bit(&(uParam0->f_9), 21);
			gameplay::set_bit(&(uParam0->f_9), 14);
			gameplay::set_bit(&(uParam0->f_9), 7);
			gameplay::set_bit(&(uParam0->f_9), 10);
			gameplay::set_bit(&(uParam0->f_9), 12);
			gameplay::set_bit(&(uParam0->f_9), 22);
			gameplay::set_bit(&(uParam0->f_9), 28);
			iVar0 = 1;
			break;
		
		case 17:
			uParam0->f_14 = 5;
			*uParam0 = { -852.47f, -1346.2f, 0.21f };
			uParam0->f_3 = 108.76f;
			uParam0->f_12 = 2;
			uParam0->f_13 = 356;
			gameplay::set_bit(&(uParam0->f_9), 0);
			gameplay::set_bit(&(uParam0->f_9), 21);
			gameplay::set_bit(&(uParam0->f_9), 14);
			gameplay::set_bit(&(uParam0->f_9), 7);
			gameplay::set_bit(&(uParam0->f_9), 10);
			gameplay::set_bit(&(uParam0->f_9), 12);
			gameplay::set_bit(&(uParam0->f_9), 22);
			gameplay::set_bit(&(uParam0->f_9), 28);
			iVar0 = 1;
			break;
		
		case 18:
			uParam0->f_14 = 6;
			*uParam0 = { -745.857f, -1433.904f, 4.0005f };
			uParam0->f_12 = 0;
			uParam0->f_13 = 360;
			uParam0->f_15 = { -756.2952f, -1441.609f, 2.9184f };
			uParam0->f_18 = { -738.0606f, -1423.068f, 8.2835f };
			gameplay::set_bit(&(uParam0->f_9), 0);
			gameplay::set_bit(&(uParam0->f_9), 21);
			gameplay::set_bit(&(uParam0->f_9), 14);
			gameplay::set_bit(&(uParam0->f_9), 7);
			gameplay::set_bit(&(uParam0->f_9), 10);
			gameplay::set_bit(&(uParam0->f_9), 12);
			gameplay::set_bit(&(uParam0->f_9), 28);
			iVar0 = 1;
			break;
		
		case 19:
			uParam0->f_14 = 7;
			*uParam0 = { -761.8486f, -1453.829f, 4.0005f };
			uParam0->f_12 = 1;
			uParam0->f_13 = 360;
			uParam0->f_15 = { -772.8158f, -1459.957f, 3.2894f };
			uParam0->f_18 = { -754.3353f, -1440.836f, 8.3334f };
			gameplay::set_bit(&(uParam0->f_9), 0);
			gameplay::set_bit(&(uParam0->f_9), 21);
			gameplay::set_bit(&(uParam0->f_9), 14);
			gameplay::set_bit(&(uParam0->f_9), 7);
			gameplay::set_bit(&(uParam0->f_9), 10);
			gameplay::set_bit(&(uParam0->f_9), 12);
			gameplay::set_bit(&(uParam0->f_9), 28);
			iVar0 = 1;
			break;
		
		case 20:
			uParam0->f_14 = 8;
			*uParam0 = { 1769.3f, 3244f, 41.1f };
			uParam0->f_12 = 2;
			uParam0->f_13 = 360;
			gameplay::set_bit(&(uParam0->f_9), 0);
			gameplay::set_bit(&(uParam0->f_9), 21);
			gameplay::set_bit(&(uParam0->f_9), 14);
			gameplay::set_bit(&(uParam0->f_9), 7);
			gameplay::set_bit(&(uParam0->f_9), 10);
			gameplay::set_bit(&(uParam0->f_9), 12);
			gameplay::set_bit(&(uParam0->f_9), 23);
			gameplay::set_bit(&(uParam0->f_9), 28);
			iVar0 = 1;
			break;
		
		case 21:
			uParam0->f_14 = 9;
			*uParam0 = { 192.7897f, -1020.539f, -99.98f };
			uParam0->f_3 = 180f;
			uParam0->f_4 = 0;
			uParam0->f_12 = 0;
			uParam0->f_13 = 357;
			gameplay::set_bit(&(uParam0->f_9), 0);
			gameplay::set_bit(&(uParam0->f_9), 21);
			gameplay::set_bit(&(uParam0->f_9), 14);
			gameplay::set_bit(&(uParam0->f_9), 7);
			gameplay::set_bit(&(uParam0->f_9), 10);
			gameplay::set_bit(&(uParam0->f_9), 12);
			gameplay::set_bit(&(uParam0->f_9), 24);
			gameplay::set_bit(&(uParam0->f_9), 28);
			gameplay::set_bit(&(uParam0->f_9), 29);
			iVar0 = 1;
			break;
		
		case 22:
			uParam0->f_14 = 10;
			*uParam0 = { 192.7897f, -1020.539f, -99.98f };
			uParam0->f_3 = 180f;
			uParam0->f_4 = 0;
			uParam0->f_12 = 1;
			uParam0->f_13 = 357;
			gameplay::set_bit(&(uParam0->f_9), 0);
			gameplay::set_bit(&(uParam0->f_9), 21);
			gameplay::set_bit(&(uParam0->f_9), 14);
			gameplay::set_bit(&(uParam0->f_9), 7);
			gameplay::set_bit(&(uParam0->f_9), 10);
			gameplay::set_bit(&(uParam0->f_9), 12);
			gameplay::set_bit(&(uParam0->f_9), 24);
			gameplay::set_bit(&(uParam0->f_9), 28);
			gameplay::set_bit(&(uParam0->f_9), 29);
			iVar0 = 1;
			break;
		
		case 23:
			uParam0->f_14 = 11;
			*uParam0 = { 192.7897f, -1020.539f, -99.98f };
			uParam0->f_3 = 180f;
			uParam0->f_4 = 0;
			uParam0->f_12 = 2;
			uParam0->f_13 = 357;
			gameplay::set_bit(&(uParam0->f_9), 0);
			gameplay::set_bit(&(uParam0->f_9), 21);
			gameplay::set_bit(&(uParam0->f_9), 14);
			gameplay::set_bit(&(uParam0->f_9), 7);
			gameplay::set_bit(&(uParam0->f_9), 10);
			gameplay::set_bit(&(uParam0->f_9), 12);
			gameplay::set_bit(&(uParam0->f_9), 24);
			gameplay::set_bit(&(uParam0->f_9), 28);
			gameplay::set_bit(&(uParam0->f_9), 29);
			iVar0 = 1;
			break;
		
		case 26:
		case 27:
		case 28:
			iVar1 = (iParam1 - 26);
			uParam0->f_14 = (12 + iVar1);
			*uParam0 = { 196.2794f, -1020.479f, -99.98f };
			uParam0->f_3 = 180f;
			uParam0->f_4 = 0;
			uParam0->f_12 = (0 + iVar1);
			gameplay::set_bit(&(uParam0->f_9), 10);
			gameplay::set_bit(&(uParam0->f_9), 12);
			gameplay::set_bit(&(uParam0->f_9), 7);
			gameplay::set_bit(&(uParam0->f_9), 27);
			gameplay::set_bit(&(uParam0->f_9), 24);
			gameplay::set_bit(&(uParam0->f_9), 29);
			iVar0 = 1;
			break;
		
		case 29:
		case 30:
		case 31:
			iVar1 = (iParam1 - 29);
			uParam0->f_14 = (15 + iVar1);
			*uParam0 = { 199.8872f, -1020.048f, -99.98f };
			uParam0->f_3 = 180f;
			uParam0->f_4 = 0;
			uParam0->f_12 = (0 + iVar1);
			gameplay::set_bit(&(uParam0->f_9), 10);
			gameplay::set_bit(&(uParam0->f_9), 12);
			gameplay::set_bit(&(uParam0->f_9), 7);
			gameplay::set_bit(&(uParam0->f_9), 27);
			gameplay::set_bit(&(uParam0->f_9), 24);
			gameplay::set_bit(&(uParam0->f_9), 29);
			iVar0 = 1;
			break;
		
		case 32:
		case 33:
		case 34:
			iVar1 = (iParam1 - 32);
			uParam0->f_14 = (18 + iVar1);
			*uParam0 = { 203.6006f, -1019.776f, -99.98f };
			uParam0->f_3 = 180f;
			uParam0->f_4 = 0;
			uParam0->f_12 = (0 + iVar1);
			gameplay::set_bit(&(uParam0->f_9), 10);
			gameplay::set_bit(&(uParam0->f_9), 12);
			gameplay::set_bit(&(uParam0->f_9), 7);
			gameplay::set_bit(&(uParam0->f_9), 27);
			gameplay::set_bit(&(uParam0->f_9), 24);
			gameplay::set_bit(&(uParam0->f_9), 29);
			iVar0 = 1;
			break;
		
		case 24:
			uParam0->f_14 = 21;
			*uParam0 = { 0f, 0f, 0f };
			uParam0->f_3 = 0f;
			uParam0->f_4 = 0;
			gameplay::set_bit(&(uParam0->f_9), 10);
			gameplay::set_bit(&(uParam0->f_9), 11);
			gameplay::set_bit(&(uParam0->f_9), 13);
			gameplay::set_bit(&(uParam0->f_9), 12);
			iVar0 = 1;
			break;
		
		case 25:
			uParam0->f_14 = 22;
			*uParam0 = { 723.2515f, -632.0496f, 27.1484f };
			uParam0->f_3 = 12.9316f;
			uParam0->f_4 = joaat("tailgater");
			gameplay::set_bit(&(uParam0->f_9), 10);
			gameplay::set_bit(&(uParam0->f_9), 11);
			gameplay::set_bit(&(uParam0->f_9), 13);
			gameplay::set_bit(&(uParam0->f_9), 12);
			iVar0 = 1;
			break;
		
		case 35:
			*uParam0 = { -51.23f, 3111.9f, 24.95f };
			uParam0->f_3 = 46.78f;
			uParam0->f_4 = joaat("proptrailer");
			gameplay::set_bit(&(uParam0->f_9), 8);
			iVar0 = 1;
			break;
		
		case 36:
			*uParam0 = { -55.7984f, -1096.586f, 25.4223f };
			uParam0->f_3 = 308.0596f;
			uParam0->f_4 = joaat("bjxl");
			uParam0->f_10 = 126;
			uParam0->f_11 = 126;
			gameplay::set_bit(&(uParam0->f_9), 9);
			gameplay::set_bit(&(uParam0->f_9), 13);
			iVar0 = 1;
			break;
		
		case 37:
			*uParam0 = { -2892.93f, 3192.37f, 11.66f };
			uParam0->f_3 = -132.35f;
			uParam0->f_4 = joaat("velum");
			uParam0->f_10 = 157;
			uParam0->f_11 = 157;
			gameplay::set_bit(&(uParam0->f_9), 9);
			gameplay::set_bit(&(uParam0->f_9), 23);
			gameplay::set_bit(&(uParam0->f_9), 13);
			iVar0 = 1;
			break;
		
		case 38:
			*uParam0 = { 1744.308f, 3270.673f, 40.2076f };
			uParam0->f_3 = 125f;
			uParam0->f_4 = joaat("cargobob3");
			gameplay::set_bit(&(uParam0->f_9), 23);
			gameplay::set_bit(&(uParam0->f_9), 8);
			iVar0 = 1;
			break;
		
		case 39:
			*uParam0 = { 1751.44f, 3322.643f, 42.1855f };
			uParam0->f_3 = 268.134f;
			uParam0->f_4 = joaat("submersible");
			gameplay::set_bit(&(uParam0->f_9), 23);
			iVar0 = 1;
			break;
		
		case 41:
			*uParam0 = { 1377.104f, -2076.2f, 52f };
			uParam0->f_3 = 37.5f;
			uParam0->f_4 = joaat("towtruck");
			gameplay::set_bit(&(uParam0->f_9), 8);
			iVar0 = 1;
			break;
		
		case 40:
			*uParam0 = { 1380.42f, -2072.77f, 51.7607f };
			uParam0->f_3 = 37.5f;
			uParam0->f_4 = joaat("trash");
			gameplay::set_bit(&(uParam0->f_9), 8);
			iVar0 = 1;
			break;
		
		case 42:
			*uParam0 = { 1359.389f, 3618.441f, 33.8907f };
			uParam0->f_3 = 108.2337f;
			uParam0->f_4 = joaat("barracks");
			gameplay::set_bit(&(uParam0->f_9), 8);
			iVar0 = 1;
			break;
		
		case 43:
			*uParam0 = { 693.1154f, -1018.155f, 21.6387f };
			uParam0->f_3 = 177.6454f;
			uParam0->f_4 = 1938952078;
			gameplay::set_bit(&(uParam0->f_9), 23);
			gameplay::set_bit(&(uParam0->f_9), 8);
			iVar0 = 1;
			break;
		
		case 44:
			*uParam0 = { -73.6963f, 495.124f, 143.5226f };
			uParam0->f_3 = 155.5994f;
			uParam0->f_4 = joaat("vacca");
			iVar0 = 1;
			break;
		
		case 45:
			*uParam0 = { -67.6314f, 891.8266f, 234.5348f };
			uParam0->f_3 = 294.993f;
			uParam0->f_4 = joaat("surano");
			iVar0 = 1;
			break;
		
		case 46:
			*uParam0 = { 533.9048f, -169.2469f, 53.7005f };
			uParam0->f_3 = 1.2998f;
			uParam0->f_4 = joaat("tornado2");
			iVar0 = 1;
			break;
		
		case 47:
			*uParam0 = { -726.8914f, -408.6952f, 34.0416f };
			uParam0->f_3 = 267.7392f;
			uParam0->f_4 = joaat("superd");
			iVar0 = 1;
			break;
		
		case 48:
			*uParam0 = { -1321.519f, 261.3993f, 61.5709f };
			uParam0->f_3 = 350.7697f;
			uParam0->f_4 = joaat("double");
			iVar0 = 1;
			break;
		
		case 49:
			*uParam0 = { -1267.999f, 451.6463f, 93.7071f };
			uParam0->f_3 = 48.9311f;
			uParam0->f_4 = joaat("double");
			iVar0 = 1;
			break;
		
		case 50:
			*uParam0 = { -1062.076f, -226.7637f, 37.157f };
			uParam0->f_3 = 234.2767f;
			uParam0->f_4 = joaat("double");
			iVar0 = 1;
			break;
		
		case 51:
			*uParam0 = { 68.16914f, -1558.958f, 29.46904f };
			uParam0->f_3 = 49.90575f;
			uParam0->f_4 = joaat("rumpo2");
			uParam0->f_12 = 2;
			gameplay::set_bit(&(uParam0->f_9), 26);
			iVar0 = 1;
			break;
		
		case 52:
			*uParam0 = { 589.4399f, 2736.708f, 42.03316f };
			uParam0->f_3 = -175.7105f;
			uParam0->f_4 = joaat("rumpo2");
			uParam0->f_12 = 2;
			gameplay::set_bit(&(uParam0->f_9), 26);
			iVar0 = 1;
			break;
		
		case 53:
			*uParam0 = { -488.774f, -344.5721f, 34.36356f };
			uParam0->f_3 = 82.4042f;
			uParam0->f_4 = joaat("rumpo2");
			uParam0->f_12 = 2;
			gameplay::set_bit(&(uParam0->f_9), 26);
			iVar0 = 1;
			break;
		
		case 54:
			*uParam0 = { 288.8808f, -585.4728f, 43.15428f };
			uParam0->f_3 = -20.80707f;
			uParam0->f_4 = joaat("rumpo2");
			uParam0->f_12 = 2;
			gameplay::set_bit(&(uParam0->f_9), 26);
			iVar0 = 1;
			break;
		
		case 55:
			*uParam0 = { 304.8294f, -1383.674f, 31.67744f };
			uParam0->f_3 = -41.11603f;
			uParam0->f_4 = joaat("rumpo2");
			uParam0->f_12 = 2;
			gameplay::set_bit(&(uParam0->f_9), 26);
			iVar0 = 1;
			break;
		
		case 56:
			*uParam0 = { 1126.194f, -1481.486f, 34.7016f };
			uParam0->f_3 = -91.43369f;
			uParam0->f_4 = joaat("rumpo2");
			uParam0->f_12 = 2;
			gameplay::set_bit(&(uParam0->f_9), 26);
			iVar0 = 1;
			break;
		
		case 57:
			*uParam0 = { -1598.36f, 5252.84f, 0f };
			uParam0->f_3 = 28.14f;
			uParam0->f_4 = joaat("submersible");
			uParam0->f_13 = 308;
			gameplay::set_bit(&(uParam0->f_9), 2);
			gameplay::set_bit(&(uParam0->f_9), 30);
			gameplay::set_bit(&(uParam0->f_9), 6);
			iVar0 = 1;
			break;
		
		case 58:
			*uParam0 = { -1602.62f, 5260.37f, 0.86f };
			uParam0->f_3 = 25.32f;
			uParam0->f_4 = joaat("dinghy");
			uParam0->f_13 = 404;
			gameplay::set_bit(&(uParam0->f_9), 2);
			gameplay::set_bit(&(uParam0->f_9), 22);
			gameplay::set_bit(&(uParam0->f_9), 6);
			iVar0 = 1;
			break;
		
		case 59:
			*uParam0 = { 2116.571f, 4763.279f, 40.1596f };
			uParam0->f_3 = 198.723f;
			uParam0->f_4 = joaat("bfinjection");
			iVar0 = 1;
			break;
		
		case 60:
			*uParam0 = { 1133.21f, 120.2f, 80.9f };
			uParam0->f_3 = 134.4f;
			if (func_54())
			{
				uParam0->f_4 = joaat("blimp2");
			}
			else
			{
				uParam0->f_4 = joaat("blimp");
			}
			uParam0->f_13 = 401;
			gameplay::set_bit(&(uParam0->f_9), 13);
			gameplay::set_bit(&(uParam0->f_9), 2);
			gameplay::set_bit(&(uParam0->f_9), 1);
			gameplay::set_bit(&(uParam0->f_9), 23);
			gameplay::set_bit(&(uParam0->f_9), 21);
			iVar0 = 1;
			break;
		
		case 61:
			*uParam0 = { -806.31f, -2679.65f, 13.9f };
			uParam0->f_3 = 150.54f;
			if (func_54())
			{
				uParam0->f_4 = joaat("blimp2");
			}
			else
			{
				uParam0->f_4 = joaat("blimp");
			}
			uParam0->f_13 = 401;
			gameplay::set_bit(&(uParam0->f_9), 13);
			gameplay::set_bit(&(uParam0->f_9), 2);
			gameplay::set_bit(&(uParam0->f_9), 1);
			gameplay::set_bit(&(uParam0->f_9), 23);
			gameplay::set_bit(&(uParam0->f_9), 21);
			iVar0 = 1;
			break;
		
		case 62:
			*uParam0 = { 1985.85f, 3828.96f, 31.98f };
			uParam0->f_3 = -16.58f;
			uParam0->f_4 = joaat("blazer3");
			gameplay::set_bit(&(uParam0->f_9), 6);
			iVar0 = 1;
			break;
		
		case 63:
			*uParam0 = { 3870.75f, 4464.67f, 0f };
			uParam0->f_3 = 0f;
			uParam0->f_4 = joaat("submersible2");
			uParam0->f_13 = 308;
			gameplay::set_bit(&(uParam0->f_9), 0);
			gameplay::set_bit(&(uParam0->f_9), 21);
			gameplay::set_bit(&(uParam0->f_9), 23);
			gameplay::set_bit(&(uParam0->f_9), 6);
			gameplay::set_bit(&(uParam0->f_9), 30);
			iVar0 = 1;
			break;
		
		case 64:
			*uParam0 = { 1257.729f, -2564.474f, 41.717f };
			uParam0->f_3 = 284.5561f;
			uParam0->f_4 = joaat("dukes2");
			gameplay::set_bit(&(uParam0->f_9), 6);
			iVar0 = 1;
			break;
		
		case 65:
			*uParam0 = { 643.2823f, 3014.152f, 42.2733f };
			uParam0->f_3 = 128.0554f;
			uParam0->f_4 = joaat("dukes2");
			gameplay::set_bit(&(uParam0->f_9), 6);
			iVar0 = 1;
			break;
		
		case 66:
			*uParam0 = { 38.9368f, 850.8677f, 196.3f };
			uParam0->f_3 = 311.6813f;
			uParam0->f_4 = joaat("dodo");
			gameplay::set_bit(&(uParam0->f_9), 30);
			gameplay::set_bit(&(uParam0->f_9), 23);
			gameplay::set_bit(&(uParam0->f_9), 6);
			iVar0 = 1;
			break;
		
		case 67:
			*uParam0 = { 1333.875f, 4262.226f, 30.78f };
			uParam0->f_3 = 262.5293f;
			uParam0->f_4 = joaat("dodo");
			gameplay::set_bit(&(uParam0->f_9), 30);
			gameplay::set_bit(&(uParam0->f_9), 23);
			gameplay::set_bit(&(uParam0->f_9), 6);
			iVar0 = 1;
			break;
	}
	if (gameplay::is_bit_set(uParam0->f_9, 10))
	{
		uParam0->f_4 = Global_101652.f_31373.f_69[uParam0->f_14 /*78*/].f_66;
		if (iParam1 == 14)
		{
			if (((((uParam0->f_4 == joaat("miljet") || uParam0->f_4 == joaat("besra")) || uParam0->f_4 == joaat("luxor")) || uParam0->f_4 == joaat("shamal")) || uParam0->f_4 == joaat("titan")) || uParam0->f_4 == joaat("luxor2"))
			{
				*uParam0 = { 1678.8f, 3229.6f, 41.8f };
				uParam0->f_3 = 106.0906f;
			}
		}
		if (!func_8(Global_101652.f_31373.f_1864[uParam0->f_14 /*3*/], 0f, 0f, 0f, 0))
		{
			*uParam0 = { Global_101652.f_31373.f_1864[uParam0->f_14 /*3*/] };
		}
		if (Global_101652.f_31373.f_1934[uParam0->f_14] != -1f)
		{
			uParam0->f_3 = Global_101652.f_31373.f_1934[uParam0->f_14];
		}
	}
	if (gameplay::is_bit_set(uParam0->f_9, 19))
	{
		if (!func_8(Global_101652.f_2079.f_539.f_2816[1 /*10*/][uParam0->f_12 /*3*/], 0f, 0f, 0f, 0))
		{
			*uParam0 = { Global_101652.f_2079.f_539.f_2816[1 /*10*/][uParam0->f_12 /*3*/] };
			uParam0->f_3 = Global_101652.f_2079.f_539.f_2837[1 /*4*/][uParam0->f_12];
		}
	}
	else if (gameplay::is_bit_set(uParam0->f_9, 20))
	{
		if (!func_8(Global_101652.f_2079.f_539.f_2816[0 /*10*/][uParam0->f_12 /*3*/], 0f, 0f, 0f, 0))
		{
			*uParam0 = { Global_101652.f_2079.f_539.f_2816[0 /*10*/][uParam0->f_12 /*3*/] };
			uParam0->f_3 = Global_101652.f_2079.f_539.f_2837[0 /*4*/][uParam0->f_12];
		}
	}
	return iVar0;
}

int func_70(int iParam0, int iParam1)//Position - 0x59BB
{
	struct<82> Var0;
	
	if (func_23(iParam0))
	{
		Var0.f_11 = 12;
		Var0.f_31 = 49;
		Var0.f_81 = 2;
		func_71(iParam0, &Var0, iParam1);
		return Var0;
	}
	else if (iParam0 != 145)
	{
	}
	return 0;
}

void func_71(int iParam0, var uParam1, int iParam2)//Position - 0x59FD
{
	int iVar0;
	
	uParam1->f_88 = 1;
	uParam1->f_84 = 255;
	uParam1->f_85 = 255;
	uParam1->f_86 = 255;
	uParam1->f_97 = 1;
	uParam1->f_3 = 1000;
	uParam1->f_1 = 0;
	switch (iParam0)
	{
		case 0:
			iVar0 = joaat("tailgater");
			if (Global_101652.f_8028.f_99.f_58[128] && !Global_101652.f_8028.f_99.f_58[131])
			{
				iVar0 = joaat("premier");
			}
			switch (iVar0)
			{
				case joaat("tailgater"):
					*uParam1 = iVar0;
					uParam1->f_2 = 3f;
					uParam1->f_4 = 0;
					uParam1->f_9 = 1;
					uParam1->f_11[0] = 1;
					StringCopy(&(uParam1->f_27), "5MDS003", 16);
					break;
				
				case joaat("premier"):
					*uParam1 = iVar0;
					uParam1->f_2 = 14.9f;
					uParam1->f_5 = 43;
					uParam1->f_6 = 43;
					uParam1->f_7 = 0;
					uParam1->f_8 = 156;
					uParam1->f_9 = 0;
					StringCopy(&(uParam1->f_27), "880HS955", 16);
					break;
			}
			break;
		
		case 2:
			iVar0 = joaat("bodhi2");
			switch (iVar0)
			{
				case joaat("bodhi2"):
					*uParam1 = iVar0;
					uParam1->f_2 = 14f;
					uParam1->f_5 = 32;
					uParam1->f_6 = 0;
					uParam1->f_7 = 0;
					uParam1->f_8 = 156;
					StringCopy(&(uParam1->f_27), "BETTY 32", 16);
					if (Global_101652.f_8028.f_99.f_58[119])
					{
						uParam1->f_11[1] = 1;
					}
					break;
			}
			break;
		
		case 1:
			if (iParam2 == 1)
			{
				iVar0 = joaat("buffalo2");
			}
			else if (iParam2 == 2)
			{
				iVar0 = joaat("bagger");
			}
			else if (Global_101652.f_8028.f_99.f_58[118])
			{
				iVar0 = joaat("bagger");
			}
			else
			{
				iVar0 = joaat("buffalo2");
			}
			switch (iVar0)
			{
				case joaat("bagger"):
					*uParam1 = iVar0;
					uParam1->f_2 = 6f;
					uParam1->f_5 = 53;
					uParam1->f_6 = 0;
					uParam1->f_7 = 59;
					uParam1->f_8 = 156;
					StringCopy(&(uParam1->f_27), "FC88", 16);
					break;
				
				case joaat("buffalo2"):
					*uParam1 = iVar0;
					uParam1->f_2 = 0f;
					uParam1->f_5 = 111;
					uParam1->f_6 = 111;
					uParam1->f_7 = 0;
					uParam1->f_8 = 156;
					uParam1->f_10 = 1;
					StringCopy(&(uParam1->f_27), "FC1988", 16);
					uParam1->f_11[0] = 1;
					uParam1->f_11[1] = 1;
					uParam1->f_11[2] = 1;
					uParam1->f_11[3] = 1;
					uParam1->f_11[4] = 1;
					uParam1->f_11[5] = 1;
					uParam1->f_11[6] = 1;
					uParam1->f_11[7] = 1;
					uParam1->f_11[8] = 1;
					break;
			}
			break;
		
		default:
			break;
	}
}

int func_72(int iParam0)//Position - 0x5C59
{
	int iVar0;
	int iVar1;
	int iVar2;
	int iVar3;
	int iVar4;
	
	iVar0 = 0;
	while (iVar0 < 68)
	{
		if ((entity::does_entity_exist(Global_68526.f_484[iVar0]) && !entity::is_entity_dead(Global_68526.f_484[iVar0], 0)) && vehicle::is_vehicle_driveable(Global_68526.f_484[iVar0], 0))
		{
			vehicle::get_vehicle_colours(iParam0, &iVar1, &iVar2);
			vehicle::get_vehicle_colours(Global_68526.f_484[iVar0], &iVar3, &iVar4);
			if (((entity::get_entity_model(iParam0) == entity::get_entity_model(Global_68526.f_484[iVar0]) && vehicle::get_vehicle_livery(iParam0) == vehicle::get_vehicle_livery(Global_68526.f_484[iVar0])) && iVar1 == iVar2) && iVar3 == iVar4)
			{
				return iVar0;
			}
		}
		iVar0++;
	}
	return -1;
}

bool func_73(int iParam0, vector3 vParam1, int iParam4)//Position - 0x5D1C
{
	int iVar0;
	var uVar1[3];
	int iVar5;
	int iVar6;
	
	iVar0 = entity::get_entity_model(iParam0);
	switch (iVar0)
	{
		case joaat("cargobob"):
			if (func_75(iParam0, Global_68526.f_139[38], 0))
			{
				func_65(38);
				return true;
			}
			break;
		
		case 1938952078:
			if (func_75(iParam0, Global_68526.f_139[43], 1))
			{
				func_65(43);
				return true;
			}
			break;
		
		case joaat("cuban800"):
			iVar5 = ped::get_ped_nearby_vehicles(player::player_ped_id(), &uVar1);
			iVar6 = 0;
			while (iVar6 <= (iVar5 - 1))
			{
				if (func_75(iParam0, uVar1[iVar6], 1) && func_74(entity::get_entity_coords(uVar1[iVar6], 1), 2136.133f, 4780.563f, 39.9702f, 5f, 0))
				{
					if ((!iParam4 || func_8(vParam1, 0f, 0f, 0f, 0)) || gameplay::get_distance_between_coords(entity::get_entity_coords(iParam0, 1), entity::get_entity_coords(uVar1[iVar6], 1), 1) < 10f)
					{
						vehicle::delete_vehicle(&iParam0);
						return true;
					}
					else
					{
						return false;
					}
				}
				iVar6++;
			}
			break;
		
		case joaat("luxor2"):
			if ((entity::does_entity_exist(Global_68526.f_484[14]) && vehicle::is_vehicle_driveable(iParam0, 0)) && vehicle::is_vehicle_driveable(Global_68526.f_484[14], 0))
			{
				if (entity::get_entity_model(Global_68526.f_484[14]) == joaat("luxor2") && vehicle::get_vehicle_livery(iParam0) == vehicle::get_vehicle_livery(Global_68526.f_484[14]))
				{
					func_65(14);
					return true;
				}
			}
			break;
		
		case joaat("swift2"):
			if ((entity::does_entity_exist(Global_68526.f_484[20]) && vehicle::is_vehicle_driveable(iParam0, 0)) && vehicle::is_vehicle_driveable(Global_68526.f_484[20], 0))
			{
				if (entity::get_entity_model(Global_68526.f_484[20]) == joaat("swift2") && vehicle::get_vehicle_livery(iParam0) == vehicle::get_vehicle_livery(Global_68526.f_484[20]))
				{
					func_65(20);
					return true;
				}
			}
			break;
	}
	return false;
}

bool func_74(vector3 vParam0, vector3 vParam3, float fParam6, int iParam7)//Position - 0x5F24
{
	if (fParam6 < 0f)
	{
		fParam6 = 0f;
	}
	if (!iParam7)
	{
		if (gameplay::absf((vParam0.x - vParam3.x)) <= fParam6)
		{
			if (gameplay::absf((vParam0.y - vParam3.y)) <= fParam6)
			{
				if (gameplay::absf((vParam0.y - vParam3.y)) <= fParam6)
				{
					return true;
				}
			}
		}
	}
	else if (gameplay::absf((vParam0.x - vParam3.x)) <= fParam6)
	{
		if (gameplay::absf((vParam0.y - vParam3.y)) <= fParam6)
		{
			return true;
		}
	}
	return false;
}

bool func_75(int iParam0, int iParam1, int iParam2)//Position - 0x5F9F
{
	int iVar0;
	int iVar1;
	int iVar2;
	int iVar3;
	
	if ((entity::does_entity_exist(iParam1) && !entity::is_entity_dead(iParam1, 0)) && vehicle::is_vehicle_driveable(iParam1, 0))
	{
		if (iParam2)
		{
			vehicle::get_vehicle_colours(iParam0, &iVar0, &iVar1);
			vehicle::get_vehicle_colours(iParam1, &iVar2, &iVar3);
			if (iVar0 == iVar2 && iVar1 == iVar3)
			{
				return true;
			}
		}
		else
		{
			return true;
		}
	}
	return false;
}

void func_76(int iParam0, var uParam1)//Position - 0x6000
{
	int iVar0;
	
	iVar0 = 0;
	while (iVar0 < 9)
	{
		if (!entity::does_entity_exist(Global_89150[iVar0]))
		{
			Global_89150[iVar0] = iParam0;
			Global_89160[iVar0] = uParam1;
			Global_89170[iVar0] = entity::get_entity_model(iParam0);
			if (vehicle::is_this_model_a_car(Global_89170[iVar0]))
			{
				Global_89198[uParam1 /*3*/][0] = -1;
			}
			else
			{
				Global_89198[uParam1 /*3*/][1] = -1;
			}
			iVar0 = 9;
		}
		if (iVar0 == 8)
		{
		}
		iVar0++;
	}
}

void func_77(int iParam0, int iParam1)//Position - 0x6082
{
	int iVar0;
	
	iVar0 = 0;
	while (iVar0 < 9)
	{
		if (entity::does_entity_exist(Global_89150[iVar0]))
		{
			if (iParam0 == 145 || Global_89160[iVar0] == iParam0)
			{
				if (iParam1 == 0 || entity::get_entity_model(Global_89150[iVar0]) == func_70(iParam0, iParam1))
				{
					if (!ped::is_ped_in_vehicle(player::player_ped_id(), Global_89150[iVar0], 0))
					{
						entity::set_entity_as_mission_entity(Global_89150[iVar0], false, 1);
						vehicle::delete_vehicle(&(Global_89150[iVar0]));
						Global_89160[iVar0] = 145;
					}
				}
			}
		}
		iVar0++;
	}
}

void func_78(int iParam0, var uParam1, int iParam2, int iParam3)//Position - 0x6120
{
	int iVar0;
	int iVar1;
	int iVar2;
	
	if (vehicle::is_vehicle_driveable(iParam0, 0))
	{
		if (gameplay::get_hash_key(&(uParam1->f_1)) != 0)
		{
			vehicle::set_vehicle_number_plate_text(iParam0, &(uParam1->f_1));
		}
		if (*uParam1 >= 0 && *uParam1 < vehicle::get_number_of_vehicle_number_plates())
		{
			vehicle::set_vehicle_number_plate_text_index(iParam0, *uParam1);
		}
		if (uParam1->f_66 == joaat("sovereign"))
		{
			uParam1->f_5 = 111;
			uParam1->f_6 = 111;
			uParam1->f_7 = 111;
		}
		else if (uParam1->f_66 == joaat("casco"))
		{
			iVar0 = 1;
			if (gameplay::is_bit_set(uParam1->f_77, func_41(iVar0 + 1)))
			{
			}
			else
			{
				gameplay::set_bit(&(uParam1->f_77), func_41(iVar0 + 1));
			}
		}
		else if (uParam1->f_66 == joaat("sandking") || uParam1->f_66 == joaat("sandking2"))
		{
			iVar1 = 1;
			if (gameplay::is_bit_set(uParam1->f_77, func_41(iVar1 + 1)))
			{
			}
			else
			{
				gameplay::set_bit(&(uParam1->f_77), func_41(iVar1 + 1));
			}
		}
		if (gameplay::is_bit_set(uParam1->f_77, 13))
		{
			vehicle::set_vehicle_custom_primary_colour(iParam0, uParam1->f_71, uParam1->f_72, uParam1->f_73);
		}
		else
		{
			vehicle::clear_vehicle_custom_primary_colour(iParam0);
		}
		if (gameplay::is_bit_set(uParam1->f_77, 12))
		{
			vehicle::set_vehicle_custom_secondary_colour(iParam0, uParam1->f_71, uParam1->f_72, uParam1->f_73);
		}
		else
		{
			vehicle::clear_vehicle_custom_secondary_colour(iParam0);
		}
		vehicle::set_vehicle_colours(iParam0, uParam1->f_5, uParam1->f_6);
		if (uParam1->f_7 < 0)
		{
			uParam1->f_7 = 0;
		}
		if (uParam1->f_8 < 0)
		{
			uParam1->f_8 = 0;
		}
		vehicle::set_vehicle_extra_colours(iParam0, uParam1->f_7, uParam1->f_8);
		if (((gameplay::is_bit_set(uParam1->f_77, 15) || func_85(iParam0)) || (((uParam1->f_62 == 0 && uParam1->f_63 == 0) && uParam1->f_64 == 0) && uParam1->f_9[20] > 0)) && func_84())
		{
			uParam1->f_62 = 0;
			uParam1->f_63 = 0;
			uParam1->f_64 = 0;
		}
		else if ((uParam1->f_62 == 0 && uParam1->f_63 == 0) && uParam1->f_64 == 0)
		{
			uParam1->f_62 = 255;
			uParam1->f_63 = 255;
			uParam1->f_64 = 255;
		}
		vehicle::set_vehicle_tyre_smoke_color(iParam0, uParam1->f_62, uParam1->f_63, uParam1->f_64);
		if (uParam1->f_65 == -1 && uParam1->f_66 != joaat("granger"))
		{
			vehicle::set_vehicle_window_tint(iParam0, 0);
		}
		else
		{
			vehicle::set_vehicle_window_tint(iParam0, 0);
			vehicle::set_vehicle_window_tint(iParam0, uParam1->f_65);
		}
		vehicle::set_vehicle_tyres_can_burst(iParam0, !gameplay::is_bit_set(uParam1->f_77, 9));
		if (iParam2)
		{
			vehicle::set_vehicle_doors_locked(iParam0, uParam1->f_70);
		}
		vehicle::_set_vehicle_neon_lights_colour(iParam0, uParam1->f_74, uParam1->f_75, uParam1->f_76);
		vehicle::_set_vehicle_neon_light_enabled(iParam0, 2, gameplay::is_bit_set(uParam1->f_77, 28));
		vehicle::_set_vehicle_neon_light_enabled(iParam0, 3, gameplay::is_bit_set(uParam1->f_77, 29));
		vehicle::_set_vehicle_neon_light_enabled(iParam0, 0, gameplay::is_bit_set(uParam1->f_77, 30));
		vehicle::_set_vehicle_neon_light_enabled(iParam0, 1, gameplay::is_bit_set(uParam1->f_77, 31));
		vehicle::set_vehicle_is_stolen(iParam0, gameplay::is_bit_set(uParam1->f_77, 10));
		if (vehicle::get_vehicle_livery_count(iParam0) > 1 && uParam1->f_67 >= 0)
		{
			vehicle::set_vehicle_livery(iParam0, uParam1->f_67);
		}
		if (uParam1->f_69 > -1 && uParam1->f_69 < 255)
		{
			if (!vehicle::is_this_model_a_bicycle(entity::get_entity_model(iParam0)))
			{
				if (vehicle::is_this_model_a_bike(entity::get_entity_model(iParam0)))
				{
					if (uParam1->f_69 == 6)
					{
						func_83(iParam0, uParam1->f_69);
					}
				}
				else
				{
					func_83(iParam0, uParam1->f_69);
				}
			}
		}
		if (vehicle::is_vehicle_a_convertible(iParam0, 0))
		{
			if ((uParam1->f_68 == 0 || uParam1->f_68 == 3) || uParam1->f_68 == 5)
			{
				vehicle::raise_convertible_roof(iParam0, 1);
			}
			else
			{
				vehicle::lower_convertible_roof(iParam0, 1);
			}
		}
		if (iParam3)
		{
			func_79(&iParam0, &(uParam1->f_9), &(uParam1->f_59));
		}
		if (!vehicle::is_this_model_a_heli(uParam1->f_66) && !vehicle::is_this_model_a_boat(uParam1->f_66))
		{
			iVar2 = 0;
			while (iVar2 <= 11)
			{
				if (gameplay::is_bit_set(uParam1->f_77, func_41(iVar2 + 1)))
				{
					if (!vehicle::is_vehicle_extra_turned_on(iParam0, iVar2 + 1))
					{
						vehicle::set_vehicle_extra(iParam0, iVar2 + 1, false);
					}
				}
				else if (vehicle::is_vehicle_extra_turned_on(iParam0, iVar2 + 1))
				{
					vehicle::set_vehicle_extra(iParam0, iVar2 + 1, true);
				}
				iVar2++;
			}
		}
		if ((entity::get_entity_model(iParam0) == joaat("sheava") || entity::get_entity_model(iParam0) == joaat("omnis")) || entity::get_entity_model(iParam0) == joaat("le7b"))
		{
			if (vehicle::get_vehicle_mod(iParam0, 0) == -1)
			{
				vehicle::set_vehicle_extra(iParam0, 1, false);
			}
		}
		if (vehicle::is_this_model_a_plane(uParam1->f_66))
		{
			if (!gameplay::is_bit_set(uParam1->f_77, 23))
			{
				if (gameplay::is_bit_set(uParam1->f_77, 22))
				{
					vehicle::_set_vehicle_landing_gear(iParam0, 2);
				}
				else
				{
					vehicle::_set_vehicle_landing_gear(iParam0, 3);
				}
			}
			else
			{
				vehicle::_set_vehicle_landing_gear(iParam0, 4);
			}
		}
		if (gameplay::is_bit_set(uParam1->f_77, 27))
		{
			decorator::decor_set_bool(iParam0, "IgnoredByQuickSave", 1);
		}
		else
		{
			decorator::decor_set_bool(iParam0, "IgnoredByQuickSave", 0);
		}
	}
}

bool func_79(int iParam0, var uParam1, var uParam2)//Position - 0x65CC
{
	int iVar0;
	int iVar1;
	
	if (!vehicle::is_vehicle_driveable(*iParam0, 0))
	{
		return false;
	}
	if (vehicle::get_num_mod_kits(*iParam0) == 0)
	{
		return false;
	}
	vehicle::set_vehicle_mod_kit(*iParam0, 0);
	iVar0 = 0;
	while (iVar0 < *uParam1)
	{
		iVar1 = iVar0;
		if (((((iVar1 == 17 || iVar1 == 18) || iVar1 == 19) || iVar1 == 20) || iVar1 == 21) || iVar1 == 22)
		{
			vehicle::toggle_vehicle_mod(*iParam0, iVar1, (*uParam1)[iVar0] > 0);
		}
		else if (vehicle::get_vehicle_mod(*iParam0, iVar1) != ((*uParam1)[iVar0] - 1))
		{
			vehicle::remove_vehicle_mod(*iParam0, iVar1);
			if ((*uParam1)[iVar0] > 0)
			{
				if (iVar0 == 23)
				{
					vehicle::set_vehicle_mod(*iParam0, iVar1, ((*uParam1)[iVar0] - 1), (*uParam2)[0] > 0);
				}
				else if (iVar0 == 24)
				{
					vehicle::set_vehicle_mod(*iParam0, iVar1, ((*uParam1)[iVar0] - 1), (*uParam2)[1] > 0);
				}
				else
				{
					vehicle::set_vehicle_mod(*iParam0, iVar1, ((*uParam1)[iVar0] - 1), false);
				}
			}
		}
		iVar0++;
	}
	if (func_82(entity::get_entity_model(*iParam0), 1) && vehicle::get_vehicle_mod(*iParam0, 24) != func_81(*iParam0, ((*uParam1)[38] - 1)))
	{
		vehicle::set_vehicle_mod(*iParam0, 24, func_81(*iParam0, ((*uParam1)[38] - 1)), false);
	}
	if (func_80(*iParam0))
	{
		vehicle::set_vehicle_strong(*iParam0, true);
		vehicle::set_vehicle_has_strong_axles(*iParam0, true);
	}
	return true;
}

bool func_80(int iParam0)//Position - 0x6744
{
	int iVar0;
	int iVar1;
	int iVar2;
	char cVar3[16];
	
	if ((entity::does_entity_exist(iParam0) && vehicle::is_vehicle_driveable(iParam0, 0)) && vehicle::get_num_mod_kits(iParam0) > 0)
	{
		vehicle::set_vehicle_mod_kit(iParam0, 0);
		iVar0 = 0;
		while (iVar0 < 49)
		{
			iVar1 = iVar0;
			if (((((iVar1 == 17 || iVar1 == 18) || iVar1 == 19) || iVar1 == 20) || iVar1 == 21) || iVar1 == 22)
			{
			}
			else if (vehicle::get_vehicle_mod(iParam0, iVar1) != -1)
			{
				StringCopy(&cVar3, vehicle::get_mod_text_label(iParam0, iVar1, vehicle::get_vehicle_mod(iParam0, iVar1)), 16);
				iVar2 = gameplay::get_hash_key(&cVar3);
				if (iVar2 != 0)
				{
					if (iVar2 == gameplay::get_hash_key("MNU_CAGE") || iVar2 == gameplay::get_hash_key("SABRE_CAG"))
					{
						return true;
					}
				}
			}
			iVar0++;
		}
	}
	return false;
}

int func_81(int iParam0, int iParam1)//Position - 0x6820
{
	int iVar0;
	int iVar1;
	float fVar2;
	int iVar3;
	
	if (entity::does_entity_exist(iParam0) && vehicle::is_vehicle_driveable(iParam0, 0))
	{
		switch (entity::get_entity_model(iParam0))
		{
			case joaat("tornado5"):
				switch (iParam1)
				{
					case 0:
						return 0;
						break;
					
					case 1:
						return 1;
						break;
					
					case 2:
						return 2;
						break;
					
					case 3:
						return 3;
						break;
					
					case 4:
						return 4;
						break;
					
					case 5:
						return 4;
						break;
				}
				break;
			
			case joaat("faction3"):
				return 3;
				break;
		}
		iVar0 = vehicle::get_num_vehicle_mods(iParam0, 38);
		iVar1 = vehicle::get_num_vehicle_mods(iParam0, 24);
		fVar2 = (system::to_float(iParam1 + 1) / system::to_float(iVar0));
		iVar3 = (system::floor((system::to_float(iVar1) * fVar2)) - 1);
		if (iVar3 < 0)
		{
			iVar3 = 0;
		}
		if (iVar3 >= iVar0)
		{
			iVar3 = (iVar0 - 1);
		}
		return iVar3;
	}
	return 0;
}

bool func_82(int iParam0, int iParam1)//Position - 0x6905
{
	switch (iParam0)
	{
		case joaat("faction2"):
		case joaat("buccaneer2"):
		case joaat("chino2"):
		case joaat("moonbeam2"):
		case joaat("primo2"):
		case joaat("voodoo"):
			return true;
			break;
		
		case joaat("sabregt2"):
			if (!Global_262145.f_12218)
			{
				return false;
			}
			else
			{
				return true;
			}
			break;
		
		case joaat("tornado5"):
			if (!Global_262145.f_12219)
			{
				return false;
			}
			else
			{
				return true;
			}
			break;
		
		case joaat("virgo2"):
			if (!Global_262145.f_12217)
			{
				return false;
			}
			else
			{
				return true;
			}
			break;
		
		case joaat("minivan2"):
			if (!Global_262145.f_12220)
			{
				return false;
			}
			else
			{
				return true;
			}
			break;
		
		case joaat("slamvan3"):
			if (!Global_262145.f_12222)
			{
				return false;
			}
			else
			{
				return true;
			}
			break;
		
		case joaat("faction3"):
			if (!Global_262145.f_12221)
			{
				return false;
			}
			else
			{
				return true;
			}
			break;
		
		case joaat("sultanrs"):
		case joaat("banshee2"):
			if (iParam1 & 1 != 0)
			{
				return false;
			}
			return true;
			break;
		
		case joaat("comet3"):
			if (Global_262145.f_16659)
			{
				if (iParam1 & 1 != 0)
				{
					return false;
				}
				return true;
			}
			return false;
			break;
		
		case joaat("diablous2"):
			if (Global_262145.f_16661)
			{
				if (iParam1 & 1 != 0)
				{
					return false;
				}
				return true;
			}
			return false;
			break;
		
		case joaat("fcr2"):
			if (Global_262145.f_16665)
			{
				if (iParam1 & 1 != 0)
				{
					return false;
				}
				return true;
			}
			return false;
			break;
		
		case joaat("elegy"):
			if (Global_262145.f_16662)
			{
				if (iParam1 & 1 != 0)
				{
					return false;
				}
				return true;
			}
			return false;
			break;
		
		case joaat("nero2"):
			if (Global_262145.f_16669)
			{
				if (iParam1 & 1 != 0)
				{
					return false;
				}
				return true;
			}
			return false;
			break;
		
		case joaat("italigtb2"):
			if (Global_262145.f_16667)
			{
				if (iParam1 & 1 != 0)
				{
					return false;
				}
				return true;
			}
			return false;
			break;
		
		case joaat("specter2"):
			if (Global_262145.f_16672)
			{
				if (iParam1 & 1 != 0)
				{
					return false;
				}
				return true;
			}
			return false;
			break;
	}
	return false;
}

void func_83(int iParam0, int iParam1)//Position - 0x6B2A
{
	int iVar0;
	int iVar1;
	
	if (vehicle::get_num_mod_kits(iParam0) > 0)
	{
		vehicle::set_vehicle_mod_kit(iParam0, 0);
		iVar0 = vehicle::get_vehicle_mod(iParam0, 24);
		iVar1 = vehicle::get_vehicle_mod_variation(iParam0, 24);
		vehicle::set_vehicle_wheel_type(iParam0, iParam1);
		if (entity::get_entity_model(iParam0) == joaat("tornado6"))
		{
			return;
		}
		if (iVar0 == -1)
		{
			vehicle::remove_vehicle_mod(iParam0, 24);
		}
		else
		{
			vehicle::set_vehicle_mod(iParam0, 24, iVar0, iVar1 == 1);
		}
	}
}

int func_84()//Position - 0x6B8F
{
	return dlc2::is_dlc_present(-1691188696);
}

int func_85(int iParam0)//Position - 0x6BA0
{
	int iVar0;
	
	if (entity::does_entity_exist(iParam0))
	{
		if (vehicle::is_vehicle_driveable(iParam0, 0))
		{
			if (decorator::decor_is_registered_as_type("MPBitset", 3))
			{
				if (decorator::decor_exist_on(iParam0, "MPBitset"))
				{
					iVar0 = decorator::decor_get_int(iParam0, "MPBitset");
				}
				return gameplay::is_bit_set(iVar0, 4);
			}
		}
	}
	return false;
}

void func_86(vector3 vParam0, float fParam3, int iParam4)//Position - 0x6BEB
{
	int iVar0;
	
	iVar0 = 0;
	while (iVar0 < 68)
	{
		if (func_69(&(Global_68526.f_555[0 /*21*/]), iVar0))
		{
			if (gameplay::get_distance_between_coords(vParam0, Global_68526.f_555[0 /*21*/], iParam4) <= fParam3)
			{
				func_65(iVar0);
			}
		}
		iVar0++;
	}
}

bool func_87(var uParam0)//Position - 0x6C3B
{
	if (func_88(uParam0))
	{
		if (streaming::has_model_loaded(uParam0->f_12.f_66))
		{
			return true;
		}
		else
		{
			return false;
		}
		return true;
	}
	else
	{
		return false;
	}
	return true;
}

bool func_88(var uParam0)//Position - 0x6C70
{
	if (uParam0->f_12.f_66 == 0)
	{
		return false;
	}
	if (!func_46(uParam0->f_12.f_66, 0))
	{
		return false;
	}
	if (uParam0->f_12.f_66 == joaat("stunt") && func_74(*uParam0, 1694.62f, 3276.27f, 41.31f, 1056964608, 0))
	{
		return false;
	}
	return true;
}

void func_89()//Position - 0x6CCF
{
	if (iLocal_201 == 0)
	{
		if (streaming::has_model_loaded(joaat("s_m_y_marine_01")) && streaming::has_model_loaded(joaat("s_m_m_pilot_02")))
		{
			if (!entity::does_entity_exist(iLocal_33[0]))
			{
				iLocal_33[0] = ped::create_ped(26, joaat("s_m_y_marine_01"), -1590.523f, 2796.302f, 15.9184f, 247.0896f, 1, true);
			}
			if (!entity::does_entity_exist(iLocal_33[1]))
			{
				iLocal_33[1] = ped::create_ped(26, joaat("s_m_y_marine_01"), -2303.8f, 3387.99f, 30.034f, 58.5763f, 1, true);
			}
			if (!entity::does_entity_exist(iLocal_33[2]))
			{
				iLocal_33[2] = ped::create_ped(26, joaat("s_m_y_marine_01"), -1697.329f, 2909.941f, 31.9506f, 245.656f, 1, true);
			}
			if (!entity::does_entity_exist(iLocal_33[3]))
			{
				iLocal_33[3] = ped::create_ped(26, joaat("s_m_y_marine_01"), -1696.369f, 2905.772f, 31.9454f, 6.3714f, 1, true);
			}
			if (!entity::does_entity_exist(iLocal_33[4]))
			{
				iLocal_33[4] = ped::create_ped(26, joaat("s_m_y_marine_01"), -1843.707f, 2821.611f, 31.8528f, 271.6265f, 1, true);
			}
			if (!entity::does_entity_exist(iLocal_33[5]))
			{
				iLocal_33[5] = ped::create_ped(26, joaat("s_m_y_marine_01"), -2006.877f, 2955.101f, 31.8103f, 332.0101f, 1, true);
			}
			if (!entity::does_entity_exist(iLocal_33[6]))
			{
				iLocal_33[6] = ped::create_ped(26, joaat("s_m_y_marine_01"), -2010.022f, 2956.805f, 31.8103f, 288.1283f, 1, true);
			}
			if (iLocal_28 != 3)
			{
				if (!entity::does_entity_exist(iLocal_33[7]))
				{
					iLocal_33[7] = ped::create_ped(26, joaat("s_m_y_marine_01"), -2140.213f, 3034.609f, 31.81f, 302.4493f, 1, true);
				}
				if (!entity::does_entity_exist(iLocal_33[8]))
				{
					iLocal_33[8] = ped::create_ped(26, joaat("s_m_y_marine_01"), -2136.053f, 3031.494f, 31.81f, 38.6856f, 1, true);
				}
			}
			if (!entity::does_entity_exist(iLocal_33[9]))
			{
				iLocal_33[9] = ped::create_ped(26, joaat("s_m_y_marine_01"), -2035.429f, 3058.876f, 31.8103f, 169.8222f, 1, true);
			}
			if (!entity::does_entity_exist(iLocal_33[10]))
			{
				iLocal_33[10] = ped::create_ped(26, joaat("s_m_y_marine_01"), -2146.467f, 3160.749f, 31.8106f, 356.4766f, 1, true);
			}
			if (!entity::does_entity_exist(iLocal_33[11]))
			{
				iLocal_33[11] = ped::create_ped(26, joaat("s_m_y_marine_01"), -2280.087f, 3172.423f, 31.8103f, 353.663f, 1, true);
			}
			if (!entity::does_entity_exist(iLocal_33[12]))
			{
				iLocal_33[12] = ped::create_ped(26, joaat("s_m_y_marine_01"), -2277.376f, 3177.8f, 31.8103f, 175.0685f, 1, true);
			}
			if (!entity::does_entity_exist(iLocal_31[0]))
			{
				iLocal_31[0] = ped::create_ped(26, joaat("s_m_m_pilot_02"), -1859.831f, 3071.758f, 31.8104f, 139.3607f, 1, true);
				ped::set_ped_prop_index(iLocal_31[0], 0, 2, 0, false);
				ped::set_ped_component_variation(iLocal_31[0], 8, 0, 0, 0);
				entity::set_entity_load_collision_flag(iLocal_31[0], true);
				weapon::give_weapon_to_ped(iLocal_31[0], joaat("weapon_assaultrifle"), 2000, true, true);
				ped::set_ped_relationship_group_hash(iLocal_31[0], iLocal_60);
				ped::set_ped_accuracy(iLocal_31[0], 0);
				ped::set_blocking_of_non_temporary_events(iLocal_31[0], true);
				func_91(iLocal_31[0], 595);
				func_90(iLocal_31[0], 0);
			}
			iLocal_176 = 0;
			while (iLocal_176 <= 12)
			{
				if (iLocal_275[iLocal_176] == 0)
				{
					if (!ped::is_ped_injured(iLocal_33[iLocal_176]))
					{
						entity::set_entity_load_collision_flag(iLocal_33[iLocal_176], true);
						weapon::give_weapon_to_ped(iLocal_33[iLocal_176], joaat("weapon_assaultrifle"), 2000, true, true);
						ped::set_ped_relationship_group_hash(iLocal_33[iLocal_176], iLocal_60);
						ped::set_ped_accuracy(iLocal_33[iLocal_176], 10);
						func_91(iLocal_33[iLocal_176], 595);
						func_90(iLocal_33[iLocal_176], 0);
						ped::set_blocking_of_non_temporary_events(iLocal_33[iLocal_176], true);
						iLocal_275[iLocal_176] = 1;
					}
				}
				iLocal_176++;
			}
			streaming::set_model_as_no_longer_needed(joaat("s_m_y_marine_01"));
			streaming::set_model_as_no_longer_needed(joaat("s_m_m_pilot_02"));
			iLocal_201 = 1;
		}
	}
}

void func_90(int iParam0, int iParam1)//Position - 0x70E4
{
	int iVar0;
	int iVar1;
	int iVar2;
	
	iVar0 = 0;
	if (iParam1)
	{
		iVar0 = 0;
		while (iVar0 < 64)
		{
			if (Global_55848[iVar0 /*2*/] != 0)
			{
				if (Global_55848[iVar0 /*2*/] == iParam0)
				{
					return;
				}
			}
			iVar0++;
		}
	}
	if (64 == Global_55847)
	{
		return;
	}
	iVar1 = -1;
	iVar2 = 0;
	while (iVar1 == -1 && iVar2 != 64)
	{
		if (Global_55848[iVar2 /*2*/] == 0)
		{
			iVar1 = iVar2;
		}
		iVar2++;
	}
	if (iVar1 == -1)
	{
		return;
	}
	Global_55848[iVar1 /*2*/] = iParam0;
	Global_55848[iVar1 /*2*/].f_1 = 7;
	Global_55847++;
}

void func_91(var uParam0, int iParam1)//Position - 0x717F
{
	int iVar0;
	
	iVar0 = 0;
	iVar0 = 0;
	while (iVar0 < 16)
	{
		if (Global_68066[iVar0 /*2*/] == 0)
		{
			Global_68066[iVar0 /*2*/] = uParam0;
			Global_68066[iVar0 /*2*/].f_1 = iParam1;
			if (iVar0 == Global_68099)
			{
				Global_68099++;
			}
			return;
		}
		iVar0++;
	}
}

void func_92(int iParam0, int iParam1)//Position - 0x71D5
{
	Global_91486.f_22[iParam1] = iParam0;
}

int func_93()//Position - 0x71E9
{
	return func_87(&(Global_95993.f_2311));
}

void func_94()//Position - 0x71FC
{
	func_95(&(Global_95993.f_2311));
}

void func_95(var uParam0)//Position - 0x720F
{
	if (func_88(uParam0))
	{
		streaming::request_model(uParam0->f_12.f_66);
	}
}

var func_96()//Position - 0x722D
{
	return Global_95993.f_2311.f_12.f_66;
}

int func_97()//Position - 0x7240
{
	return func_88(&(Global_95993.f_2311));
}

void func_98(vector3 vParam0, vector3 vParam3, float fParam6, vector3 vParam7, float fParam10, int iParam11, int iParam12, int iParam13, int iParam14, int iParam15)//Position - 0x7253
{
	func_99(vParam0, vParam3, fParam6, vParam7, fParam10, 0f, 0f, 0f, iParam11, iParam12, iParam13, iParam14, iParam15);
}

void func_99(vector3 vParam0, vector3 vParam3, float fParam6, vector3 vParam7, float fParam10, vector3 vParam11, int iParam14, int iParam15, int iParam16, int iParam17, int iParam18)//Position - 0x727C
{
	int iVar0;
	int iVar1;
	int iVar2;
	int iVar3;
	vector3 vVar4;
	vector3 vVar7;
	vector3 vVar10;
	int iVar13;
	int iVar14;
	int iVar15;
	
	if (iParam15)
	{
		iParam15 = false;
	}
	iVar2 = true;
	iVar3 = 0;
	iVar0 = player::get_players_last_vehicle();
	if (entity::does_entity_exist(iVar0))
	{
		if (!entity::is_entity_a_mission_entity(iVar0))
		{
			entity::set_entity_as_mission_entity(iVar0, true, 0);
			iVar3 = 1;
		}
		if (vehicle::is_vehicle_driveable(iVar0, 0))
		{
			if (iParam18)
			{
				func_104(iVar0);
			}
			if (entity::is_entity_in_angled_area(iVar0, vParam0, vParam3, fParam6, 0, true, 0))
			{
				iVar1 = true;
			}
			else
			{
				vVar10 = { entity::get_entity_coords(iVar0, 1) };
				if ((vVar10.y > vParam0.y && vVar10.y < vParam3.y) || (vVar10.y > vParam3.y && vVar10.y < vParam0.y))
				{
					if (func_101(iVar0, vParam0, vParam3, fParam6))
					{
						iVar1 = true;
					}
				}
			}
			if (vehicle::is_vehicle_driveable(iVar0, 0))
			{
				if (vehicle::is_vehicle_model(iVar0, joaat("taxi")))
				{
					if (vehicle::get_ped_in_vehicle_seat(iVar0, -1, 0) != player::player_ped_id() && vehicle::get_ped_in_vehicle_seat(iVar0, -1, 0) != 0)
					{
						if (gameplay::get_distance_between_coords(vParam0 + vParam3 / Vector(2f, 2f, 2f), entity::get_entity_coords(iVar0, 1), 1) < 20f)
						{
							iVar1 = true;
							iVar2 = false;
						}
					}
				}
			}
			if (iParam16)
			{
				if (func_60(iVar0, func_20(), 1))
				{
					iVar1 = false;
				}
			}
			if (iVar1)
			{
				if (!func_100(vParam11))
				{
					if (vehicle::is_vehicle_driveable(iVar0, 0))
					{
						iVar13 = entity::get_entity_model(iVar0);
						vehicle::_0xDF7E3EEB29642C38(iVar0, &vVar4, &vVar7);
						if (vehicle::is_this_model_a_heli(iVar13))
						{
							vParam11.x = (vParam11.x + 3f);
							vParam11.y = (vParam11.y + 3f);
						}
						if (((iVar13 == joaat("zentorno") || iVar13 == joaat("btype")) || iVar13 == joaat("dubsta3")) || iVar13 == joaat("monster"))
						{
							vParam11 = { vParam11 * Vector(1.1f, 1.1f, 1.1f) };
						}
						else if (iVar13 == joaat("t20") || iVar13 == joaat("virgo"))
						{
							vParam11 = { vParam11 * Vector(1.2f, 1.2f, 1.2f) };
						}
						if ((vVar7.x - vVar4.x) > vParam11.x)
						{
							iVar2 = false;
						}
						else if ((vVar7.y - vVar4.y) > vParam11.y)
						{
							iVar2 = false;
						}
						else if ((vVar7.y - vVar4.y) > vParam11.y)
						{
							iVar2 = false;
						}
					}
				}
				if (vehicle::is_vehicle_driveable(iVar0, 0))
				{
					if (iVar2)
					{
						gameplay::clear_area_of_vehicles(vParam7, 5f, 0, 0, 0, 0, false);
						entity::set_entity_heading(iVar0, fParam10);
						entity::set_entity_coords(iVar0, vParam7, 1, false, 0, 1);
						vehicle::set_vehicle_on_ground_properly(iVar0, 1084227584);
						if (iParam17)
						{
							vehicle::set_vehicle_engine_on(iVar0, false, 1, 0);
							vehicle::set_vehicle_doors_shut(iVar0, 1);
						}
					}
					else
					{
						if (!entity::is_entity_a_mission_entity(iVar0) || !entity::does_entity_belong_to_this_script(iVar0, 1))
						{
							entity::set_entity_as_mission_entity(iVar0, true, 1);
						}
						if (ped::is_ped_in_vehicle(player::player_ped_id(), iVar0, 0))
						{
							entity::set_entity_coords(player::player_ped_id(), entity::get_entity_coords(iVar0, 1), 1, false, 0, 1);
						}
						vehicle::delete_vehicle(&iVar0);
					}
				}
			}
			if (iParam14)
			{
				gameplay::clear_angled_area_of_vehicles(vParam0, vParam3, fParam6, 0, 0, 0, 0, 0);
			}
			if (iVar3 == 1)
			{
				if (entity::does_entity_exist(iVar0))
				{
					if (entity::is_entity_a_mission_entity(iVar0))
					{
						entity::set_vehicle_as_no_longer_needed(&iVar0);
					}
				}
			}
		}
		else
		{
			if (!entity::is_entity_a_mission_entity(iVar0))
			{
				entity::set_entity_as_mission_entity(iVar0, true, 0);
			}
			iVar14 = vehicle::get_ped_in_vehicle_seat(iVar0, -1, 0);
			if (entity::does_entity_exist(iVar14) && !ped::is_ped_injured(iVar14))
			{
				entity::set_entity_coords(iVar14, entity::get_entity_coords(iVar14, 1), 1, false, 0, 1);
			}
			iVar15 = vehicle::_get_vehicle_model_max_number_of_passengers(entity::get_entity_model(iVar0));
			if (iVar15 <= 2)
			{
				iVar14 = vehicle::get_ped_in_vehicle_seat(iVar0, 0, 0);
				if (entity::does_entity_exist(iVar14) && !ped::is_ped_injured(iVar14))
				{
					entity::set_entity_coords(iVar14, entity::get_entity_coords(iVar14, 1), 1, false, 0, 1);
				}
			}
			if (iVar15 <= 4)
			{
				iVar14 = vehicle::get_ped_in_vehicle_seat(iVar0, 1, 0);
				if (entity::does_entity_exist(iVar14) && !ped::is_ped_injured(iVar14))
				{
					entity::set_entity_coords(iVar14, entity::get_entity_coords(iVar14, 1), 1, false, 0, 1);
				}
				iVar14 = vehicle::get_ped_in_vehicle_seat(iVar0, 2, 0);
				if (entity::does_entity_exist(iVar14) && !ped::is_ped_injured(iVar14))
				{
					entity::set_entity_coords(iVar14, entity::get_entity_coords(iVar14, 1), 1, false, 0, 1);
				}
			}
			vehicle::delete_vehicle(&iVar0);
		}
	}
}

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

bool func_101(int iParam0, vector3 vParam1, vector3 vParam4, float fParam7)//Position - 0x7698
{
	vector3 vVar0;
	vector3 vVar3;
	vector3 vVar6;
	vector3 vVar9;
	vector3 vVar12;
	vector3 vVar15;
	vector3 vVar18[4];
	struct<2> Var31;
	struct<2> Var34;
	
	if (vehicle::is_vehicle_driveable(iParam0, 0))
	{
		vParam1.z = vParam4.y;
		vVar0 = { func_103(vParam1 - vParam4) };
		vVar3 = { vVar0 };
		vVar0.x = -vVar3.y;
		vVar0.y = vVar3.x;
		vVar0.z = 0f;
		vVar6 = { vParam1 - vVar0 * FtoV((fParam7 / 2f)) };
		vVar9 = { vParam1 + vVar0 * FtoV((fParam7 / 2f)) };
		vVar12 = { vParam4 - vVar0 * FtoV((fParam7 / 2f)) };
		vVar15 = { vParam4 + vVar0 * FtoV((fParam7 / 2f)) };
		gameplay::get_model_dimensions(entity::get_entity_model(iParam0), &Var31, &Var34);
		vVar18[0 /*3*/] = { entity::get_offset_from_entity_in_world_coords(iParam0, Var31, Var31.f_1, 0f) };
		vVar18[1 /*3*/] = { entity::get_offset_from_entity_in_world_coords(iParam0, Var31, Var34.f_1, 0f) };
		vVar18[2 /*3*/] = { entity::get_offset_from_entity_in_world_coords(iParam0, Var34, Var31.f_1, 0f) };
		vVar18[3 /*3*/] = { entity::get_offset_from_entity_in_world_coords(iParam0, Var34, Var34.f_1, 0f) };
		if (((((((((((((((func_102(vVar18[0 /*3*/], vVar18[1 /*3*/], vVar6, vVar9) || func_102(vVar18[0 /*3*/], vVar18[1 /*3*/], vVar9, vVar15)) || func_102(vVar18[0 /*3*/], vVar18[1 /*3*/], vVar12, vVar15)) || func_102(vVar18[0 /*3*/], vVar18[1 /*3*/], vVar6, vVar12)) || func_102(vVar18[1 /*3*/], vVar18[3 /*3*/], vVar6, vVar9)) || func_102(vVar18[1 /*3*/], vVar18[3 /*3*/], vVar9, vVar15)) || func_102(vVar18[1 /*3*/], vVar18[3 /*3*/], vVar12, vVar15)) || func_102(vVar18[1 /*3*/], vVar18[3 /*3*/], vVar6, vVar12)) || func_102(vVar18[3 /*3*/], vVar18[2 /*3*/], vVar6, vVar9)) || func_102(vVar18[3 /*3*/], vVar18[2 /*3*/], vVar9, vVar15)) || func_102(vVar18[3 /*3*/], vVar18[2 /*3*/], vVar12, vVar15)) || func_102(vVar18[3 /*3*/], vVar18[2 /*3*/], vVar6, vVar12)) || func_102(vVar18[2 /*3*/], vVar18[0 /*3*/], vVar6, vVar9)) || func_102(vVar18[2 /*3*/], vVar18[0 /*3*/], vVar9, vVar15)) || func_102(vVar18[2 /*3*/], vVar18[0 /*3*/], vVar12, vVar15)) || func_102(vVar18[2 /*3*/], vVar18[0 /*3*/], vVar6, vVar12))
		{
			return true;
		}
	}
	return false;
}

bool func_102(struct<2> Param0, var uParam2, struct<2> Param3, var uParam5, struct<2> Param6, var uParam8, struct<2> Param9, var uParam11)//Position - 0x798E
{
	float fVar0;
	float fVar1;
	float fVar2;
	float fVar3;
	float fVar4;
	float fVar5;
	float fVar6;
	float fVar7;
	float fVar8;
	float fVar9;
	float fVar10;
	float fVar11;
	float fVar12;
	float fVar13;
	
	fVar0 = Param0;
	fVar1 = Param0.f_1;
	fVar2 = Param3;
	fVar3 = Param3.f_1;
	fVar4 = Param6;
	fVar5 = Param6.f_1;
	fVar6 = Param9;
	fVar7 = Param9.f_1;
	fVar8 = (fVar2 - fVar0);
	fVar9 = (fVar3 - fVar1);
	fVar10 = (fVar6 - fVar4);
	fVar11 = (fVar7 - fVar5);
	fVar12 = (((-fVar9 * (fVar0 - fVar4)) + (fVar8 * (fVar1 - fVar5))) / ((-fVar10 * fVar9) + (fVar8 * fVar11)));
	fVar13 = (((fVar10 * (fVar1 - fVar5)) - (fVar11 * (fVar0 - fVar4))) / ((-fVar10 * fVar9) + (fVar8 * fVar11)));
	if (((fVar12 >= 0f && fVar12 <= 1f) && fVar13 >= 0f) && fVar13 <= 1f)
	{
		return true;
	}
	return false;
}

Vector3 func_103(vector3 vParam0)//Position - 0x7A42
{
	float fVar0;
	float fVar1;
	
	fVar0 = system::vmag(vParam0);
	if (fVar0 != 0f)
	{
		fVar1 = (1f / fVar0);
		vParam0 = { vParam0 * Vector(fVar1, fVar1, fVar1) };
	}
	else
	{
		vParam0.x = 0f;
		vParam0.y = 0f;
		vParam0.z = 0f;
	}
	return vParam0;
}

void func_104(int iParam0)//Position - 0x7A81
{
	if (entity::does_entity_exist(iParam0))
	{
		if (vehicle::is_vehicle_driveable(iParam0, 0))
		{
			if (vehicle::get_vehicle_engine_health(iParam0) <= 200f)
			{
				vehicle::set_vehicle_engine_health(iParam0, 500f);
			}
			if (vehicle::get_vehicle_petrol_tank_health(iParam0) <= 700f)
			{
				vehicle::set_vehicle_engine_health(iParam0, 900f);
			}
			if (entity::get_entity_health(iParam0) < 200)
			{
				vehicle::set_vehicle_engine_health(iParam0, 500f);
			}
		}
	}
}

void func_105()//Position - 0x7AE6
{
	if (!func_35())
	{
		if (ped::is_ped_in_any_vehicle(player::player_ped_id(), 0))
		{
			entity::set_entity_coords(player::player_ped_id(), 1738.131f, 3283.38f, 40.1261f, 1, false, 0, 1);
			entity::set_entity_heading(player::player_ped_id(), 25.3545f);
		}
	}
	if (entity::does_entity_exist(iLocal_31[0]))
	{
		ped::delete_ped(&(iLocal_31[0]));
	}
	iLocal_176 = 0;
	while (iLocal_176 <= 12)
	{
		if (entity::does_entity_exist(iLocal_33[iLocal_176]))
		{
			ped::delete_ped(&(iLocal_33[iLocal_176]));
		}
		iLocal_176++;
	}
	if (func_20() == 2)
	{
		if (entity::does_entity_exist(uLocal_325[0]))
		{
			ped::delete_ped(&(uLocal_325[0]));
		}
	}
	if (func_20() == 0)
	{
		if (entity::does_entity_exist(uLocal_325[2]))
		{
			ped::delete_ped(&(uLocal_325[2]));
		}
	}
	if (entity::does_entity_exist(iLocal_49[0]))
	{
		audio::_0x18EB48CFC41F2EA0(iLocal_49[0], 0f);
	}
	audio::stop_alarm("PORT_OF_LS_HEIST_FORT_ZANCUDO_ALARMS", true);
	audio::set_ambient_zone_state("AZ_AFB_ALARM_SPEECH", 0, 0);
	if (audio::is_audio_scene_active("DH_P_2B_ENTER_CHOPPER"))
	{
		audio::stop_audio_scene("DH_P_2B_ENTER_CHOPPER");
	}
	if (audio::is_audio_scene_active("DH_P_2B_ENEMY_CHOPPERS_ARRIVE"))
	{
		audio::stop_audio_scene("DH_P_2B_ENEMY_CHOPPERS_ARRIVE");
	}
	if (entity::does_entity_exist(iLocal_47))
	{
		vehicle::delete_vehicle(&iLocal_47);
	}
	if (entity::does_entity_exist(iLocal_55))
	{
		vehicle::delete_vehicle(&iLocal_55);
	}
	if (entity::does_entity_exist(iLocal_48))
	{
		vehicle::delete_vehicle(&iLocal_48);
	}
	if (entity::does_entity_exist(iLocal_49[0]))
	{
		vehicle::delete_vehicle(&(iLocal_49[0]));
	}
	if (entity::does_entity_exist(Global_88316[0]))
	{
		if (!entity::does_entity_belong_to_this_script(Global_88316[0], 1))
		{
			entity::set_entity_as_mission_entity(Global_88316[0], true, 1);
		}
		vehicle::delete_vehicle(&(Global_88316[0]));
	}
	if (entity::does_entity_exist(Global_88316[1]))
	{
		if (!entity::does_entity_belong_to_this_script(Global_88316[1], 1))
		{
			entity::set_entity_as_mission_entity(Global_88316[1], true, 1);
		}
		vehicle::delete_vehicle(&(Global_88316[1]));
	}
	if (entity::does_entity_exist(Global_88316[2]))
	{
		if (!entity::does_entity_belong_to_this_script(Global_88316[2], 1))
		{
			entity::set_entity_as_mission_entity(Global_88316[2], true, 1);
		}
		vehicle::delete_vehicle(&(Global_88316[2]));
	}
	if (entity::does_entity_exist(iLocal_51[0]))
	{
		vehicle::delete_vehicle(&(iLocal_51[0]));
	}
	if (entity::does_entity_exist(iLocal_58))
	{
		object::delete_object(&iLocal_58);
	}
	if (entity::does_entity_exist(iLocal_59))
	{
		object::delete_object(&iLocal_59);
	}
	if (cam::does_cam_exist(iLocal_56))
	{
		if (cam::is_cam_active(iLocal_56))
		{
			cam::render_script_cams(false, false, 3000, 1, 0, 0);
		}
		cam::destroy_cam(iLocal_56, 0);
	}
}

void func_106()//Position - 0x7D30
{
	if (ui::does_blip_exist(iLocal_61))
	{
		ui::remove_blip(&iLocal_61);
	}
	if (ui::does_blip_exist(iLocal_62))
	{
		ui::remove_blip(&iLocal_62);
	}
	if (ui::does_blip_exist(iLocal_65))
	{
		ui::remove_blip(&iLocal_65);
	}
	iLocal_176 = 0;
	while (iLocal_176 <= 12)
	{
		func_107(&(Local_70[iLocal_176 /*8*/]));
		iLocal_176++;
	}
	ui::_0x67EEDEA1B9BAFD94();
}

void func_107(int iParam0)//Position - 0x7D86
{
	int iVar0;
	struct<8> Var1;
	
	if (ui::does_blip_exist(*iParam0))
	{
		ui::remove_blip(iParam0);
		iVar0 = true;
	}
	if (ui::does_blip_exist(iParam0->f_1))
	{
		ui::remove_blip(&(iParam0->f_1));
		iVar0 = true;
	}
	if (entity::does_entity_exist(iParam0->f_7))
	{
		if (!ped::is_ped_injured(iParam0->f_7))
		{
			if (ui::does_ped_have_ai_blip(iParam0->f_7))
			{
				ui::_0xD30C50DF888D58B5(iParam0->f_7, 0);
			}
		}
		iVar0 = true;
	}
	if (iVar0)
	{
		*iParam0 = { Var1 };
	}
}

void func_108()//Position - 0x7DF4
{
	if (iLocal_28 == 5)
	{
		if (ui::does_blip_exist(iLocal_61))
		{
			ui::remove_blip(&iLocal_61);
		}
		if (ui::does_blip_exist(iLocal_62))
		{
			ui::remove_blip(&iLocal_62);
		}
	}
	if (entity::does_entity_exist(iLocal_48))
	{
		if (vehicle::is_vehicle_driveable(iLocal_48, 0))
		{
			if (ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_48, 0))
			{
				if (ui::does_blip_exist(iLocal_61))
				{
					ui::remove_blip(&iLocal_61);
				}
				if (iLocal_300 == 1)
				{
					if (gameplay::get_game_timer() < iLocal_189 + 7500)
					{
						ui::clear_prints();
					}
				}
				if (iLocal_28 == 4)
				{
					if (!ui::does_blip_exist(iLocal_62))
					{
						iLocal_62 = func_115(vLocal_314, 0);
					}
					if (iLocal_199 == 0)
					{
						if (!ui::is_message_being_displayed())
						{
							if (!func_114() || !ui::is_subtitle_preference_switched_on())
							{
								func_113("DP_GOD4", 7500, 1);
								iLocal_190 = gameplay::get_game_timer();
								iLocal_199 = 1;
							}
						}
					}
				}
				if (iLocal_28 == 3)
				{
					if (!ui::does_blip_exist(uLocal_63[0]))
					{
						uLocal_63[0] = func_112(iLocal_31[0], 1, 0);
					}
				}
			}
			else if (iLocal_28 != 5)
			{
				if (!ui::does_blip_exist(iLocal_61))
				{
					iLocal_61 = func_109(iLocal_48, 0, 0);
				}
				if (iLocal_28 == 3 || iLocal_28 == 4)
				{
					if (iLocal_300 == 0)
					{
						ui::clear_prints();
						func_113("DP_GOD6", 7500, 1);
						iLocal_189 = gameplay::get_game_timer();
						iLocal_300 = 1;
					}
				}
				if (ui::does_blip_exist(iLocal_62))
				{
					ui::remove_blip(&iLocal_62);
				}
				if (iLocal_28 == 3)
				{
					if (ui::does_blip_exist(uLocal_63[0]))
					{
						ui::remove_blip(&(uLocal_63[0]));
					}
				}
				if (iLocal_28 == 4)
				{
					if (iLocal_199 == 1)
					{
						if (gameplay::get_game_timer() < iLocal_190 + 7500)
						{
							ui::clear_prints();
						}
					}
				}
			}
		}
		else
		{
			if (ui::does_blip_exist(iLocal_61))
			{
				ui::remove_blip(&iLocal_61);
			}
			if (iLocal_197 == 1)
			{
				iLocal_200 = 1;
			}
		}
	}
	else
	{
		if (ui::does_blip_exist(iLocal_61))
		{
			ui::remove_blip(&iLocal_61);
		}
		if (iLocal_197 == 1)
		{
			iLocal_200 = 1;
		}
	}
}

int func_109(int iParam0, int iParam1, int iParam2)//Position - 0x7FA7
{
	return func_110(iParam0, !iParam1, iParam2);
}

int func_110(int iParam0, int iParam1, int iParam2)//Position - 0x7FBA
{
	int iVar0;
	
	if (!entity::does_entity_exist(iParam0))
	{
		return 0;
	}
	iVar0 = ui::add_blip_for_entity(iParam0);
	if (entity::is_entity_a_vehicle(iParam0))
	{
		ui::set_blip_scale(iVar0, func_111(network::network_is_game_in_progress(), 1f, 1f));
		if (!iParam2)
		{
			ui::set_blip_as_friendly(iVar0, iParam1);
		}
		else
		{
			ui::set_blip_colour(iVar0, 2);
		}
	}
	else if (entity::is_entity_a_ped(iParam0))
	{
		ui::set_blip_scale(iVar0, func_111(network::network_is_game_in_progress(), 0.7f, 0.7f));
		ui::set_blip_as_friendly(iVar0, iParam1);
	}
	else if (entity::is_entity_an_object(iParam0))
	{
		ui::set_blip_scale(iVar0, func_111(network::network_is_game_in_progress(), 0.7f, 0.7f));
	}
	return iVar0;
}

float func_111(int iParam0, float fParam1, float fParam2)//Position - 0x805F
{
	if (iParam0)
	{
		return fParam1;
	}
	return fParam2;
}

int func_112(int iParam0, int iParam1, int iParam2)//Position - 0x8076
{
	return func_110(iParam0, !iParam1, iParam2);
}

void func_113(char* sParam0, int iParam1, int iParam2)//Position - 0x8089
{
	iParam2 = iParam2;
	ui::_set_text_entry_2(sParam0);
	ui::_draw_subtitle_timed(iParam1, 1);
}

bool func_114()//Position - 0x80A2
{
	if (Global_15745 != 0 || audio::is_scripted_conversation_ongoing())
	{
		return true;
	}
	return false;
}

int func_115(vector3 vParam0, int iParam3)//Position - 0x80C4
{
	int iVar0;
	
	iVar0 = ui::add_blip_for_coord(vParam0);
	ui::set_blip_scale(iVar0, func_111(network::network_is_game_in_progress(), 1f, 1f));
	ui::set_blip_route(iVar0, iParam3);
	return iVar0;
}

void func_116()//Position - 0x80F0
{
	if (iLocal_175 > 0)
	{
		func_108();
		func_200();
	}
	if (iLocal_175 == 0)
	{
		if (iLocal_196 == 1)
		{
			iLocal_197 = 0;
			func_33();
			iLocal_196 = 0;
		}
		iLocal_304 = 0;
		iLocal_305 = 0;
		iLocal_308 = 0;
		iLocal_309 = 0;
		if (ui::does_blip_exist(iLocal_65))
		{
			ui::remove_blip(&iLocal_65);
		}
		player::set_player_wanted_level(player::player_id(), 0, 0);
		player::set_player_wanted_level_now(player::player_id(), 0);
		if (entity::does_entity_exist(iLocal_48))
		{
			entity::freeze_entity_position(iLocal_48, false);
		}
		player::set_police_radar_blips(0);
		iLocal_176 = 0;
		while (iLocal_176 <= 12)
		{
			if (entity::does_entity_exist(iLocal_33[iLocal_176]))
			{
				if (!ped::is_ped_injured(iLocal_33[iLocal_176]))
				{
					ped::set_ped_keep_task(iLocal_33[iLocal_176], true);
					entity::set_ped_as_no_longer_needed(&(iLocal_33[iLocal_176]));
				}
			}
			iLocal_176++;
		}
		if (entity::does_entity_exist(iLocal_49[0]))
		{
			entity::set_vehicle_as_no_longer_needed(&(iLocal_49[0]));
		}
		if (entity::does_entity_exist(iLocal_31[0]))
		{
			entity::set_ped_as_no_longer_needed(&(iLocal_31[0]));
		}
		if (!audio::is_audio_scene_active("DH_P_2B_ENTER_CHOPPER"))
		{
			audio::start_audio_scene("DH_P_2B_ENTER_CHOPPER");
		}
		if (cam::is_screen_faded_out())
		{
			if (!func_35())
			{
				streaming::load_scene(entity::get_entity_coords(player::player_ped_id(), 1));
			}
			func_198(iLocal_48, -1, 1);
		}
		if (!cam::is_screen_faded_in())
		{
			cam::do_screen_fade_in(800);
		}
		unk1::_0x293220DA1B46CEBC(10f, 5f, 4);
		iLocal_197 = 1;
		iLocal_175 = 1;
	}
	if (iLocal_175 == 1)
	{
		if (iLocal_308 == 0)
		{
			if (entity::does_entity_exist(iLocal_48))
			{
				if (vehicle::is_vehicle_driveable(iLocal_48, 0))
				{
					if (ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_48, 0))
					{
						if (gameplay::get_distance_between_coords(entity::get_entity_coords(player::player_ped_id(), 1), vLocal_311, 1) > 800f)
						{
							func_134(2, "STAGE_FLY_CARGOBOB_TO_HANGER", 1, 0, 0, 1);
							iLocal_308 = 1;
						}
					}
				}
			}
		}
		if (entity::does_entity_exist(iLocal_48))
		{
			if (vehicle::is_vehicle_driveable(iLocal_48, 0))
			{
				if (ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_48, 0))
				{
					if (entity::is_entity_in_air(iLocal_48))
					{
						if (gameplay::get_distance_between_coords(entity::get_entity_coords(player::player_ped_id(), 1), vLocal_311, 1) > 800f)
						{
							if (iLocal_304 == 0 && iLocal_199 == 1)
							{
								if (!ui::is_message_being_displayed())
								{
									if (!func_114() || !ui::is_subtitle_preference_switched_on())
									{
										func_133(&uLocal_403, 2, player::player_ped_id(), "TREVOR", 0, 1);
										if (func_132(&uLocal_403, "DP2BAUD", "DP2B_CHAT59", 7, 0, 0, 0))
										{
											iLocal_304 = 1;
										}
									}
								}
							}
							if (iLocal_304 == 1 && iLocal_309 == 0)
							{
								if (func_131(72) == 0)
								{
									if (!func_114())
									{
										if (!ui::is_message_being_displayed() || !ui::is_subtitle_preference_switched_on())
										{
											func_133(&uLocal_403, 3, 0, "Wade", 0, 1);
											if (func_120(&uLocal_403, 24, "DP2BAUD", "DP2B_WADEP3", 7, 1, 0, 0, 0))
											{
												iLocal_309 = 1;
											}
										}
									}
								}
								else if (!func_114())
								{
									if (!ui::is_message_being_displayed() || !ui::is_subtitle_preference_switched_on())
									{
										func_133(&uLocal_403, 3, 0, "Wade", 0, 1);
										if (func_120(&uLocal_403, 24, "DP2BAUD", "DP2B_WADEP4", 7, 1, 0, 0, 0))
										{
											iLocal_309 = 1;
										}
									}
								}
							}
						}
						else if (func_119(71) == 0)
						{
							if (iLocal_305 == 0)
							{
								if (!func_114())
								{
									if (!ui::is_help_message_being_displayed())
									{
										func_118("DP_HELP4", -1);
										iLocal_305 = 1;
									}
								}
							}
						}
					}
				}
			}
		}
		if (entity::does_entity_exist(iLocal_48))
		{
			if (vehicle::is_vehicle_driveable(iLocal_48, 0))
			{
				if (ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_48, 0))
				{
					if (entity::is_entity_at_coord(player::player_ped_id(), vLocal_314, 2f, 2f, 2f, true, true, 0))
					{
					}
					if (entity::is_entity_in_angled_area(player::player_ped_id(), 1721.001f, 3264.248f, 38.40064f, 1765.509f, 3276.518f, 46.05385f, 48.25f, 0, true, 0))
					{
						if (!entity::is_entity_in_air(iLocal_48) && vehicle::is_vehicle_stopped(iLocal_48))
						{
							func_117(1, 600);
							unk1::_0x293220DA1B46CEBC(8f, 5f, 4);
							iLocal_175 = 0;
							iLocal_28 = 5;
						}
					}
				}
			}
		}
	}
}

void func_117(int iParam0, int iParam1)//Position - 0x8496
{
	int iVar0;
	
	if (Global_55826)
	{
	}
	Global_55826 = 0;
	if (iParam0)
	{
		Global_55827 = 1;
	}
	iVar0 = 0;
	if (iParam1 == -1)
	{
		iVar0 = 0;
		while (iVar0 < Global_67913)
		{
			if (Global_56043[Global_67914[iVar0 /*9*/] /*13*/] == 4)
			{
				Global_67914[iVar0 /*9*/].f_5 = 0;
				return;
			}
			iVar0++;
		}
	}
	else
	{
		iVar0 = 0;
		while (iVar0 < Global_67913)
		{
			if (Global_67914[iVar0 /*9*/] > 0)
			{
				if (Global_67914[iVar0 /*9*/] == iParam1)
				{
					Global_67914[iVar0 /*9*/].f_5 = 0;
					return;
				}
			}
			iVar0++;
		}
	}
}

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

int func_119(int iParam0)//Position - 0x8547
{
	if (iParam0 == 146 || iParam0 == -1)
	{
		return 0;
	}
	return Global_101652.f_8028.f_99.f_58[iParam0];
}

int func_120(var uParam0, int iParam1, char* sParam2, char* sParam3, int iParam4, int iParam5, int iParam6, int iParam7, int iParam8)//Position - 0x8574
{
	func_130(uParam0, iParam1, sParam2, iParam6, iParam7, 0);
	Global_15793 = 0;
	Global_15752 = 1;
	Global_15759 = 0;
	Global_15754 = 0;
	Global_16736 = 0;
	Global_16738 = 0;
	Global_16742 = 0;
	Global_15750 = 0;
	Global_15797 = 0;
	Global_15799 = 0;
	if (iParam5 == 1)
	{
		Global_15757 = 1;
	}
	else
	{
		Global_15757 = 0;
	}
	Global_2621441 = 0;
	return func_121(sParam3, iParam4, iParam8);
}

bool func_121(char* sParam0, int iParam1, int iParam2)//Position - 0x85D3
{
	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_129();
					return false;
				}
			}
			else
			{
				return false;
			}
		}
		if (audio::is_scripted_conversation_ongoing())
		{
			return false;
		}
		if (func_128(8, -1))
		{
			return false;
		}
		Global_15821 = { Global_15815 };
		func_127();
		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_126();
				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_125())
				{
					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_69697)
				{
					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_124())
			{
				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_123();
			Global_15755 = iParam2;
		}
		Global_15747 = iParam1;
		StringCopy(&Global_15364, sParam0, 24);
		Global_14611 = 0;
		func_122();
		return true;
	}
	if (Global_15745 == 5)
	{
		return false;
	}
	if (iParam1 < Global_15747 || iParam1 == Global_15747)
	{
		return false;
	}
	if (iParam1 == 2)
	{
	}
	else
	{
		func_129();
	}
	return false;
}

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

void func_123()//Position - 0x88D0
{
	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_124()//Position - 0x8965
{
	if (Global_14443.f_1 == 1 || Global_14443.f_1 == 0)
	{
		return true;
	}
	return false;
}

bool func_125()//Position - 0x898C
{
	int iVar0;
	int iVar1;
	
	if (Global_69697)
	{
		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_126()//Position - 0x8A25
{
	if (func_22(14))
	{
		if (!entity::is_entity_dead(player::player_ped_id(), 0))
		{
			if (entity::get_entity_model(player::player_ped_id()) == Global_101652.f_26993[0 /*29*/])
			{
				Global_14443 = 0;
			}
			else if (entity::get_entity_model(player::player_ped_id()) == Global_101652.f_26993[1 /*29*/])
			{
				Global_14443 = 1;
			}
			else if (entity::get_entity_model(player::player_ped_id()) == Global_101652.f_26993[2 /*29*/])
			{
				Global_14443 = 2;
			}
			else
			{
				Global_14443 = 0;
			}
		}
	}
	else
	{
		Global_14443 = func_20();
		if (Global_14443 == 145)
		{
			Global_14443 = 3;
		}
		if (Global_69697)
		{
			Global_14443 = 3;
		}
		if (Global_14443 > 3)
		{
			Global_14443 = 3;
		}
	}
}

void func_127()//Position - 0x8AC7
{
	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_128(int iParam0, int iParam1)//Position - 0x8B1E
{
	switch (iParam0)
	{
		case 5:
			if (iParam1 > -1)
			{
				return Global_1352862.f_203[iParam1];
			}
			break;
	}
	return gameplay::is_bit_set(Global_1352862.f_1015, iParam0);
}

void func_129()//Position - 0x8B59
{
	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_130(var uParam0, int iParam1, char* sParam2, int iParam3, int iParam4, int iParam5)//Position - 0x8BB0
{
	Global_15199 = { *uParam0 };
	Global_1629 = iParam1;
	StringCopy(&Global_15815, sParam2, 24);
	Global_16734 = iParam5;
	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;
	}
}

int func_131(int iParam0)//Position - 0x8C06
{
	if (iParam0 == 94 || iParam0 == -1)
	{
		return 0;
	}
	return Global_101652.f_8028.f_330[iParam0 /*6*/];
}

int func_132(var uParam0, char* sParam1, char* sParam2, int iParam3, int iParam4, int iParam5, int iParam6)//Position - 0x8C32
{
	func_130(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 = 0;
	return func_121(sParam2, iParam3, 0);
}

void func_133(var uParam0, int iParam1, int iParam2, char* sParam3, int iParam4, int iParam5)//Position - 0x8C80
{
	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_69697)
	{
		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);
			}
		}
	}
}

void func_134(int iParam0, char* sParam1, int iParam2, int iParam3, int iParam4, int iParam5)//Position - 0x8D1B
{
	int iVar0;
	int iVar1;
	int iVar2;
	char[] cVar3[8];
	int iVar5;
	var uVar6;
	int iVar10;
	
	if (iParam3 == 1)
	{
		if (!gameplay::are_strings_equal("FinaleC2", script::get_this_script_name()))
		{
		}
	}
	iVar0 = 0;
	if (iParam3 == 1)
	{
		if (iParam0 != Global_91523)
		{
			iVar0 = 1;
		}
	}
	else if (iParam0 > Global_91523)
	{
		iVar0 = 1;
	}
	if (iVar0 == 1)
	{
		func_197(1);
		if (iParam0 <= Global_91523)
		{
		}
		iVar1 = func_195(script::get_this_script_name(), 1);
		if (iVar1 != -1 && iVar1 != 94)
		{
			Global_101652.f_8028.f_330[iVar1 /*6*/].f_1 = 0;
			iVar2 = func_193(iVar1);
			cVar3 = { Global_82607[iVar1 /*34*/].f_8 };
			if (iVar1 == 90)
			{
				switch (Global_101652.f_8028.f_99.f_205[7])
				{
					case 1:
						StringConCat(&cVar3, "A", 8);
						break;
					
					case 2:
						StringConCat(&cVar3, "B", 8);
						break;
					}
			}
			stats::playstats_mission_checkpoint(&cVar3, iVar2, Global_91523, iParam0);
		}
		else
		{
			iVar5 = func_188(script::get_this_script_name(), 1);
			if (iVar5 != -1)
			{
				Global_101652.f_17517[iVar5 /*6*/].f_4 = 0;
				MemCopy(&uVar6, {func_187(iVar5)}, 4);
				stats::playstats_mission_checkpoint(&uVar6, 0, Global_91523, iParam0);
			}
			else
			{
				iVar10 = func_186(&(Global_91486.f_3));
				if (iVar10 > -1)
				{
					Global_101652.f_23929.f_4[iVar10] = 0;
				}
			}
		}
		Global_85997 = iParam2;
		Global_91523 = iParam0;
		func_135(iParam0, sParam1, iParam4, iParam5);
		if (gameplay::are_strings_equal(sParam1, ""))
		{
		}
	}
	else if (iParam0 < Global_91523)
	{
	}
}

void func_135(int iParam0, var uParam1, int iParam2, int iParam3)//Position - 0x8E90
{
	func_136(&Global_95993, script::get_this_script_name(), iParam0, uParam1, iParam3, iParam2);
}

void func_136(var uParam0, char* sParam1, var uParam2, var uParam3, int iParam4, int iParam5)//Position - 0x8EAC
{
	int iVar0;
	int iVar1;
	
	*uParam0 = func_20();
	uParam0->f_1 = func_175();
	gameplay::_get_weather_type_transition(&(uParam0->f_6), &(uParam0->f_7), &(uParam0->f_8));
	if (!ped::is_ped_injured(player::player_ped_id()))
	{
		func_160(&(uParam0->f_2305), 0);
		func_159(player::player_ped_id());
		func_153(player::player_ped_id(), 0);
		weapon::get_current_ped_weapon(player::player_ped_id(), &(uParam0->f_2), 1);
		if (uParam0->f_2 == 0 || uParam0->f_2 == joaat("object"))
		{
			uParam0->f_2 = joaat("weapon_unarmed");
		}
	}
	iVar1 = 0;
	while (iVar1 < 3)
	{
		uParam0->f_17[iVar1] = Global_101652.f_2079.f_539.f_294[iVar1];
		if (iVar1 == func_152())
		{
			func_145(player::player_ped_id(), &(uParam0->f_616[iVar1 /*65*/]), 1);
		}
		else
		{
			iVar0 = 0;
			while (iVar0 < 12)
			{
				uParam0->f_616[iVar1 /*65*/][iVar0] = Global_91276[iVar1 /*65*/][iVar0];
				uParam0->f_616[iVar1 /*65*/].f_13[iVar0] = Global_91276[iVar1 /*65*/].f_13[iVar0];
				iVar0++;
			}
			uParam0->f_616[iVar1 /*65*/].f_59 = Global_91276[iVar1 /*65*/].f_59;
			uParam0->f_616[iVar1 /*65*/].f_60 = Global_91276[iVar1 /*65*/].f_60;
			uParam0->f_616[iVar1 /*65*/].f_61 = Global_91276[iVar1 /*65*/].f_61;
			uParam0->f_616[iVar1 /*65*/].f_62 = Global_91276[iVar1 /*65*/].f_62;
			uParam0->f_616[iVar1 /*65*/].f_63 = Global_91276[iVar1 /*65*/].f_63;
			uParam0->f_616[iVar1 /*65*/].f_64 = Global_91276[iVar1 /*65*/].f_64;
			iVar0 = 0;
			while (iVar0 < 9)
			{
				uParam0->f_616[iVar1 /*65*/].f_39[iVar0] = Global_91276[iVar1 /*65*/].f_39[iVar0];
				uParam0->f_616[iVar1 /*65*/].f_49[iVar0] = Global_91276[iVar1 /*65*/].f_49[iVar0];
				iVar0++;
			}
		}
		iVar0 = 0;
		while (iVar0 < 44)
		{
			uParam0->f_812[iVar1 /*284*/][iVar0 /*3*/] = { Global_101652.f_2079.f_539.f_298[iVar1 /*284*/][iVar0 /*3*/] };
			iVar0++;
		}
		iVar0 = 0;
		while (iVar0 < 50)
		{
			uParam0->f_812[iVar1 /*284*/].f_133[iVar0 /*3*/] = { Global_101652.f_2079.f_539.f_298[iVar1 /*284*/].f_133[iVar0 /*3*/] };
			iVar0++;
		}
		switch (iVar1)
		{
			case 0:
				stats::stat_get_int(joaat("sp0_weap_purch_0"), &(uParam0->f_1665[iVar1 /*32*/][0]), -1);
				stats::stat_get_int(joaat("sp0_weap_purch_1"), &(uParam0->f_1665[iVar1 /*32*/][1]), -1);
				stats::stat_get_int(joaat("sp0_weap_addon_purch_0"), &(uParam0->f_1665[iVar1 /*32*/].f_5[0]), -1);
				stats::stat_get_int(joaat("sp0_weap_addon_purch_1"), &(uParam0->f_1665[iVar1 /*32*/].f_5[1]), -1);
				stats::stat_get_int(joaat("sp0_weap_addon_purch_2"), &(uParam0->f_1665[iVar1 /*32*/].f_5[2]), -1);
				stats::stat_get_int(joaat("sp0_weap_addon_purch_3"), &(uParam0->f_1665[iVar1 /*32*/].f_5[3]), -1);
				stats::stat_get_int(joaat("sp0_weap_addon_purch_4"), &(uParam0->f_1665[iVar1 /*32*/].f_5[4]), -1);
				stats::stat_get_int(joaat("sp0_weap_tint_purch_0"), &(uParam0->f_1665[iVar1 /*32*/].f_16[0]), -1);
				stats::stat_get_int(joaat("sp0_weap_tint_purch_1"), &(uParam0->f_1665[iVar1 /*32*/].f_16[1]), -1);
				stats::stat_get_int(joaat("sp0_weap_tint_purch_2"), &(uParam0->f_1665[iVar1 /*32*/].f_16[2]), -1);
				stats::stat_get_int(joaat("sp0_weap_tint_purch_3"), &(uParam0->f_1665[iVar1 /*32*/].f_16[3]), -1);
				stats::stat_get_int(joaat("sp0_weap_tint_purch_4"), &(uParam0->f_1665[iVar1 /*32*/].f_16[4]), -1);
				stats::stat_get_int(joaat("sp0_weap_tint_purch_5"), &(uParam0->f_1665[iVar1 /*32*/].f_16[5]), -1);
				stats::stat_get_int(joaat("sp0_weap_tint_purch_6"), &(uParam0->f_1665[iVar1 /*32*/].f_16[6]), -1);
				stats::stat_get_int(joaat("sp0_weap_tint_purch_7"), &(uParam0->f_1665[iVar1 /*32*/].f_16[7]), -1);
				stats::stat_get_int(joaat("sp0_weap_tint_purch_8"), &(uParam0->f_1665[iVar1 /*32*/].f_16[8]), -1);
				stats::stat_get_int(joaat("sp0_weap_tint_purch_9"), &(uParam0->f_1665[iVar1 /*32*/].f_16[9]), -1);
				stats::stat_get_int(joaat("sp0_weap_tint_purch_10"), &(uParam0->f_1665[iVar1 /*32*/].f_16[10]), -1);
				stats::stat_get_int(joaat("sp0_weap_tint_purch_11"), &(uParam0->f_1665[iVar1 /*32*/].f_16[11]), -1);
				break;
			
			case 1:
				stats::stat_get_int(joaat("sp1_weap_purch_0"), &(uParam0->f_1665[iVar1 /*32*/][0]), -1);
				stats::stat_get_int(joaat("sp1_weap_purch_1"), &(uParam0->f_1665[iVar1 /*32*/][1]), -1);
				stats::stat_get_int(joaat("sp1_weap_addon_purch_0"), &(uParam0->f_1665[iVar1 /*32*/].f_5[0]), -1);
				stats::stat_get_int(joaat("sp1_weap_addon_purch_1"), &(uParam0->f_1665[iVar1 /*32*/].f_5[1]), -1);
				stats::stat_get_int(joaat("sp1_weap_addon_purch_2"), &(uParam0->f_1665[iVar1 /*32*/].f_5[2]), -1);
				stats::stat_get_int(joaat("sp1_weap_addon_purch_3"), &(uParam0->f_1665[iVar1 /*32*/].f_5[3]), -1);
				stats::stat_get_int(joaat("sp1_weap_addon_purch_4"), &(uParam0->f_1665[iVar1 /*32*/].f_5[4]), -1);
				stats::stat_get_int(joaat("sp1_weap_tint_purch_0"), &(uParam0->f_1665[iVar1 /*32*/].f_16[0]), -1);
				stats::stat_get_int(joaat("sp1_weap_tint_purch_1"), &(uParam0->f_1665[iVar1 /*32*/].f_16[1]), -1);
				stats::stat_get_int(joaat("sp1_weap_tint_purch_2"), &(uParam0->f_1665[iVar1 /*32*/].f_16[2]), -1);
				stats::stat_get_int(joaat("sp1_weap_tint_purch_3"), &(uParam0->f_1665[iVar1 /*32*/].f_16[3]), -1);
				stats::stat_get_int(joaat("sp1_weap_tint_purch_4"), &(uParam0->f_1665[iVar1 /*32*/].f_16[4]), -1);
				stats::stat_get_int(joaat("sp1_weap_tint_purch_5"), &(uParam0->f_1665[iVar1 /*32*/].f_16[5]), -1);
				stats::stat_get_int(joaat("sp1_weap_tint_purch_6"), &(uParam0->f_1665[iVar1 /*32*/].f_16[6]), -1);
				stats::stat_get_int(joaat("sp1_weap_tint_purch_7"), &(uParam0->f_1665[iVar1 /*32*/].f_16[7]), -1);
				stats::stat_get_int(joaat("sp1_weap_tint_purch_8"), &(uParam0->f_1665[iVar1 /*32*/].f_16[8]), -1);
				stats::stat_get_int(joaat("sp1_weap_tint_purch_9"), &(uParam0->f_1665[iVar1 /*32*/].f_16[9]), -1);
				stats::stat_get_int(joaat("sp1_weap_tint_purch_10"), &(uParam0->f_1665[iVar1 /*32*/].f_16[10]), -1);
				stats::stat_get_int(joaat("sp1_weap_tint_purch_11"), &(uParam0->f_1665[iVar1 /*32*/].f_16[11]), -1);
				break;
			
			case 2:
				stats::stat_get_int(joaat("sp2_weap_purch_0"), &(uParam0->f_1665[iVar1 /*32*/][0]), -1);
				stats::stat_get_int(joaat("sp2_weap_purch_1"), &(uParam0->f_1665[iVar1 /*32*/][1]), -1);
				stats::stat_get_int(joaat("sp2_weap_addon_purch_0"), &(uParam0->f_1665[iVar1 /*32*/].f_5[0]), -1);
				stats::stat_get_int(joaat("sp2_weap_addon_purch_1"), &(uParam0->f_1665[iVar1 /*32*/].f_5[1]), -1);
				stats::stat_get_int(joaat("sp2_weap_addon_purch_2"), &(uParam0->f_1665[iVar1 /*32*/].f_5[2]), -1);
				stats::stat_get_int(joaat("sp2_weap_addon_purch_3"), &(uParam0->f_1665[iVar1 /*32*/].f_5[3]), -1);
				stats::stat_get_int(joaat("sp2_weap_addon_purch_4"), &(uParam0->f_1665[iVar1 /*32*/].f_5[4]), -1);
				stats::stat_get_int(joaat("sp2_weap_tint_purch_0"), &(uParam0->f_1665[iVar1 /*32*/].f_16[0]), -1);
				stats::stat_get_int(joaat("sp2_weap_tint_purch_1"), &(uParam0->f_1665[iVar1 /*32*/].f_16[1]), -1);
				stats::stat_get_int(joaat("sp2_weap_tint_purch_2"), &(uParam0->f_1665[iVar1 /*32*/].f_16[2]), -1);
				stats::stat_get_int(joaat("sp2_weap_tint_purch_3"), &(uParam0->f_1665[iVar1 /*32*/].f_16[3]), -1);
				stats::stat_get_int(joaat("sp2_weap_tint_purch_4"), &(uParam0->f_1665[iVar1 /*32*/].f_16[4]), -1);
				stats::stat_get_int(joaat("sp2_weap_tint_purch_5"), &(uParam0->f_1665[iVar1 /*32*/].f_16[5]), -1);
				stats::stat_get_int(joaat("sp2_weap_tint_purch_6"), &(uParam0->f_1665[iVar1 /*32*/].f_16[6]), -1);
				stats::stat_get_int(joaat("sp2_weap_tint_purch_7"), &(uParam0->f_1665[iVar1 /*32*/].f_16[7]), -1);
				stats::stat_get_int(joaat("sp2_weap_tint_purch_8"), &(uParam0->f_1665[iVar1 /*32*/].f_16[8]), -1);
				stats::stat_get_int(joaat("sp2_weap_tint_purch_9"), &(uParam0->f_1665[iVar1 /*32*/].f_16[9]), -1);
				stats::stat_get_int(joaat("sp2_weap_tint_purch_10"), &(uParam0->f_1665[iVar1 /*32*/].f_16[10]), -1);
				stats::stat_get_int(joaat("sp2_weap_tint_purch_11"), &(uParam0->f_1665[iVar1 /*32*/].f_16[11]), -1);
				break;
		}
		uParam0->f_9[iVar1] = Global_101652.f_19507.f_233[iVar1 /*69*/].f_1;
		uParam0->f_13[iVar1] = Global_52992[iVar1];
		uParam0->f_25[0 /*295*/][iVar1 /*98*/] = { Global_101652.f_2079.f_539.f_1635[0 /*295*/][iVar1 /*98*/] };
		uParam0->f_25[1 /*295*/][iVar1 /*98*/] = { Global_101652.f_2079.f_539.f_1635[1 /*295*/][iVar1 /*98*/] };
		iVar0 = 0;
		while (iVar0 <= 3)
		{
			uParam0->f_2259[iVar1 /*15*/][iVar0] = Global_101652.f_2079.f_493[iVar1 /*15*/][iVar0];
			uParam0->f_2259[iVar1 /*15*/].f_5[iVar0] = Global_101652.f_2079.f_493[iVar1 /*15*/].f_5[iVar0];
			uParam0->f_2259[iVar1 /*15*/].f_10[iVar0] = Global_101652.f_2079.f_493[iVar1 /*15*/].f_10[iVar0];
			iVar0++;
		}
		iVar0 = 0;
		while (iVar0 <= 2)
		{
			uParam0->f_1766[iVar1 /*164*/][iVar0] = Global_101652.f_2079[iVar1 /*164*/][iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_4[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_4[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_8[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_8[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_12[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_12[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_16[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_16[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_20[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_20[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_24[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_24[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_28[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_28[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_32[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_32[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_36[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_36[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_40[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_40[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_44[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_44[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_48[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_48[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_52[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_52[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_56[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_56[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_60[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_60[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_64[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_64[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_68[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_68[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_72[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_72[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_76[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_76[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_80[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_80[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_84[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_84[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_88[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_88[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_92[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_92[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_96[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_96[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_100[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_100[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_104[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_104[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_108[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_108[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_112[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_112[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_116[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_116[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_120[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_120[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_124[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_124[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_128[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_128[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_132[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_132[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_136[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_136[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_140[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_140[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_144[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_144[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_148[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_148[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_152[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_152[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_156[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_156[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_160[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_160[iVar0];
			iVar0++;
		}
		iVar1++;
	}
	stats::stat_get_int(joaat("sp0_special_ability"), &(uParam0->f_1762[0]), -1);
	stats::stat_get_int(joaat("sp1_special_ability"), &(uParam0->f_1762[1]), -1);
	stats::stat_get_int(joaat("sp2_special_ability"), &(uParam0->f_1762[2]), -1);
	uParam0->f_5 = 145;
	if (iParam4 == 1)
	{
		func_138(&(uParam0->f_2311), uParam0, iParam5, 1, 1, 0);
	}
	func_137(&(uParam0->f_2401));
	uParam3 = uParam3;
	uParam2 = uParam2;
}

bool func_137(var uParam0)//Position - 0x9D34
{
	*uParam0 = Global_87668;
	uParam0->f_1 = Global_87669;
	uParam0->f_2 = 0;
	uParam0->f_3 = 0;
	return true;
}

void func_138(var uParam0, var uParam1, int iParam2, int iParam3, int iParam4, int iParam5)//Position - 0x9D56
{
	int iVar0;
	
	if (iParam2 == 0)
	{
		iParam2 = player::player_ped_id();
	}
	if (entity::does_entity_exist(iParam2))
	{
		uParam1->f_5 = func_24(iParam2);
	}
	if (func_144(iParam2, &iVar0, iParam3, iParam5))
	{
		func_139(uParam0, uParam1, iVar0, iParam4);
	}
	else if (entity::does_entity_exist(iVar0))
	{
		if (!entity::is_entity_dead(iVar0, 0))
		{
			if (vehicle::is_vehicle_model(iVar0, joaat("skylift")) && ped::is_ped_in_vehicle(player::player_ped_id(), iVar0, 0))
			{
				func_139(uParam0, uParam1, iVar0, iParam4);
			}
		}
	}
}

bool func_139(var uParam0, var uParam1, int iParam2, int iParam3)//Position - 0x9DDE
{
	if (vehicle::is_vehicle_driveable(iParam2, 0))
	{
		func_141(uParam0, iParam2, iParam3);
		uParam1->f_4 = iParam2;
		if (func_140(iParam2))
		{
			uParam1->f_3 = 1;
		}
		else
		{
			uParam1->f_3 = 0;
		}
		return true;
	}
	return false;
}

bool func_140(int iParam0)//Position - 0x9E1E
{
	int iVar0;
	
	iVar0 = 0;
	while (iVar0 <= 6)
	{
		if (Global_91486.f_22[iVar0] == iParam0)
		{
			return true;
		}
		iVar0++;
	}
	return false;
}

void func_141(var uParam0, int iParam1, int iParam2)//Position - 0x9E4C
{
	func_40(iParam1, &(uParam0->f_12));
	uParam0->f_7 = func_143(iParam1, 145, 0);
	uParam0->f_11 = func_59(iParam1);
	if (!uParam0->f_7)
	{
		if (!uParam0->f_10)
		{
			uParam0->f_10 = func_142(iParam1);
		}
	}
	if (iParam2 == 1)
	{
		*uParam0 = { entity::get_entity_coords(iParam1, 1) };
		uParam0->f_6 = entity::get_entity_heading(iParam1);
		uParam0->f_3 = { entity::get_entity_velocity(iParam1) };
		if (entity::is_entity_in_angled_area(iParam1, -1154.326f, -1523.871f, 3.262189f, -1158.453f, -1517.75f, 6.374244f, 13f, 0, true, 0))
		{
			*uParam0 = { -1160.095f, -1515.407f, 3.1496f };
			uParam0->f_6 = 305.6424f;
		}
		if (Global_69431 == iParam1)
		{
			uParam0->f_9 = 1;
		}
	}
	if (ped::is_ped_in_any_vehicle(player::player_ped_id(), 0))
	{
		uParam0->f_8 = 1;
	}
	else
	{
		uParam0->f_8 = 0;
	}
}

bool func_142(int iParam0)//Position - 0x9F28
{
	int iVar0;
	
	iVar0 = 0;
	while (iVar0 < 68)
	{
		if (entity::does_entity_exist(Global_68526.f_484[iVar0]))
		{
			if (iParam0 == Global_68526.f_484[iVar0])
			{
				return true;
			}
		}
		iVar0++;
	}
	return false;
}

bool func_143(int iParam0, int iParam1, int iParam2)//Position - 0x9F6A
{
	int iVar0;
	
	if (!entity::does_entity_exist(iParam0))
	{
		return false;
	}
	if (!vehicle::is_vehicle_driveable(iParam0, 0))
	{
		return false;
	}
	iVar0 = 0;
	while (iVar0 < 9)
	{
		if (entity::does_entity_exist(Global_89150[iVar0]))
		{
			if (Global_89150[iVar0] == iParam0)
			{
				if (iParam1 == 145 || iParam1 == Global_89160[iVar0])
				{
					if (iParam2 == 0 || entity::get_entity_model(iParam0) == func_70(iParam1, iParam2))
					{
						return true;
					}
				}
			}
		}
		iVar0++;
	}
	return false;
}

bool func_144(int iParam0, var uParam1, int iParam2, int iParam3)//Position - 0x9FF8
{
	char* sVar0;
	
	if (entity::does_entity_exist(iParam0))
	{
		if (!ped::is_ped_injured(iParam0))
		{
			if (iParam0 == player::player_ped_id())
			{
				*uParam1 = player::get_players_last_vehicle();
			}
			else
			{
				*uParam1 = ped::get_vehicle_ped_is_in(iParam0, 1);
			}
			if (entity::does_entity_exist(*uParam1))
			{
				if (vehicle::is_vehicle_driveable(*uParam1, 0))
				{
					if (iParam2 == 0 || gameplay::get_distance_between_coords(entity::get_entity_coords(*uParam1, 1), entity::get_entity_coords(iParam0, 1), 1) < 100f)
					{
						if (vehicle::is_vehicle_model(*uParam1, joaat("taxi")))
						{
							if (vehicle::get_ped_in_vehicle_seat(*uParam1, -1, 0) != iParam0 && vehicle::get_ped_in_vehicle_seat(*uParam1, -1, 0) != 0)
							{
								return false;
							}
						}
						if (func_60(*uParam1, func_20(), 1))
						{
							sVar0 = script::get_this_script_name();
							if (!gameplay::are_strings_equal(sVar0, "save_anywhere"))
							{
								return false;
							}
							else if (!ped::is_ped_in_any_vehicle(iParam0, 1))
							{
								return false;
							}
						}
						if (iParam3 == 1)
						{
							if (decorator::decor_exist_on(*uParam1, "IgnoredByQuickSave"))
							{
								if (decorator::decor_get_bool(*uParam1, "IgnoredByQuickSave"))
								{
									return false;
								}
							}
						}
						else if (vehicle::is_vehicle_model(*uParam1, joaat("blimp")))
						{
							return false;
						}
						return true;
					}
				}
			}
		}
	}
	return false;
}

void func_145(int iParam0, var uParam1, int iParam2)//Position - 0xA125
{
	int iVar0;
	int iVar1;
	
	if (!ped::is_ped_injured(iParam0))
	{
		iVar0 = func_24(iParam0);
		iVar1 = 0;
		while (iVar1 < 12)
		{
			func_151(iParam0, iVar1, &(uParam1->f_13[iVar1]), uParam1[iVar1], &(uParam1->f_26[iVar1]), iParam2, 145);
			iVar1++;
		}
		iVar1 = 0;
		while (iVar1 < 9)
		{
			func_150(iParam0, iVar1, &(uParam1->f_39[iVar1]), &(uParam1->f_49[iVar1]), iParam2, 145);
			iVar1++;
		}
		if (func_23(iVar0))
		{
			uParam1->f_59 = Global_101652.f_2079.f_539[iVar0 /*65*/].f_59;
			uParam1->f_60 = Global_101652.f_2079.f_539[iVar0 /*65*/].f_60;
			uParam1->f_61 = Global_101652.f_2079.f_539[iVar0 /*65*/].f_61;
			uParam1->f_62 = Global_101652.f_2079.f_539[iVar0 /*65*/].f_62;
			uParam1->f_63 = Global_101652.f_2079.f_539[iVar0 /*65*/].f_63;
			uParam1->f_64 = Global_101652.f_2079.f_539[iVar0 /*65*/].f_64;
		}
		else if (network::network_is_game_in_progress() && entity::get_entity_model(iParam0) == entity::get_entity_model(player::player_ped_id()))
		{
			if (func_149(161, -1))
			{
				uParam1->f_59 = func_146(2045, Global_69516, 0);
			}
			else
			{
				uParam1->f_59 = func_146(747, Global_69516, 0);
			}
			uParam1->f_60 = func_146(748, Global_69516, 0);
			uParam1->f_61 = func_146(749, Global_69516, 0);
		}
		if (network::network_is_game_in_progress() && iParam0 == player::player_ped_id())
		{
			if (func_149(161, -1))
			{
				uParam1->f_59 = func_146(2045, Global_69516, 0);
			}
			else
			{
				uParam1->f_59 = func_146(747, Global_69516, 0);
			}
		}
	}
}

int func_146(int iParam0, int iParam1, int iParam2)//Position - 0xA2CF
{
	int iVar0;
	var uVar1;
	
	if (iParam2 == 0)
	{
	}
	iVar0 = Global_2503773[iParam0 /*3*/][func_147(iParam1)];
	if (stats::stat_get_int(iVar0, &uVar1, -1))
	{
		return uVar1;
	}
	return 0;
}

int func_147(var uParam0)//Position - 0xA301
{
	int iVar0;
	int iVar1;
	
	iVar0 = uParam0;
	if (iVar0 == -1)
	{
		iVar1 = func_148();
		if (iVar1 > -1)
		{
			Global_2503486 = 0;
			iVar0 = iVar1;
		}
		else
		{
			iVar0 = 0;
			Global_2503486 = 1;
		}
	}
	return iVar0;
}

var func_148()//Position - 0xA335
{
	return Global_1312731;
}

int func_149(int iParam0, int iParam1)//Position - 0xA341
{
	int iVar0;
	var uVar1;
	
	iVar0 = Global_2522528[iParam0 /*3*/][func_147(iParam1)];
	if (stats::stat_get_bool(iVar0, &uVar1, -1))
	{
		return uVar1;
	}
	return 0;
}

void func_150(int iParam0, int iParam1, var uParam2, var uParam3, int iParam4, int iParam5)//Position - 0xA36D
{
	int iVar0;
	
	iVar0 = func_24(iParam0);
	if (iParam0 != 0)
	{
		*uParam2 = ped::get_ped_prop_index(iParam0, iParam1);
		*uParam3 = ped::get_ped_prop_texture_index(iParam0, iParam1);
	}
	else
	{
		iVar0 = iParam5;
	}
	if (iParam4 == 0)
	{
		return;
	}
	if (iParam1 == 0)
	{
		if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 8 != 0)
		{
			if (iParam0 != 0)
			{
				if (ped::is_ped_wearing_helmet(iParam0) && ped::_0x451294E859ECC018(iParam0) != -1)
				{
					*uParam2 = ped::_0x451294E859ECC018(iParam0);
					*uParam3 = ped::_0x9D728C1E12BF5518(iParam0);
				}
			}
		}
	}
	switch (iVar0)
	{
		case 0:
			if (iParam1 == 0)
			{
				if (*uParam2 == 7)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 8 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if (*uParam2 == 11)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 8 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if (*uParam2 == 21)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 16 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if (*uParam2 == 23)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 8 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if (*uParam2 == 27)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 8 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if (*uParam2 == 28)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 8 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if (*uParam2 >= 14 && *uParam2 <= 20)
				{
					if (iParam4 & 2 != 0 || iParam4 & 4 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
			}
			else if (iParam1 == 1)
			{
				if (*uParam2 == 1)
				{
					if (iParam4 & 2 != 0 || iParam4 & 64 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
			}
			break;
		
		case 1:
			if (iParam1 == 0)
			{
				if (*uParam2 == 2)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 8 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if (*uParam2 == 4)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 16 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if (*uParam2 == 6)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 8 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if (*uParam2 == 17)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 8 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if (*uParam2 == 20)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 8 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if (*uParam2 == 21)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 8 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if (*uParam2 >= 8 && *uParam2 <= 14)
				{
					if (iParam4 & 2 != 0 || iParam4 & 4 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
			}
			break;
		
		case 2:
			if (iParam1 == 0)
			{
				if (*uParam2 == 9)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 8 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if (*uParam2 == 11)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 8 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if (*uParam2 == 12)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 8 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if (*uParam2 == 21)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 8 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if (*uParam2 == 23)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 8 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if (*uParam2 == 27)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 8 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if ((*uParam2 >= 14 && *uParam2 <= 20) || *uParam2 == 2)
				{
					if (iParam4 & 2 != 0 || iParam4 & 4 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
			}
			break;
	}
}

void func_151(int iParam0, int iParam1, var uParam2, var uParam3, var uParam4, int iParam5, int iParam6)//Position - 0xA8B5
{
	int iVar0;
	
	iVar0 = func_24(iParam0);
	if (iParam0 != 0)
	{
		*uParam2 = ped::get_ped_drawable_variation(iParam0, iParam1);
		*uParam3 = ped::get_ped_texture_variation(iParam0, iParam1);
		*uParam4 = ped::get_ped_palette_variation(iParam0, iParam1);
	}
	else
	{
		iVar0 = iParam6;
	}
	if (iParam5 == 0)
	{
		return;
	}
	switch (iVar0)
	{
		case 0:
			if (iParam1 == 8)
			{
				if ((iParam5 & 1 != 0 || iParam5 & 2 != 0) || iParam5 & 32 != 0)
				{
					if (*uParam2 == 15)
					{
						*uParam2 = 0;
						*uParam3 = 0;
					}
				}
				if (iParam5 & 2 != 0 || iParam5 & 64 != 0)
				{
					if (*uParam2 == 3 || *uParam2 == 22)
					{
						*uParam2 = 0;
						*uParam3 = 0;
					}
				}
			}
			else if (iParam1 == 9)
			{
				if ((iParam5 & 1 != 0 || iParam5 & 2 != 0) || iParam5 & 32 != 0)
				{
					if (*uParam2 == 5)
					{
						*uParam2 = 0;
						*uParam3 = 0;
					}
				}
				if (iParam5 & 2 != 0 || iParam5 & 4 != 0)
				{
					if (*uParam2 == 8)
					{
						*uParam2 = 0;
						*uParam3 = 0;
					}
				}
			}
			break;
		
		case 1:
			if (iParam1 == 8)
			{
				if ((iParam5 & 1 != 0 || iParam5 & 2 != 0) || iParam5 & 32 != 0)
				{
					if (*uParam2 == 1 || *uParam2 == 10)
					{
						*uParam2 = 14;
						*uParam3 = 0;
					}
				}
				if (iParam5 & 2 != 0 || iParam5 & 64 != 0)
				{
					if (*uParam2 == 19)
					{
						*uParam2 = 14;
						*uParam3 = 0;
					}
				}
			}
			else if (iParam1 == 9)
			{
				if (iParam5 & 2 != 0 || iParam5 & 4 != 0)
				{
					if (*uParam2 == 5)
					{
						*uParam2 = 0;
						*uParam3 = 0;
					}
				}
			}
			break;
		
		case 2:
			if (iParam1 == 8)
			{
				if ((iParam5 & 1 != 0 || iParam5 & 2 != 0) || iParam5 & 32 != 0)
				{
					if (*uParam2 == 3)
					{
						*uParam2 = 14;
						*uParam3 = 0;
					}
				}
			}
			else if (iParam1 == 9)
			{
				if (*uParam2 >= 5 && *uParam2 <= 7)
				{
					if (iParam5 & 2 != 0 || iParam5 & 4 != 0)
					{
						*uParam2 = 0;
						*uParam3 = 0;
					}
				}
			}
			break;
	}
}

var func_152()//Position - 0xAAF6
{
	func_21();
	return Global_101652.f_2079.f_539.f_3549;
}

void func_153(int iParam0, int iParam1)//Position - 0xAB0F
{
	int iVar0;
	int iVar1;
	int iVar2;
	int iVar3;
	
	iVar0 = func_24(iParam0);
	if (func_23(iVar0) && !ped::is_ped_injured(iParam0))
	{
		if (iParam0 == player::player_ped_id())
		{
			func_154(iParam0, &(Global_101652.f_2079.f_539.f_298[iVar0 /*284*/]));
			iVar2 = 0;
			while (iVar2 <= (8 - 1))
			{
				Global_101652.f_2079.f_539.f_1151[iVar2 /*4*/][iVar0] = ui::_0xA13E93403F26C812(iVar2);
				if (iParam1)
				{
					iVar1 = ui::_0xA48931185F0536FE();
					if (Global_101652.f_2079.f_539.f_1151[iVar2 /*4*/][iVar0] == iVar1)
					{
						Global_101652.f_2079.f_539.f_1184 = iVar2;
					}
				}
				iVar2++;
			}
			player::get_player_parachute_pack_tint_index(player::player_id(), &iVar3);
			if (iVar0 == 0)
			{
				stats::stat_set_int(joaat("sp0_parachute_current_tint"), iVar3, 1);
			}
			else if (iVar0 == 1)
			{
				stats::stat_set_int(joaat("sp1_parachute_current_tint"), iVar3, 1);
			}
			else if (iVar0 == 2)
			{
				stats::stat_set_int(joaat("sp2_parachute_current_tint"), iVar3, 1);
			}
		}
	}
}

void func_154(int iParam0, var uParam1)//Position - 0xAC02
{
	int iVar0;
	int iVar1;
	int iVar2;
	int iVar3;
	vector3 vVar4;
	int iVar7;
	int iVar8;
	struct<2> Var9;
	struct<4> Var48;
	int iVar70;
	
	if (!ped::is_ped_injured(iParam0))
	{
		iVar0 = 0;
		while (iVar0 <= (44 - 1))
		{
			(uParam1[iVar0 /*3*/])->f_1 = 0;
			iVar0++;
		}
		iVar0 = 0;
		while (iVar0 <= (44 - 1))
		{
			iVar3 = func_158(iVar0);
			if (iVar3 != 0)
			{
				vVar4.x = weapon::get_ped_weapontype_in_slot(iParam0, func_158(iVar0));
				vVar4.y = 0;
				vVar4.z = 0;
				if (vVar4.x != 0 && vVar4.x != joaat("weapon_unarmed"))
				{
					vVar4.y = weapon::get_ammo_in_ped_weapon(iParam0, vVar4.x);
					if (vVar4.x == joaat("gadget_parachute"))
					{
						vVar4.y = 1;
					}
					gameplay::set_bit(&(vVar4.f_2), (20 + weapon::get_ped_weapon_tint_index(iParam0, vVar4.x)));
					if (vVar4.y == -1)
					{
						if (!weapon::get_max_ammo(iParam0, vVar4.x, &(vVar4.f_1)))
						{
							vVar4.y = 0;
						}
					}
					(uParam1[iVar0 /*3*/])->f_1 = vVar4.y;
					iVar1 = 0;
					iVar2 = func_156(vVar4.x, iVar1);
					while (iVar2 != 0)
					{
						if (weapon::has_ped_got_weapon_component(iParam0, vVar4.x, iVar2))
						{
							gameplay::set_bit(&(vVar4.f_2), iVar1);
						}
						iVar1++;
						iVar2 = func_156(vVar4.x, iVar1);
					}
				}
				*(uParam1[iVar0 /*3*/]) = { vVar4 };
			}
			iVar0++;
		}
		iVar0 = 0;
		while (iVar0 <= (50 - 1))
		{
			uParam1->f_133[iVar0 /*3*/].f_1 = 0;
			iVar0++;
		}
		iVar8 = dlc1::get_num_dlc_weapons();
		iVar7 = 0;
		while (iVar7 < iVar8)
		{
			if ((dlc1::get_dlc_weapon_data(iVar7, &Var9) && !func_155(Var9.f_1)) && iVar70 < 50)
			{
				if (!dlc1::_is_dlc_data_empty(Var9))
				{
					vVar4.x = Var9.f_1;
					vVar4.y = 0;
					vVar4.z = 0;
					vVar4.y = weapon::get_ammo_in_ped_weapon(iParam0, vVar4.x);
					if (weapon::has_ped_got_weapon(iParam0, vVar4.x, 0))
					{
						gameplay::set_bit(&(vVar4.f_2), (20 + weapon::get_ped_weapon_tint_index(iParam0, vVar4.x)));
					}
					else
					{
						gameplay::set_bit(&(vVar4.f_2), 20);
					}
					if (vVar4.y == -1)
					{
						if (!weapon::get_max_ammo(iParam0, vVar4.x, &(vVar4.f_1)))
						{
							vVar4.y = 0;
						}
					}
					uParam1->f_133[iVar70 /*3*/].f_1 = vVar4.y;
					iVar1 = 0;
					while (iVar1 < dlc1::get_num_dlc_weapon_components(iVar7))
					{
						if (dlc1::get_dlc_weapon_component_data(iVar7, iVar1, &Var48))
						{
							if (weapon::has_ped_got_weapon_component(iParam0, vVar4.x, Var48.f_3))
							{
								gameplay::set_bit(&(vVar4.f_2), iVar1);
							}
						}
						iVar1++;
					}
				}
				if (vVar4.x != 0)
				{
					if (!weapon::has_ped_got_weapon(iParam0, vVar4.x, 0))
					{
						vVar4.x = 0;
						vVar4.y = 0;
					}
				}
				uParam1->f_133[iVar70 /*3*/] = { vVar4 };
				iVar70++;
			}
			iVar7++;
		}
	}
}

bool func_155(int iParam0)//Position - 0xAE66
{
	if (network::network_is_game_in_progress())
	{
	}
	else
	{
		switch (iParam0)
		{
			case joaat("weapon_pistol50"):
			case joaat("weapon_bullpupshotgun"):
			case joaat("weapon_assaultsmg"):
				return false;
				break;
			
			case joaat("weapon_bottle"):
			case joaat("weapon_snspistol"):
			case joaat("weapon_gusenberg"):
				return false;
				break;
			
			case joaat("weapon_heavypistol"):
			case joaat("weapon_specialcarbine"):
				return false;
				break;
			
			case joaat("weapon_bullpuprifle"):
				return false;
				break;
			
			case joaat("weapon_dagger"):
			case joaat("weapon_vintagepistol"):
				return false;
				break;
			
			case joaat("weapon_firework"):
			case joaat("weapon_musket"):
				return false;
				break;
			
			case joaat("weapon_heavyshotgun"):
			case joaat("weapon_marksmanrifle"):
				return false;
				break;
			
			case joaat("weapon_hominglauncher"):
			case joaat("weapon_proxmine"):
				return false;
				break;
			
			case joaat("weapon_combatpdw"):
			case joaat("weapon_knuckle"):
			case joaat("weapon_marksmanpistol"):
				return false;
				break;
			
			case -947031628:
			case -572349828:
			case 392730790:
			case -1523701417:
			case -2112826155:
			case -664359727:
			case -1887867191:
			case -837150131:
			case -344484024:
			case joaat("weapon_flaregun"):
			case joaat("weapon_handcuffs"):
			case joaat("weapon_snowball"):
			case joaat("weapon_garbagebag"):
			case joaat("weapon_flashlight"):
			case joaat("weapon_switchblade"):
			case joaat("weapon_revolver"):
			case joaat("weapon_dbshotgun"):
			case joaat("weapon_compactrifle"):
			case 317205821:
			case -1121678507:
			case 125959754:
			case -853065399:
			case -1169823560:
			case -1810795771:
			case 419712736:
				return true;
				break;
			}
	}
	return false;
}

int func_156(int iParam0, int iParam1)//Position - 0xAFD4
{
	int iVar0;
	int iVar1;
	var uVar2;
	struct<4> Var41;
	
	iVar0 = 0;
	switch (iParam0)
	{
		case joaat("weapon_pistol"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_pistol_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_pistol_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_at_pi_flsh");
					break;
				
				case 3:
					iVar0 = joaat("component_at_pi_supp_02");
					break;
				
				case 4:
					iVar0 = joaat("component_pistol_varmod_luxe");
					break;
			}
			break;
		
		case joaat("weapon_combatpistol"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_combatpistol_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_combatpistol_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_at_pi_flsh");
					break;
				
				case 3:
					iVar0 = joaat("component_at_pi_supp");
					break;
				
				case 4:
					iVar0 = joaat("component_combatpistol_varmod_lowrider");
					break;
			}
			break;
		
		case joaat("weapon_appistol"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_appistol_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_appistol_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_at_pi_flsh");
					break;
				
				case 3:
					iVar0 = joaat("component_at_pi_supp");
					break;
				
				case 4:
					iVar0 = joaat("component_appistol_varmod_luxe");
					break;
			}
			break;
		
		case joaat("weapon_microsmg"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_microsmg_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_microsmg_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_at_pi_flsh");
					break;
				
				case 3:
					iVar0 = joaat("component_at_scope_macro");
					break;
				
				case 4:
					iVar0 = joaat("component_at_ar_supp_02");
					break;
				
				case 5:
					iVar0 = joaat("component_microsmg_varmod_luxe");
					break;
			}
			break;
		
		case joaat("weapon_smg"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_smg_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_smg_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_smg_clip_03");
					break;
				
				case 3:
					iVar0 = joaat("component_at_ar_flsh");
					break;
				
				case 4:
					iVar0 = joaat("component_at_pi_supp");
					break;
				
				case 5:
					iVar0 = joaat("component_at_scope_macro_02");
					break;
				
				case 6:
					iVar0 = joaat("component_at_ar_afgrip");
					break;
				
				case 7:
					iVar0 = joaat("component_smg_varmod_luxe");
					break;
			}
			break;
		
		case joaat("weapon_assaultrifle"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_assaultrifle_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_assaultrifle_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_assaultrifle_clip_03");
					break;
				
				case 3:
					iVar0 = joaat("component_at_ar_afgrip");
					break;
				
				case 4:
					iVar0 = joaat("component_at_ar_flsh");
					break;
				
				case 5:
					iVar0 = joaat("component_at_scope_macro");
					break;
				
				case 6:
					iVar0 = joaat("component_at_ar_supp_02");
					break;
				
				case 7:
					iVar0 = joaat("component_assaultrifle_varmod_luxe");
					break;
			}
			break;
		
		case joaat("weapon_carbinerifle"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_carbinerifle_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_carbinerifle_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_carbinerifle_clip_03");
					break;
				
				case 3:
					iVar0 = joaat("component_at_railcover_01");
					break;
				
				case 4:
					iVar0 = joaat("component_at_ar_afgrip");
					break;
				
				case 5:
					iVar0 = joaat("component_at_ar_flsh");
					break;
				
				case 6:
					iVar0 = joaat("component_at_scope_medium");
					break;
				
				case 7:
					iVar0 = joaat("component_at_ar_supp");
					break;
				
				case 8:
					iVar0 = joaat("component_carbinerifle_varmod_luxe");
					break;
			}
			break;
		
		case joaat("weapon_advancedrifle"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_advancedrifle_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_advancedrifle_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_at_ar_flsh");
					break;
				
				case 3:
					iVar0 = joaat("component_at_scope_small");
					break;
				
				case 4:
					iVar0 = joaat("component_at_ar_supp");
					break;
				
				case 5:
					iVar0 = joaat("component_advancedrifle_varmod_luxe");
					break;
			}
			break;
		
		case joaat("weapon_mg"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_mg_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_mg_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_at_scope_small_02");
					break;
				
				case 3:
					iVar0 = joaat("component_at_ar_afgrip");
					break;
				
				case 4:
					iVar0 = joaat("component_mg_varmod_lowrider");
					break;
			}
			break;
		
		case joaat("weapon_combatmg"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_combatmg_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_combatmg_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_at_ar_afgrip");
					break;
				
				case 3:
					iVar0 = joaat("component_at_scope_medium");
					break;
				
				case 4:
					iVar0 = joaat("component_combatmg_varmod_lowrider");
					break;
			}
			break;
		
		case joaat("weapon_pumpshotgun"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_at_sr_supp");
					break;
				
				case 1:
					iVar0 = joaat("component_at_ar_flsh");
					break;
				
				case 2:
					iVar0 = joaat("component_pumpshotgun_varmod_lowrider");
					break;
			}
			break;
		
		case joaat("weapon_assaultshotgun"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_assaultshotgun_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_assaultshotgun_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_at_ar_afgrip");
					break;
				
				case 3:
					iVar0 = joaat("component_at_ar_flsh");
					break;
				
				case 4:
					iVar0 = joaat("component_at_ar_supp");
					break;
			}
			break;
		
		case joaat("weapon_sniperrifle"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_sniperrifle_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_at_scope_large");
					break;
				
				case 2:
					iVar0 = joaat("component_at_scope_max");
					break;
				
				case 3:
					iVar0 = joaat("component_at_ar_supp_02");
					break;
				
				case 4:
					iVar0 = joaat("component_sniperrifle_varmod_luxe");
					break;
			}
			break;
		
		case joaat("weapon_heavysniper"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_heavysniper_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_at_scope_large");
					break;
				
				case 2:
					iVar0 = joaat("component_at_scope_max");
					break;
			}
			break;
		
		case joaat("weapon_grenadelauncher"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_at_ar_afgrip");
					break;
				
				case 1:
					iVar0 = joaat("component_at_ar_flsh");
					break;
				
				case 2:
					iVar0 = joaat("component_at_scope_small");
					break;
			}
			break;
		
		case joaat("weapon_minigun"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_minigun_clip_01");
					break;
			}
			break;
		
		case joaat("weapon_assaultsmg"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_assaultsmg_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_assaultsmg_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_at_ar_flsh");
					break;
				
				case 3:
					iVar0 = joaat("component_at_scope_macro");
					break;
				
				case 4:
					iVar0 = joaat("component_at_ar_supp_02");
					break;
				
				case 5:
					iVar0 = joaat("component_assaultsmg_varmod_lowrider");
					break;
			}
			break;
		
		case joaat("weapon_bullpupshotgun"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_at_ar_afgrip");
					break;
				
				case 1:
					iVar0 = joaat("component_at_ar_flsh");
					break;
				
				case 2:
					iVar0 = joaat("component_at_ar_supp_02");
					break;
			}
			break;
		
		case joaat("weapon_pistol50"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_pistol50_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_pistol50_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_at_pi_flsh");
					break;
				
				case 3:
					iVar0 = joaat("component_at_ar_supp_02");
					break;
				
				case 4:
					iVar0 = joaat("component_pistol50_varmod_luxe");
					break;
			}
			break;
		
		case joaat("weapon_combatpdw"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_combatpdw_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_combatpdw_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_combatpdw_clip_03");
					break;
				
				case 3:
					iVar0 = joaat("component_at_ar_flsh");
					break;
				
				case 4:
					iVar0 = joaat("component_at_scope_small");
					break;
				
				case 5:
					iVar0 = joaat("component_at_ar_afgrip");
					break;
			}
			break;
		
		case joaat("weapon_sawnoffshotgun"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_sawnoffshotgun_varmod_luxe");
					break;
			}
			break;
		
		case joaat("weapon_bullpuprifle"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_bullpuprifle_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_bullpuprifle_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_at_ar_flsh");
					break;
				
				case 3:
					iVar0 = joaat("component_at_scope_small");
					break;
				
				case 4:
					iVar0 = joaat("component_at_ar_supp");
					break;
				
				case 5:
					iVar0 = joaat("component_at_ar_afgrip");
					break;
				
				case 6:
					iVar0 = joaat("component_bullpuprifle_varmod_low");
					break;
			}
			break;
		
		case joaat("weapon_snspistol"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_snspistol_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_snspistol_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_snspistol_varmod_lowrider");
					break;
			}
			break;
		
		case joaat("weapon_specialcarbine"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_specialcarbine_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_specialcarbine_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_specialcarbine_clip_03");
					break;
				
				case 3:
					iVar0 = joaat("component_at_ar_flsh");
					break;
				
				case 4:
					iVar0 = joaat("component_at_scope_medium");
					break;
				
				case 5:
					iVar0 = joaat("component_at_ar_supp_02");
					break;
				
				case 6:
					iVar0 = joaat("component_at_ar_afgrip");
					break;
				
				case 7:
					iVar0 = joaat("component_specialcarbine_varmod_lowrider");
					break;
			}
			break;
		
		case joaat("weapon_knuckle"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_knuckle_varmod_pimp");
					break;
				
				case 1:
					iVar0 = joaat("component_knuckle_varmod_ballas");
					break;
				
				case 2:
					iVar0 = joaat("component_knuckle_varmod_dollar");
					break;
				
				case 3:
					iVar0 = joaat("component_knuckle_varmod_diamond");
					break;
				
				case 4:
					iVar0 = joaat("component_knuckle_varmod_hate");
					break;
				
				case 5:
					iVar0 = joaat("component_knuckle_varmod_love");
					break;
				
				case 6:
					iVar0 = joaat("component_knuckle_varmod_player");
					break;
				
				case 7:
					iVar0 = joaat("component_knuckle_varmod_king");
					break;
				
				case 8:
					iVar0 = joaat("component_knuckle_varmod_vagos");
					break;
			}
			break;
		
		case joaat("weapon_machinepistol"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_machinepistol_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_machinepistol_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_machinepistol_clip_03");
					break;
				
				case 3:
					iVar0 = joaat("component_at_pi_supp");
					break;
			}
			break;
		
		case joaat("weapon_switchblade"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_switchblade_varmod_var1");
					break;
				
				case 1:
					iVar0 = joaat("component_switchblade_varmod_var2");
					break;
			}
			break;
		
		case joaat("weapon_revolver"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_revolver_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_revolver_varmod_boss");
					break;
				
				case 2:
					iVar0 = joaat("component_revolver_varmod_goon");
					break;
			}
			break;
		
		case -1121678507:
			switch (iParam1)
			{
				case 0:
					iVar0 = -2067221805;
					break;
				
				case 1:
					iVar0 = -1820405577;
					break;
			}
			break;
		
		default:
			if (iParam0 != 0)
			{
				iVar1 = func_157(iParam0, &uVar2);
				if (iVar1 != -1)
				{
					if (iParam1 < dlc1::get_num_dlc_weapon_components(iVar1))
					{
						if (dlc1::get_dlc_weapon_component_data(iVar1, iParam1, &Var41))
						{
							return Var41.f_3;
						}
					}
				}
			}
			break;
	}
	return iVar0;
}

int func_157(int iParam0, var uParam1)//Position - 0xBAC0
{
	int iVar0;
	int iVar1;
	
	iVar1 = dlc1::get_num_dlc_weapons();
	iVar0 = 0;
	while (iVar0 < iVar1)
	{
		if (dlc1::get_dlc_weapon_data(iVar0, uParam1))
		{
			if (uParam1->f_1 == iParam0)
			{
				return iVar0;
			}
		}
		iVar0++;
	}
	return -1;
}

int func_158(int iParam0)//Position - 0xBAFB
{
	int iVar0;
	
	iVar0 = 0;
	switch (iParam0)
	{
		case 0:
			iVar0 = 1993361168;
			break;
		
		case 1:
			iVar0 = 1277010230;
			break;
		
		case 2:
			iVar0 = 932043479;
			break;
		
		case 3:
			iVar0 = -690654591;
			break;
		
		case 4:
			iVar0 = -1459198205;
			break;
		
		case 5:
			iVar0 = 195782970;
			break;
		
		case 6:
			iVar0 = -438797331;
			break;
		
		case 7:
			iVar0 = 896793492;
			break;
		
		case 8:
			iVar0 = 495159329;
			break;
		
		case 9:
			iVar0 = -1155528315;
			break;
		
		case 10:
			iVar0 = -515636489;
			break;
		
		case 11:
			iVar0 = -871913299;
			break;
		
		case 12:
			iVar0 = -1352759032;
			break;
		
		case 13:
			iVar0 = -542958961;
			break;
		
		case 14:
			iVar0 = 1682645887;
			break;
		
		case 15:
			iVar0 = -859470162;
			break;
		
		case 16:
			iVar0 = -2125426402;
			break;
		
		case 17:
			iVar0 = 2067210266;
			break;
		
		case 18:
			iVar0 = -538172856;
			break;
		
		case 19:
			iVar0 = 1783244476;
			break;
		
		case 20:
			iVar0 = 439844898;
			break;
		
		case 21:
			iVar0 = -24829327;
			break;
		
		case 22:
			iVar0 = 1949306232;
			break;
		
		case 23:
			iVar0 = -1941230881;
			break;
		
		case 24:
			iVar0 = -1033554448;
			break;
		
		case 25:
			iVar0 = 320513715;
			break;
		
		case 26:
			iVar0 = -695165975;
			break;
		
		case 27:
			iVar0 = -281028447;
			break;
		
		case 28:
			iVar0 = -686713772;
			break;
		
		case 29:
			iVar0 = 347509793;
			break;
		
		case 30:
			iVar0 = 1769089473;
			break;
		
		case 31:
			iVar0 = 189935548;
			break;
		
		case 33:
			iVar0 = 248801358;
			break;
		
		case 34:
			iVar0 = 386596758;
			break;
		
		case 35:
			iVar0 = -157212362;
			break;
		
		case 36:
			iVar0 = 436985596;
			break;
		
		case 37:
			iVar0 = -47957369;
			break;
		
		case 38:
			iVar0 = 575938238;
			break;
	}
	return iVar0;
}

void func_159(int iParam0)//Position - 0xBD6F
{
	int iVar0;
	
	iVar0 = func_24(iParam0);
	if (func_23(iVar0) && !ped::is_ped_injured(iParam0))
	{
		Global_101652.f_2079.f_539.f_294[iVar0] = ped::get_ped_armour(iParam0);
	}
}

void func_160(var uParam0, int iParam1)//Position - 0xBDAB
{
	int iVar0;
	vector3 vVar1;
	var uVar4;
	int iVar5;
	
	*uParam0 = { entity::get_entity_coords(player::player_ped_id(), 1) };
	uParam0->f_3 = entity::get_entity_heading(player::player_ped_id());
	uParam0->f_5 = ped::get_ped_parachute_state(player::player_ped_id());
	if (player::is_player_playing(player::player_id()))
	{
		uParam0->f_4 = player::get_player_wanted_level(player::player_id());
	}
	if (system::vdist(*uParam0, 320.9934f, 265.2515f, 82.1221f) < 10f)
	{
		*uParam0 = { 301.2162f, 202.1357f, 103.3797f };
		uParam0->f_3 = 156.5144f;
	}
	else if (system::vdist(*uParam0, 377.153f, -717.567f, 10.0536f) < 10f)
	{
		*uParam0 = { 394.2567f, -713.5439f, 28.2853f };
		uParam0->f_3 = 276.6273f;
	}
	else if (system::vdist(*uParam0, -1425.564f, -244.3f, 15.8053f) < 10f)
	{
		*uParam0 = { -1423.472f, -214.2539f, 45.5004f };
		uParam0->f_3 = 353.8757f;
	}
	else if (script::_get_number_of_instances_of_streamed_script(joaat("finale_choice")) > 0)
	{
		*uParam0 = { 4.2587f, 525.0214f, 173.6281f };
		uParam0->f_3 = 203.6746f;
	}
	else if (gameplay::is_bit_set(Global_69945, 4))
	{
		*uParam0 = { 452.0255f, 5571.85f, 780.1859f };
		uParam0->f_3 = 78.9858f;
	}
	else if (gameplay::is_bit_set(Global_69945, 5))
	{
		*uParam0 = { -745.4462f, 5595.146f, 40.6594f };
		uParam0->f_3 = 261.747f;
	}
	else if (gameplay::is_bit_set(Global_69945, 6))
	{
		*uParam0 = { -1675.521f, -1125.59f, 12.091f };
		uParam0->f_3 = 271.8208f;
	}
	else if (gameplay::is_bit_set(Global_69945, 7))
	{
		*uParam0 = { -1631.219f, -1112.805f, 12.0212f };
		uParam0->f_3 = 316.8879f;
	}
	else if (interior::get_interior_from_entity(player::player_ped_id()) == interior::get_interior_at_coords_with_type(1272.659f, -1715.467f, 53.7715f, "v_lesters"))
	{
		*uParam0 = { 1276.956f, -1725.189f, 53.6551f };
		uParam0->f_3 = 204.1703f;
	}
	else if (entity::is_entity_in_angled_area(player::player_ped_id(), -415.4365f, 2068.289f, 113.3002f, -564.9516f, 1884.703f, 134.0403f, 258.75f, 0, true, 0) || entity::is_entity_in_angled_area(player::player_ped_id(), -596.4706f, 2089.921f, 125.4128f, -581.2134f, 2036.256f, 136.2836f, 9.5f, 0, true, 0))
	{
		*uParam0 = { -601.59f, 2099.197f, 128.8928f };
		uParam0->f_3 = 204.7498f;
	}
	else if (system::vdist(*uParam0, -1007.393f, -477.9584f, 52.5357f) < 8f)
	{
		*uParam0 = { -1018.376f, -483.9436f, 36.0964f };
		uParam0->f_3 = 114.7664f;
	}
	else if (system::vdist(*uParam0, 480.6662f, -1317.808f, 28.20303f) < 15f)
	{
		*uParam0 = { 497.7238f, -1310.932f, 28.2372f };
		uParam0->f_3 = 289.3663f;
	}
	else if (system::vdist(*uParam0, 2329.527f, 2571.311f, 45.6779f) < 5f)
	{
		*uParam0 = { 2316.93f, 2594.153f, 45.7199f };
		uParam0->f_3 = 348.1325f;
	}
	if (iParam1 == 1)
	{
		if (func_163(&iVar0))
		{
			if (func_162(iVar0, &vVar1, &uVar4))
			{
				vVar1.z = (vVar1.y + 1f);
				*uParam0 = { vVar1 };
				uParam0->f_3 = uVar4;
			}
		}
		else if (entity::is_entity_in_angled_area(player::player_ped_id(), 207.4336f, -1019.795f, -100.4728f, 189.9338f, -1019.623f, -95.56883f, 17.1875f, 0, true, 0))
		{
			iVar5 = func_20();
			if (iVar5 == 0)
			{
				*uParam0 = { -65.1234f, 81.2517f, 70.5644f };
				uParam0->f_3 = 71.6237f;
			}
			else if (iVar5 == 1)
			{
				*uParam0 = { -68.5531f, -1824.377f, 25.9424f };
				uParam0->f_3 = 215.8295f;
			}
			else if (iVar5 == 2)
			{
				*uParam0 = { -220.8189f, -1162.302f, 22.0242f };
				uParam0->f_3 = 70.2711f;
			}
		}
		else if (entity::is_entity_in_angled_area(player::player_ped_id(), 483.7175f, -1326.63f, 28.2135f, 474.9644f, -1307.998f, 34.49498f, 12f, 0, true, 0))
		{
			*uParam0 = { 495.4108f, -1306.08f, 29.2883f };
			uParam0->f_3 = 213.6273f;
		}
		else if (entity::is_entity_in_angled_area(player::player_ped_id(), -1146.77f, -1534.22f, 3.37f, -1158.453f, -1517.75f, 6.374244f, 13f, 0, true, 0))
		{
			*uParam0 = { -1160.095f, -1515.407f, 3.1496f };
			uParam0->f_3 = 305.6424f;
		}
		else if (entity::is_entity_in_angled_area(player::player_ped_id(), 439.5432f, -996.9769f, 24.88307f, 428.2935f, -997.0192f, 28.57458f, 8.5f, 0, true, 0))
		{
			*uParam0 = { 431.8853f, -1013.133f, 28.7907f };
			uParam0->f_3 = 186.6814f;
		}
		else if (func_161(*uParam0, "v_hospital", 307.3065f, -589.9595f, 43.302f))
		{
			*uParam0 = { 279.4137f, -585.8815f, 43.2502f };
			uParam0->f_3 = 48.8028f;
		}
	}
}

bool func_161(vector3 vParam0, char* sParam3, vector3 vParam4)//Position - 0xC308
{
	int iVar0;
	int iVar1;
	
	if (!interior::_are_coords_colliding_with_exterior(vParam0))
	{
		iVar0 = interior::get_interior_at_coords_with_type(vParam4, sParam3);
		if (!interior::is_valid_interior(iVar0))
		{
			return false;
		}
		iVar1 = interior::get_interior_from_collision(vParam0);
		if (iVar1 == iVar0)
		{
			return true;
		}
	}
	return false;
}

int func_162(int iParam0, var uParam1, var uParam2)//Position - 0xC34C
{
	*uParam1 = { 0f, 0f, 0f };
	*uParam2 = 0f;
	switch (iParam0)
	{
		case 0:
			*uParam1 = { -829.842f, -191.7454f, 36.4386f };
			*uParam2 = 29.5061f;
			break;
		
		case 1:
			*uParam1 = { 129.8484f, -1716.528f, 28.0702f };
			*uParam2 = 50.3483f;
			break;
		
		case 2:
			*uParam1 = { -1296.913f, -1120.999f, 5.3951f };
			*uParam2 = 0.9933f;
			break;
		
		case 3:
			*uParam1 = { 1938.028f, 3718.736f, 31.3154f };
			*uParam2 = 118.2305f;
			break;
		
		case 4:
			*uParam1 = { 1197.866f, -469.3809f, 65.0885f };
			*uParam2 = 346.4477f;
			break;
		
		case 5:
			*uParam1 = { -32.2161f, -135.8212f, 56.0532f };
			*uParam2 = 186.0052f;
			break;
		
		case 6:
			*uParam1 = { -287.7696f, 6238.081f, 30.2902f };
			*uParam2 = 316.1349f;
			break;
		
		case 7:
			*uParam1 = { 99.2876f, -1395.16f, 28.2759f };
			*uParam2 = 320.2739f;
			break;
		
		case 8:
			*uParam1 = { 1679.445f, 4819.056f, 41.0035f };
			*uParam2 = 4.6192f;
			break;
		
		case 9:
			*uParam1 = { 411.3063f, -809.1863f, 28.1554f };
			*uParam2 = 1.8972f;
			break;
		
		case 10:
			*uParam1 = { -1088.054f, 2699.167f, 19.2748f };
			*uParam2 = 129.7382f;
			break;
		
		case 11:
			*uParam1 = { 1194.163f, 2695.644f, 36.9225f };
			*uParam2 = 1.1454f;
			break;
		
		case 12:
			*uParam1 = { -821.2829f, -1088.027f, 10.0499f };
			*uParam2 = 120.5883f;
			break;
		
		case 13:
			*uParam1 = { -3.3416f, 6521.303f, 30.2961f };
			*uParam2 = 316.4451f;
			break;
		
		case 14:
			*uParam1 = { -1208.417f, -785.9635f, 16.0139f };
			*uParam2 = 36.3181f;
			break;
		
		case 15:
			*uParam1 = { 623.1845f, 2739.191f, 40.9588f };
			*uParam2 = 3.5411f;
			break;
		
		case 16:
			*uParam1 = { 130.9555f, -198.2084f, 53.41f };
			*uParam2 = 251.3506f;
			break;
		
		case 17:
			*uParam1 = { -3164.065f, 1067.317f, 19.6778f };
			*uParam2 = 101.2229f;
			break;
		
		case 18:
			*uParam1 = { -713.2797f, -174.2767f, 35.8962f };
			*uParam2 = 29.8138f;
			break;
		
		case 19:
			*uParam1 = { -147.0616f, -306.4322f, 37.7912f };
			*uParam2 = 160.4526f;
			break;
		
		case 20:
			*uParam1 = { -1461.355f, -230.6092f, 48.3064f };
			*uParam2 = 318.7851f;
			break;
		
		case 21:
			*uParam1 = { -1347.739f, -1278.573f, 3.8952f };
			*uParam2 = 17.9365f;
			break;
		
		case 22:
			*uParam1 = { 325.6833f, 164.3263f, 102.4425f };
			*uParam2 = 68.6407f;
			break;
		
		case 23:
			*uParam1 = { 1858.774f, 3742.393f, 32.0779f };
			*uParam2 = 301.2329f;
			break;
		
		case 24:
			*uParam1 = { -286.3272f, 6202.802f, 30.3323f };
			*uParam2 = 225.1334f;
			break;
		
		case 25:
			*uParam1 = { -1161.596f, -1417.7f, 3.712f };
			*uParam2 = 246.9161f;
			break;
		
		case 26:
			*uParam1 = { 1308.952f, -1660.611f, 50.2362f };
			*uParam2 = 163.5456f;
			break;
		
		case 27:
			*uParam1 = { -3161.585f, 1074.214f, 19.6847f };
			*uParam2 = 98.6092f;
			break;
		
		case 28:
			*uParam1 = { 28.423f, -1110.814f, 28.2848f };
			*uParam2 = 85.2495f;
			break;
		
		case 29:
			*uParam1 = { 1704.966f, 3749.709f, 33.0188f };
			*uParam2 = 45.6778f;
			break;
		
		case 30:
			*uParam1 = { 223.949f, -38.7894f, 68.6483f };
			*uParam2 = 159.4265f;
			break;
		
		case 31:
			*uParam1 = { 837.7854f, -1017.963f, 26.3045f };
			*uParam2 = 181.0445f;
			break;
		
		case 32:
			*uParam1 = { -313.1914f, 6093.351f, 30.4625f };
			*uParam2 = 315.8405f;
			break;
		
		case 33:
			*uParam1 = { -663.4631f, -952.8069f, 20.3143f };
			*uParam2 = 92.6796f;
			break;
		
		case 34:
			*uParam1 = { -1323.06f, -392.8577f, 35.4596f };
			*uParam2 = 210.7398f;
			break;
		
		case 35:
			*uParam1 = { -1106.102f, 2684.35f, 18.0953f };
			*uParam2 = 127.0383f;
			break;
		
		case 36:
			*uParam1 = { -3157.932f, 1081.309f, 19.6953f };
			*uParam2 = 100.2942f;
			break;
		
		case 37:
			*uParam1 = { 2562.882f, 312.8641f, 107.4612f };
			*uParam2 = 179.205f;
			break;
		
		case 38:
			*uParam1 = { 822.48f, -2142.875f, 27.8496f };
			*uParam2 = 355.0598f;
			break;
		
		case 39:
			*uParam1 = { -1137.053f, -1993.916f, 12.1677f };
			*uParam2 = 43.1213f;
			break;
		
		case 40:
			*uParam1 = { 717.8107f, -1084.081f, 21.3094f };
			*uParam2 = 93.2649f;
			break;
		
		case 41:
			*uParam1 = { -387.6789f, -128.2568f, 37.6796f };
			*uParam2 = 119.1085f;
			break;
		
		case 42:
			*uParam1 = { 117.8835f, 6599.415f, 31.0134f };
			*uParam2 = 90.7225f;
			break;
		
		case 43:
			*uParam1 = { 1201.709f, 2664.813f, 36.8102f };
			*uParam2 = 133.9002f;
			break;
		
		case 44:
			*uParam1 = { -200.1521f, -1297.502f, 30.296f };
			*uParam2 = 269.0687f;
			break;
		
		case 45:
			*uParam1 = { 0f, 0f, 0f };
			*uParam2 = 0f;
			break;
	}
	return !func_8(*uParam1, 0f, 0f, 0f, 0);
}

bool func_163(var uParam0)//Position - 0xC9DB
{
	if (!entity::is_entity_dead(player::player_ped_id(), 0) && !ped::is_ped_injured(player::player_ped_id()))
	{
		if (func_174())
		{
			*uParam0 = func_169(entity::get_entity_coords(player::player_ped_id(), 0), 6, -1, 0, 1, -1);
			if (func_168(*uParam0) && !func_164(*uParam0))
			{
				return true;
			}
		}
	}
	return false;
}

int func_164(int iParam0)//Position - 0xCA36
{
	return func_165(iParam0, 0, 1);
}

int func_165(int iParam0, int iParam1, int iParam2)//Position - 0xCA46
{
	if (iParam2)
	{
		return gameplay::is_bit_set(Global_91538.f_1308[iParam0], iParam1);
	}
	else if (network::network_is_game_in_progress())
	{
		if (func_167() == 0)
		{
			return gameplay::is_bit_set(func_146(func_166(iParam0), -1, 0), iParam1);
		}
	}
	else
	{
		return gameplay::is_bit_set(Global_101652.f_668[iParam0], iParam1);
	}
	return false;
}

int func_166(int iParam0)//Position - 0xCAA6
{
	switch (iParam0)
	{
		case 0:
			return 822;
			break;
		
		case 1:
			return 823;
			break;
		
		case 2:
			return 824;
			break;
		
		case 3:
			return 825;
			break;
		
		case 4:
			return 826;
			break;
		
		case 5:
			return 827;
			break;
		
		case 6:
			return 828;
			break;
		
		case 7:
			return 829;
			break;
		
		case 8:
			return 830;
			break;
		
		case 9:
			return 831;
			break;
		
		case 10:
			return 832;
			break;
		
		case 11:
			return 833;
			break;
		
		case 12:
			return 834;
			break;
		
		case 13:
			return 835;
			break;
		
		case 14:
			return 836;
			break;
		
		case 15:
			return 838;
			break;
		
		case 16:
			return 839;
			break;
		
		case 17:
			return 840;
			break;
		
		case 18:
			return 841;
			break;
		
		case 19:
			return 842;
			break;
		
		case 20:
			return 843;
			break;
		
		case 21:
			return 844;
			break;
		
		case 22:
			return 845;
			break;
		
		case 23:
			return 846;
			break;
		
		case 24:
			return 847;
			break;
		
		case 25:
			return 848;
			break;
		
		case 26:
			return 849;
			break;
		
		case 27:
			return 850;
			break;
		
		case 28:
			return 851;
			break;
		
		case 29:
			return 852;
			break;
		
		case 30:
			return 853;
			break;
		
		case 31:
			return 854;
			break;
		
		case 32:
			return 855;
			break;
		
		case 33:
			return 856;
			break;
		
		case 34:
			return 857;
			break;
		
		case 35:
			return 858;
			break;
		
		case 36:
			return 859;
			break;
		
		case 37:
			return 860;
			break;
		
		case 38:
			return 861;
			break;
		
		case 39:
			return 862;
			break;
		
		case 40:
			return 866;
			break;
		
		case 41:
			return 867;
			break;
		
		case 42:
			return 868;
			break;
		
		case 43:
			return 869;
			break;
		
		case 44:
			return 5847;
			break;
		
		case 45:
			return 3780;
			break;
		
		default:
			break;
	}
	return 6022;
}

var func_167()//Position - 0xCD6D
{
	return Global_25185;
}

int func_168(int iParam0)//Position - 0xCD78
{
	return func_165(iParam0, 5, 1);
}

int func_169(vector3 vParam0, int iParam3, int iParam4, int iParam5, int iParam6, int iParam7)//Position - 0xCD88
{
	int iVar0;
	float fVar1;
	float fVar2;
	int iVar3;
	
	fVar2 = 1000000f;
	iVar3 = -1;
	iVar0 = 0;
	while (iVar0 <= 45)
	{
		if (iParam3 == 6 || iParam3 == func_173(iVar0))
		{
			if (!iParam5 || func_172(iVar0))
			{
				fVar1 = gameplay::get_distance_between_coords(vParam0, func_170(iVar0, 0), 1);
				if (((fVar1 < fVar2 && (fVar1 <= IntToFloat(iParam4) || iParam4 == -1)) && (iParam6 || iVar0 != 21)) && iVar0 != iParam7)
				{
					fVar2 = fVar1;
					iVar3 = iVar0;
				}
			}
		}
		iVar0++;
	}
	return iVar3;
}

Vector3 func_170(int iParam0, int iParam1)//Position - 0xCE2A
{
	switch (iParam0)
	{
		case -1:
			return 0f, 0f, 0f;
			break;
		
		case 0:
			return -821.9946f, -187.1776f, 36.5689f;
			break;
		
		case 1:
			return 133.5702f, -1710.918f, 28.2916f;
			break;
		
		case 2:
			return -1287.082f, -1116.558f, 5.9901f;
			break;
		
		case 3:
			return 1933.119f, 3726.079f, 31.8444f;
			break;
		
		case 4:
			return 1208.333f, -470.917f, 65.208f;
			break;
		
		case 5:
			return -30.7448f, -148.4921f, 56.0765f;
			break;
		
		case 6:
			return -280.8165f, 6231.771f, 30.6955f;
			break;
		
		case 7:
			return 80.665f, -1391.669f, 28.3761f;
			break;
		
		case 8:
			return 1687.881f, 4820.55f, 41.0096f;
			break;
		
		case 9:
			return 419.531f, -807.5787f, 28.4896f;
			break;
		
		case 10:
			return -1094.049f, 2704.171f, 18.0873f;
			break;
		
		case 11:
			return 1197.972f, 2704.22f, 37.1572f;
			break;
		
		case 12:
			return -818.6218f, -1077.533f, 10.3282f;
			break;
		
		case 13:
			return -0.2361f, 6516.045f, 30.8684f;
			break;
		
		case 14:
			return -1199.809f, -776.6886f, 16.3237f;
			break;
		
		case 15:
			return 618.1857f, 2752.567f, 41.0881f;
			break;
		
		case 16:
			return 126.6853f, -212.5027f, 53.5578f;
			break;
		
		case 17:
			return -3168.966f, 1055.287f, 19.8632f;
			break;
		
		case 18:
			return -715.3598f, -155.7742f, 36.4105f;
			break;
		
		case 19:
			return -158.2199f, -304.9663f, 38.735f;
			break;
		
		case 20:
			return -1455.005f, -233.1862f, 48.7936f;
			break;
		
		case 21:
			return -1335.973f, -1278.555f, 3.8598f;
			break;
		
		case 22:
			return 321.6098f, 179.4165f, 102.5865f;
			break;
		
		case 23:
			return 1861.685f, 3750.08f, 32.0318f;
			break;
		
		case 24:
			return -290.1603f, 6199.095f, 30.4871f;
			break;
		
		case 25:
			return -1153.948f, -1425.019f, 3.9544f;
			break;
		
		case 26:
			return 1322.455f, -1651.125f, 51.1885f;
			break;
		
		case 27:
			return -3169.42f, 1074.727f, 19.8343f;
			break;
		
		case 28:
			return 17.6804f, -1114.288f, 28.797f;
			break;
		
		case 29:
			return 1697.979f, 3753.2f, 33.7053f;
			break;
		
		case 30:
			return 245.2711f, -45.8126f, 68.941f;
			break;
		
		case 31:
			return 844.1248f, -1025.571f, 27.1948f;
			break;
		
		case 32:
			return -325.8904f, 6077.026f, 30.4548f;
			break;
		
		case 33:
			return -664.2178f, -943.3646f, 20.8292f;
			break;
		
		case 34:
			return -1313.948f, -390.9637f, 35.592f;
			break;
		
		case 35:
			return -1111.238f, 2688.463f, 17.6131f;
			break;
		
		case 36:
			return -3165.231f, 1082.855f, 19.8438f;
			break;
		
		case 37:
			return 2569.612f, 302.576f, 107.7349f;
			break;
		
		case 38:
			return 811.8699f, -2149.102f, 28.6363f;
			break;
		
		case 39:
			return -1147.314f, -1992.434f, 12.1803f;
			break;
		
		case 40:
			return 724.524f, -1089.081f, 21.1692f;
			break;
		
		case 41:
			return -354.5272f, -135.4011f, 38.185f;
			break;
		
		case 42:
			return 113.2615f, 6624.28f, 30.7871f;
			break;
		
		case 43:
			return 1174.707f, 2644.45f, 36.7552f;
			break;
		
		case 44:
			if (iParam1)
			{
				return -211.5f, -1324.2f, 30.296f;
			}
			else
			{
				return -205.6654f, -1311.113f, 30.296f;
			}
			break;
		
		case 45:
			return func_171(Global_92999);
			break;
	}
	return 1000000f, 1000000f, 1000000f;
}

Vector3 func_171(int iParam0)//Position - 0xD344
{
	switch (iParam0)
	{
		case 1:
			return 1060f, -2990f, -35f;
			break;
		
		case 2:
			return 1060f, -2990f, -35f;
			break;
		
		case 3:
			return 974.9542f, -3000.091f, -35f;
			break;
		
		case 6:
			return -1586.36f, -566.6f, 106.17f;
			break;
		
		case 7:
			return -1389.87f, -465.17f, 82.68f;
			break;
		
		case 8:
			return -145.81f, -590.2f, 171.13f;
			break;
		
		case 9:
			return -62.49f, -823.55f, 288.74f;
			break;
		
		case 4:
			return 1102.515f, -3158.888f, -38.5186f;
			break;
		
		case 5:
			return 1005.861f, -3156.162f, -39.907f;
			break;
		
		default:
			return 0f, 0f, -200f;
			break;
	}
	return 0f, 0f, -200f;
}

int func_172(int iParam0)//Position - 0xD45A
{
	return func_165(iParam0, 0, 0);
}

int func_173(int iParam0)//Position - 0xD46A
{
	switch (iParam0)
	{
		case -1:
			return 6;
			break;
		
		case 0:
			return 0;
			break;
		
		case 1:
			return 0;
			break;
		
		case 2:
			return 0;
			break;
		
		case 3:
			return 0;
			break;
		
		case 4:
			return 0;
			break;
		
		case 5:
			return 0;
			break;
		
		case 6:
			return 0;
			break;
		
		case 7:
			return 1;
			break;
		
		case 8:
			return 1;
			break;
		
		case 9:
			return 1;
			break;
		
		case 10:
			return 1;
			break;
		
		case 11:
			return 1;
			break;
		
		case 12:
			return 1;
			break;
		
		case 13:
			return 1;
			break;
		
		case 14:
			return 1;
			break;
		
		case 15:
			return 1;
			break;
		
		case 16:
			return 1;
			break;
		
		case 17:
			return 1;
			break;
		
		case 18:
			return 1;
			break;
		
		case 19:
			return 1;
			break;
		
		case 20:
			return 1;
			break;
		
		case 21:
			return 1;
			break;
		
		case 22:
			return 2;
			break;
		
		case 23:
			return 2;
			break;
		
		case 24:
			return 2;
			break;
		
		case 25:
			return 2;
			break;
		
		case 26:
			return 2;
			break;
		
		case 27:
			return 2;
			break;
		
		case 28:
			return 3;
			break;
		
		case 29:
			return 3;
			break;
		
		case 30:
			return 3;
			break;
		
		case 31:
			return 3;
			break;
		
		case 32:
			return 3;
			break;
		
		case 33:
			return 3;
			break;
		
		case 34:
			return 3;
			break;
		
		case 35:
			return 3;
			break;
		
		case 36:
			return 3;
			break;
		
		case 37:
			return 3;
			break;
		
		case 38:
			return 3;
			break;
		
		case 39:
			return 4;
			break;
		
		case 40:
			return 4;
			break;
		
		case 41:
			return 4;
			break;
		
		case 42:
			return 4;
			break;
		
		case 43:
			return 4;
			break;
		
		case 44:
			return 4;
			break;
		
		case 45:
			return 5;
			break;
	}
	return 6;
}

int func_174()//Position - 0xD6DD
{
	return Global_91538.f_303 > 0;
}

var func_175()//Position - 0xD6EE
{
	var uVar0;
	
	func_185(&uVar0, time::get_clock_seconds());
	func_184(&uVar0, time::get_clock_minutes());
	func_183(&uVar0, time::get_clock_hours());
	func_178(&uVar0, time::get_clock_day_of_month());
	func_177(&uVar0, time::get_clock_month());
	func_176(&uVar0, time::get_clock_year());
	return uVar0;
}

void func_176(var uParam0, int iParam1)//Position - 0xD734
{
	if (iParam1 <= 0)
	{
		return;
	}
	if (iParam1 > 2043 || iParam1 < 1979)
	{
		return;
	}
	*uParam0 = (*uParam0 - *uParam0 & 2080374784);
	if (iParam1 < 2011)
	{
		*uParam0 = (*uParam0 || system::shift_left((2011 - iParam1), 26));
		*uParam0 |= -2147483648;
	}
	else
	{
		*uParam0 = (*uParam0 || system::shift_left((iParam1 - 2011), 26));
		*uParam0 = (*uParam0 - *uParam0 & -2147483648);
	}
}

void func_177(var uParam0, int iParam1)//Position - 0xD7BA
{
	if (iParam1 < 0 || iParam1 > 11)
	{
		return;
	}
	*uParam0 = (*uParam0 - *uParam0 & 15);
	*uParam0 = (*uParam0 || iParam1);
}

void func_178(var uParam0, int iParam1)//Position - 0xD7ED
{
	int iVar0;
	int iVar1;
	
	iVar0 = func_182(*uParam0);
	iVar1 = func_180(*uParam0);
	if (iParam1 < 1 || iParam1 > func_179(iVar0, iVar1))
	{
		return;
	}
	*uParam0 = (*uParam0 - *uParam0 & 496);
	*uParam0 = (*uParam0 || system::shift_left(iParam1, 4));
}

int func_179(int iParam0, int iParam1)//Position - 0xD83E
{
	if (iParam1 < 0)
	{
		iParam1 = 0;
	}
	switch (iParam0)
	{
		case 0:
		case 2:
		case 4:
		case 6:
		case 7:
		case 9:
		case 11:
			return 31;
			break;
		
		case 3:
		case 5:
		case 8:
		case 10:
			return 30;
			break;
		
		case 1:
			if ((iParam1 % 4) == 0)
			{
				if ((iParam1 % 100) != 0)
				{
					return 29;
				}
				else if ((iParam1 % 400) == 0)
				{
					return 29;
				}
			}
			return 28;
			break;
	}
	return 30;
}

var func_180(int iParam0)//Position - 0xD8E0
{
	return (system::shift_right(iParam0, 26) & 31 * func_181(gameplay::is_bit_set(iParam0, 31), -1, 1)) + 2011;
}

int func_181(int iParam0, int iParam1, int iParam2)//Position - 0xD905
{
	if (iParam0)
	{
		return iParam1;
	}
	return iParam2;
}

int func_182(var uParam0)//Position - 0xD91C
{
	return uParam0 & 15;
}

void func_183(var uParam0, int iParam1)//Position - 0xD929
{
	if (iParam1 < 0 || iParam1 > 24)
	{
		return;
	}
	*uParam0 = (*uParam0 - *uParam0 & 15872);
	*uParam0 = (*uParam0 || system::shift_left(iParam1, 9));
}

void func_184(var uParam0, int iParam1)//Position - 0xD963
{
	if (iParam1 < 0 || iParam1 >= 60)
	{
		return;
	}
	*uParam0 = (*uParam0 - *uParam0 & 1032192);
	*uParam0 = (*uParam0 || system::shift_left(iParam1, 14));
}

void func_185(var uParam0, int iParam1)//Position - 0xD99E
{
	if (iParam1 < 0 || iParam1 >= 60)
	{
		return;
	}
	*uParam0 = (*uParam0 - *uParam0 & 66060288);
	*uParam0 = (*uParam0 || system::shift_left(iParam1, 20));
}

int func_186(char* sParam0)//Position - 0xD9DA
{
	if (gameplay::are_strings_equal("BailBond1", sParam0))
	{
		return 0;
	}
	else if (gameplay::are_strings_equal("BailBond2", sParam0))
	{
		return 1;
	}
	else if (gameplay::are_strings_equal("BailBond3", sParam0))
	{
		return 2;
	}
	else if (gameplay::are_strings_equal("BailBond4", sParam0))
	{
		return 3;
	}
	return -1;
}

struct<2> func_187(int iParam0)//Position - 0xDA30
{
	struct<2> Var0;
	
	StringCopy(&Var0, "", 8);
	switch (iParam0)
	{
		case 0:
			StringCopy(&Var0, "ABI1", 8);
			break;
		
		case 1:
			StringCopy(&Var0, "ABI2", 8);
			break;
		
		case 2:
			StringCopy(&Var0, "BA1", 8);
			break;
		
		case 3:
			StringCopy(&Var0, "BA2", 8);
			break;
		
		case 4:
			StringCopy(&Var0, "BA3", 8);
			break;
		
		case 5:
			StringCopy(&Var0, "BA3A", 8);
			break;
		
		case 6:
			StringCopy(&Var0, "BA3C", 8);
			break;
		
		case 7:
			StringCopy(&Var0, "BA4", 8);
			break;
		
		case 8:
			StringCopy(&Var0, "DRE1", 8);
			break;
		
		case 9:
			StringCopy(&Var0, "EPS1", 8);
			break;
		
		case 10:
			StringCopy(&Var0, "EPS2", 8);
			break;
		
		case 11:
			StringCopy(&Var0, "EPS3", 8);
			break;
		
		case 12:
			StringCopy(&Var0, "EPS4", 8);
			break;
		
		case 13:
			StringCopy(&Var0, "EPS5", 8);
			break;
		
		case 14:
			StringCopy(&Var0, "EPS6", 8);
			break;
		
		case 15:
			StringCopy(&Var0, "EPS7", 8);
			break;
		
		case 16:
			StringCopy(&Var0, "EPS8", 8);
			break;
		
		case 17:
			StringCopy(&Var0, "EXT1", 8);
			break;
		
		case 18:
			StringCopy(&Var0, "EXT2", 8);
			break;
		
		case 19:
			StringCopy(&Var0, "EXT3", 8);
			break;
		
		case 20:
			StringCopy(&Var0, "EXT4", 8);
			break;
		
		case 21:
			StringCopy(&Var0, "FAN1", 8);
			break;
		
		case 22:
			StringCopy(&Var0, "FAN2", 8);
			break;
		
		case 23:
			StringCopy(&Var0, "FAN3", 8);
			break;
		
		case 24:
			StringCopy(&Var0, "HAO1", 8);
			break;
		
		case 25:
			StringCopy(&Var0, "HUN1", 8);
			break;
		
		case 26:
			StringCopy(&Var0, "HUN2", 8);
			break;
		
		case 27:
			StringCopy(&Var0, "JOS1", 8);
			break;
		
		case 28:
			StringCopy(&Var0, "JOS2", 8);
			break;
		
		case 29:
			StringCopy(&Var0, "JOS3", 8);
			break;
		
		case 30:
			StringCopy(&Var0, "JOS4", 8);
			break;
		
		case 31:
			StringCopy(&Var0, "MAU1", 8);
			break;
		
		case 32:
			StringCopy(&Var0, "MIN1", 8);
			break;
		
		case 33:
			StringCopy(&Var0, "MIN2", 8);
			break;
		
		case 34:
			StringCopy(&Var0, "MIN3", 8);
			break;
		
		case 35:
			StringCopy(&Var0, "MRS1", 8);
			break;
		
		case 36:
			StringCopy(&Var0, "MRS2", 8);
			break;
		
		case 37:
			StringCopy(&Var0, "NI1", 8);
			break;
		
		case 38:
			StringCopy(&Var0, "NI1A", 8);
			break;
		
		case 39:
			StringCopy(&Var0, "NI1B", 8);
			break;
		
		case 40:
			StringCopy(&Var0, "NI1C", 8);
			break;
		
		case 41:
			StringCopy(&Var0, "NI1D", 8);
			break;
		
		case 42:
			StringCopy(&Var0, "NI2", 8);
			break;
		
		case 43:
			StringCopy(&Var0, "NI3", 8);
			break;
		
		case 44:
			StringCopy(&Var0, "OME1", 8);
			break;
		
		case 45:
			StringCopy(&Var0, "OME2", 8);
			break;
		
		case 46:
			StringCopy(&Var0, "PA1", 8);
			break;
		
		case 47:
			StringCopy(&Var0, "PA2", 8);
			break;
		
		case 48:
			StringCopy(&Var0, "PA3", 8);
			break;
		
		case 49:
			StringCopy(&Var0, "PA3A", 8);
			break;
		
		case 50:
			StringCopy(&Var0, "PA3B", 8);
			break;
		
		case 51:
			StringCopy(&Var0, "PA4", 8);
			break;
		
		case 52:
			StringCopy(&Var0, "RAM1", 8);
			break;
		
		case 53:
			StringCopy(&Var0, "RAM2", 8);
			break;
		
		case 54:
			StringCopy(&Var0, "RAM3", 8);
			break;
		
		case 55:
			StringCopy(&Var0, "RAM4", 8);
			break;
		
		case 56:
			StringCopy(&Var0, "RAM5", 8);
			break;
		
		case 57:
			StringCopy(&Var0, "SAS1", 8);
			break;
		
		case 58:
			StringCopy(&Var0, "TON1", 8);
			break;
		
		case 59:
			StringCopy(&Var0, "TON2", 8);
			break;
		
		case 60:
			StringCopy(&Var0, "TON3", 8);
			break;
		
		case 61:
			StringCopy(&Var0, "TON4", 8);
			break;
		
		case 62:
			StringCopy(&Var0, "TON5", 8);
			break;
		
		default:
			break;
	}
	return Var0;
}

int func_188(char* sParam0, int iParam1)//Position - 0xDE7C
{
	int iVar0;
	char* sVar1;
	int iVar33;
	int iVar34;
	
	iVar33 = gameplay::get_hash_key(sParam0);
	iVar34 = 0;
	iVar34 = 0;
	while (iVar34 < 63)
	{
		iVar0 = iVar34;
		func_189(iVar0, &sVar1);
		if (gameplay::get_hash_key(sVar1) == iVar33)
		{
			return iVar0;
		}
		iVar34++;
	}
	if (iParam1 == 0)
	{
	}
	return -1;
}

void func_189(int iParam0, var uParam1)//Position - 0xDEC5
{
	switch (iParam0)
	{
		case 0:
			func_190(uParam1, "Abigail1", func_192(iParam0), 0, 0, 4, -1604.668f, 5239.1f, 3.01f, 66, "", 109, 0, "ambient_Diving", 0, 0, 1, 4, 1, 0, 2359, func_191(iParam0), 1, 0);
			break;
		
		case 1:
			func_190(uParam1, "Abigail2", func_192(iParam0), 0, 0, 4, -1592.84f, 5214.04f, 3.01f, 400, "", 110, 0, "", 0, 0, -1, 4, 1, 0, 2359, func_191(iParam0), 1, 0);
			break;
		
		case 2:
			func_190(uParam1, "Barry1", func_192(iParam0), 0, 1, 4, 190.26f, -956.35f, 29.63f, 381, "", 74, 0, "", 0, 1, -1, 4, 1, 0, 2359, func_191(iParam0), 1, 0);
			break;
		
		case 3:
			func_190(uParam1, "Barry2", func_192(iParam0), 0, 1, 4, 190.26f, -956.35f, 29.63f, 381, "", -1, 0, "", 0, 1, -1, 4, 4, 0, 2359, func_191(iParam0), 1, 1);
			break;
		
		case 4:
			func_190(uParam1, "Barry3", func_192(iParam0), 0, 1, 4, 414f, -761f, 29f, 381, "", -1, 0, "", 164, 1, -1, 0, 2, 0, 2359, func_191(iParam0), 0, 0);
			break;
		
		case 5:
			func_190(uParam1, "Barry3A", func_192(iParam0), 1, 1, 0, 1199.27f, -1255.63f, 34.23f, 381, "BARSTASH", 84, 0, "", 166, 0, 7, 4, 2, 0, 2359, func_191(iParam0), 0, 1);
			break;
		
		case 6:
			func_190(uParam1, "Barry3C", func_192(iParam0), 3, 1, 0, -468.9f, -1713.06f, 18.21f, 381, "", 84, 0, "", 166, 0, 7, 4, 2, 0, 2359, func_191(iParam0), 0, 1);
			break;
		
		case 7:
			func_190(uParam1, "Barry4", func_192(iParam0), 0, 1, 4, 237.65f, -385.41f, 44.4f, 381, "", 85, 0, "postRC_Barry4", 0, 0, -1, 4, 2, 800, 2000, func_191(iParam0), 0, 0);
			break;
		
		case 8:
			func_190(uParam1, "Dreyfuss1", func_192(iParam0), 0, 2, 4, -1458.97f, 485.99f, 115.38f, 66, "LETTERS_HINT", 106, 0, "", 0, 0, -1, 4, 2, 0, 2359, func_191(iParam0), 0, 0);
			break;
		
		case 9:
			func_190(uParam1, "Epsilon1", func_192(iParam0), 0, 3, 4, -1622.89f, 4204.87f, 83.3f, 66, "", 86, 0, "", 0, 1, 10, 4, 1, 0, 2359, func_191(iParam0), 0, 0);
			break;
		
		case 10:
			func_190(uParam1, "Epsilon2", func_192(iParam0), 0, 3, 4, 242.7f, 362.7f, 104.74f, 206, "", 87, 16, "", 0, 0, 11, 4, 1, 0, 2359, func_191(iParam0), 1, 0);
			break;
		
		case 11:
			func_190(uParam1, "Epsilon3", func_192(iParam0), 0, 3, 4, 1835.53f, 4705.86f, 38.1f, 206, "", 88, 16, "epsCars", 0, 0, 12, 4, 1, 0, 2359, func_191(iParam0), 0, 0);
			break;
		
		case 12:
			func_190(uParam1, "Epsilon4", func_192(iParam0), 0, 3, 4, 1826.13f, 4698.88f, 38.92f, 206, "", 90, 16, "postRC_Epsilon4", 0, 0, 13, 4, 1, 0, 2359, func_191(iParam0), 0, 0);
			break;
		
		case 13:
			func_190(uParam1, "Epsilon5", func_192(iParam0), 0, 3, 4, 637.02f, 119.7093f, 89.5f, 206, "", 89, 16, "epsRobes", 0, 0, 14, 4, 1, 0, 2359, func_191(iParam0), 1, 0);
			break;
		
		case 14:
			func_190(uParam1, "Epsilon6", func_192(iParam0), 0, 3, 4, -2892.93f, 3192.37f, 11.66f, 206, "", 93, 0, "", 0, 0, 15, 4, 1, 0, 2359, func_191(iParam0), 0, 1);
			break;
		
		case 15:
			func_190(uParam1, "Epsilon7", func_192(iParam0), 0, 3, 4, 524.43f, 3079.82f, 39.48f, 206, "", -1, 16, "epsDesert", 0, 0, 16, 4, 1, 0, 2359, func_191(iParam0), 0, 0);
			break;
		
		case 16:
			func_190(uParam1, "Epsilon8", func_192(iParam0), 0, 3, 4, -697.75f, 45.38f, 43.03f, 206, "", 94, 16, "epsilonTract", 0, 0, -1, 4, 1, 0, 2359, func_191(iParam0), 1, 0);
			break;
		
		case 17:
			func_190(uParam1, "Extreme1", func_192(iParam0), 0, 4, 4, -188.22f, 1296.1f, 302.86f, 66, "", -1, 0, "", 4, 1, 18, 4, 2, 0, 2359, func_191(iParam0), 0, 1);
			break;
		
		case 18:
			func_190(uParam1, "Extreme2", func_192(iParam0), 0, 4, 4, -954.19f, -2760.05f, 14.64f, 382, "", 96, 0, "", 171, 0, 19, 4, 2, 0, 2359, func_191(iParam0), 0, 1);
			break;
		
		case 19:
			func_190(uParam1, "Extreme3", func_192(iParam0), 0, 4, 4, -63.8f, -809.5f, 321.8f, 382, "", 97, 0, "", 0, 0, 20, 4, 2, 0, 2359, func_191(iParam0), 0, 1);
			break;
		
		case 20:
			func_190(uParam1, "Extreme4", func_192(iParam0), 0, 4, 4, 1731.41f, 96.96f, 170.39f, 382, "", 98, 16, "", 0, 0, -1, 4, 2, 0, 2359, func_191(iParam0), 0, 0);
			break;
		
		case 21:
			func_190(uParam1, "Fanatic1", func_192(iParam0), 0, 5, 4, -1877.82f, -440.649f, 45.05f, 405, "", 74, 0, "", 0, 1, -1, 4, 1, 700, 2000, func_191(iParam0), 1, 0);
			break;
		
		case 22:
			func_190(uParam1, "Fanatic2", func_192(iParam0), 0, 5, 4, 809.66f, 1279.76f, 360.49f, 405, "", -1, 0, "", 0, 1, -1, 4, 4, 700, 2000, func_191(iParam0), 1, 0);
			break;
		
		case 23:
			func_190(uParam1, "Fanatic3", func_192(iParam0), 0, 5, 4, -915.6f, 6139.2f, 5.5f, 405, "", -1, 0, "", 0, 1, -1, 4, 2, 700, 2000, func_191(iParam0), 0, 1);
			break;
		
		case 24:
			func_190(uParam1, "Hao1", func_192(iParam0), 0, 6, 4, -72.29f, -1260.63f, 28.14f, 66, "", -1, 0, "controller_Races", 13, 1, -1, 4, 2, 2000, 500, func_191(iParam0), 0, 1);
			break;
		
		case 25:
			func_190(uParam1, "Hunting1", func_192(iParam0), 0, 7, 4, 1804.32f, 3931.33f, 32.82f, 66, "", -1, 0, "", 174, 1, 26, 4, 4, 0, 2359, func_191(iParam0), 0, 1);
			break;
		
		case 26:
			func_190(uParam1, "Hunting2", func_192(iParam0), 0, 7, 4, -684.17f, 5839.16f, 16.09f, 384, "", 99, 0, "", 7, 0, -1, 4, 4, 0, 2359, func_191(iParam0), 0, 1);
			break;
		
		case 27:
			func_190(uParam1, "Josh1", func_192(iParam0), 0, 8, 4, -1104.93f, 291.25f, 64.3f, 66, "", -1, 0, "forSaleSigns", 0, 1, 28, 4, 4, 0, 2359, func_191(iParam0), 1, 0);
			break;
		
		case 28:
			func_190(uParam1, "Josh2", func_192(iParam0), 0, 8, 4, 565.39f, -1772.88f, 29.77f, 385, "", 105, 0, "", 0, 0, 29, 4, 4, 0, 2359, func_191(iParam0), 1, 1);
			break;
		
		case 29:
			func_190(uParam1, "Josh3", func_192(iParam0), 0, 8, 4, 565.39f, -1772.88f, 29.77f, 385, "", -1, 16, "", 0, 0, 30, 4, 4, 0, 2359, func_191(iParam0), 1, 1);
			break;
		
		case 30:
			func_190(uParam1, "Josh4", func_192(iParam0), 0, 8, 4, -1104.93f, 291.25f, 64.3f, 385, "", -1, 36, "", 0, 0, -1, 4, 4, 0, 2359, func_191(iParam0), 1, 0);
			break;
		
		case 31:
			func_190(uParam1, "Maude1", func_192(iParam0), 0, 9, 4, 2726.1f, 4145f, 44.3f, 66, "", -1, 0, "BailBond_Launcher", 0, 1, -1, 4, 4, 0, 2359, func_191(iParam0), 0, 1);
			break;
		
		case 32:
			func_190(uParam1, "Minute1", func_192(iParam0), 0, 10, 4, 327.85f, 3405.7f, 35.73f, 66, "", -1, 0, "", 0, 1, 33, 4, 4, 0, 2359, func_191(iParam0), 0, 1);
			break;
		
		case 33:
			func_190(uParam1, "Minute2", func_192(iParam0), 0, 10, 4, 18f, 4527f, 105f, 386, "", -1, 10, "", 0, 0, 34, 4, 4, 0, 2359, func_191(iParam0), 0, 1);
			break;
		
		case 34:
			func_190(uParam1, "Minute3", func_192(iParam0), 0, 10, 4, -303.82f, 6211.29f, 31.05f, 386, "", -1, 10, "", 0, 0, -1, 4, 4, 0, 2359, func_191(iParam0), 0, 1);
			break;
		
		case 35:
			func_190(uParam1, "MrsPhilips1", func_192(iParam0), 0, 11, 4, 1972.59f, 3816.43f, 32.42f, 66, "", -1, 0, "ambient_MrsPhilips", 0, 1, -1, 4, 4, 0, 2359, func_191(iParam0), 0, 0);
			break;
		
		case 36:
			func_190(uParam1, "MrsPhilips2", func_192(iParam0), 0, 11, 4, 0f, 0f, 0f, -1, "", -1, 0, "", 0, 1, -1, 4, 4, 0, 2359, func_191(iParam0), 0, 0);
			break;
		
		case 37:
			func_190(uParam1, "Nigel1", func_192(iParam0), 0, 12, 4, -1097.16f, 790.01f, 164.52f, 66, "", -1, 0, "", 177, 1, -1, 1, 4, 0, 2359, func_191(iParam0), 1, 0);
			break;
		
		case 38:
			func_190(uParam1, "Nigel1A", func_192(iParam0), 0, 12, 1, -558.65f, 284.49f, 90.86f, 149, "NIGITEMS", 100, 0, "", 0, 0, 42, 4, 4, 0, 2359, func_191(iParam0), 1, 1);
			break;
		
		case 39:
			func_190(uParam1, "Nigel1B", func_192(iParam0), 0, 12, 1, -1034.15f, 366.08f, 80.11f, 149, "", 100, 0, "", 0, 0, 42, 4, 4, 700, 2000, func_191(iParam0), 1, 1);
			break;
		
		case 40:
			func_190(uParam1, "Nigel1C", func_192(iParam0), 0, 12, 1, -623.91f, -266.17f, 37.76f, 149, "", 100, 0, "", 0, 0, 42, 4, 4, 700, 2000, func_191(iParam0), 1, 1);
			break;
		
		case 41:
			func_190(uParam1, "Nigel1D", func_192(iParam0), 0, 12, 1, -1096.85f, 67.68f, 52.95f, 149, "", 100, 0, "", 0, 0, 42, 4, 4, 700, 2000, func_191(iParam0), 1, 1);
			break;
		
		case 42:
			func_190(uParam1, "Nigel2", func_192(iParam0), 0, 12, 4, -1310.7f, -640.22f, 26.54f, 149, "", -1, 8, "", 0, 0, 43, 4, 4, 0, 2359, func_191(iParam0), 1, 1);
			break;
		
		case 43:
			func_190(uParam1, "Nigel3", func_192(iParam0), 0, 12, 4, -44.75f, -1288.67f, 28.21f, 149, "", -1, 16, "postRC_Nigel3", 0, 0, -1, 4, 4, 0, 2359, func_191(iParam0), 1, 1);
			break;
		
		case 44:
			func_190(uParam1, "Omega1", func_192(iParam0), 0, 13, 4, 2468.51f, 3437.39f, 49.9f, 66, "", -1, 0, "spaceshipParts", 0, 1, 45, 4, 2, 0, 2359, func_191(iParam0), 0, 0);
			break;
		
		case 45:
			func_190(uParam1, "Omega2", func_192(iParam0), 0, 13, 4, 2319.44f, 2583.58f, 46.76f, 387, "", 107, 0, "", 0, 0, -1, 4, 2, 0, 2359, func_191(iParam0), 0, 0);
			break;
		
		case 46:
			func_190(uParam1, "Paparazzo1", func_192(iParam0), 0, 14, 4, -149.75f, 285.81f, 93.67f, 66, "", -1, 0, "", 0, 1, 47, 4, 2, 0, 2359, func_191(iParam0), 0, 1);
			break;
		
		case 47:
			func_190(uParam1, "Paparazzo2", func_192(iParam0), 0, 14, 4, -70.71f, 301.43f, 106.79f, 389, "", -1, 8, "", 0, 0, 48, 4, 2, 0, 2359, func_191(iParam0), 0, 1);
			break;
		
		case 48:
			func_190(uParam1, "Paparazzo3", func_192(iParam0), 0, 14, 4, -257.22f, 292.85f, 90.63f, 389, "", -1, 8, "", 183, 1, -1, 2, 2, 0, 2359, func_191(iParam0), 0, 0);
			break;
		
		case 49:
			func_190(uParam1, "Paparazzo3A", func_192(iParam0), 0, 14, 2, 305.52f, 157.19f, 102.94f, 389, "PAPPHOTO", 102, 0, "", 0, 0, 51, 4, 2, 0, 2359, func_191(iParam0), 0, 1);
			break;
		
		case 50:
			func_190(uParam1, "Paparazzo3B", func_192(iParam0), 0, 14, 2, 1040.96f, -534.42f, 60.17f, 389, "", 102, 0, "", 0, 0, 51, 4, 2, 0, 2359, func_191(iParam0), 0, 1);
			break;
		
		case 51:
			func_190(uParam1, "Paparazzo4", func_192(iParam0), 0, 14, 4, -484.2f, 229.68f, 82.21f, 389, "", -1, 8, "", 0, 1, -1, 4, 2, 0, 2359, func_191(iParam0), 0, 0);
			break;
		
		case 52:
			func_190(uParam1, "Rampage1", func_192(iParam0), 0, 15, 4, 908f, 3643.7f, 32.2f, 66, "", -1, 0, "", 0, 1, 54, 4, 4, 0, 2359, func_191(iParam0), 0, 0);
			break;
		
		case 54:
			func_190(uParam1, "Rampage3", func_192(iParam0), 0, 15, 4, 465.1f, -1849.3f, 27.8f, 84, "", -1, 0, "", 0, 1, 55, 4, 4, 0, 2359, func_191(iParam0), 1, 0);
			break;
		
		case 55:
			func_190(uParam1, "Rampage4", func_192(iParam0), 0, 15, 4, -161f, -1669.7f, 33f, 84, "", -1, 0, "", 0, 0, 56, 4, 4, 0, 2359, func_191(iParam0), 1, 0);
			break;
		
		case 56:
			func_190(uParam1, "Rampage5", func_192(iParam0), 0, 15, 4, -1298.2f, 2504.14f, 21.09f, 84, "", -1, 0, "", 0, 0, 53, 4, 4, 0, 2359, func_191(iParam0), 0, 0);
			break;
		
		case 53:
			func_190(uParam1, "Rampage2", func_192(iParam0), 0, 15, 4, 1181.5f, -400.1f, 67.5f, 84, "", -1, 0, "rampage_controller", 0, 0, -1, 4, 4, 0, 2359, func_191(iParam0), 1, 0);
			break;
		
		case 57:
			func_190(uParam1, "TheLastOne", func_192(iParam0), 0, 16, 4, -1298.98f, 4640.16f, 105.67f, 66, "", 133, 1, "", 0, 1, -1, 4, 2, 0, 2359, func_191(iParam0), 0, 1);
			break;
		
		case 58:
			func_190(uParam1, "Tonya1", func_192(iParam0), 0, 17, 4, -14.39f, -1472.69f, 29.58f, 66, "AM_H_RCFS", -1, 0, "ambient_TonyaCall", 24, 1, 59, 4, 2, 0, 2359, func_191(iParam0), 0, 1);
			break;
		
		case 59:
			func_190(uParam1, "Tonya2", func_192(iParam0), 0, 17, 4, -14.39f, -1472.69f, 29.58f, 388, "", -1, 48, "ambient_Tonya", 185, 0, 60, 4, 2, 0, 2359, func_191(iParam0), 0, 1);
			break;
		
		case 60:
			func_190(uParam1, "Tonya3", func_192(iParam0), 0, 17, 4, 0f, 0f, 0f, -1, "", -1, 0, "", 187, 0, 61, 4, 2, 0, 2359, func_191(iParam0), 0, 1);
			break;
		
		case 61:
			func_190(uParam1, "Tonya4", func_192(iParam0), 0, 17, 4, 0f, 0f, 0f, -1, "", -1, 0, "", 0, 0, 62, 4, 2, 0, 2359, func_191(iParam0), 0, 1);
			break;
		
		case 62:
			func_190(uParam1, "Tonya5", func_192(iParam0), 0, 17, 4, -14.39f, -1472.69f, 29.58f, 388, "", -1, 48, "", 0, 0, -1, 4, 2, 0, 2359, func_191(iParam0), 0, 1);
			break;
		
		default:
			break;
	}
}

void func_190(var uParam0, char* sParam1, struct<2> Param2, int iParam4, int iParam5, int iParam6, vector3 vParam7, int iParam10, char* sParam11, int iParam12, int iParam13, char* sParam14, int iParam15, int iParam16, int iParam17, int iParam18, int iParam19, int iParam20, int iParam21, var uParam22, int iParam23, int iParam24)//Position - 0xF07A
{
	uParam0->f_4 = iParam5;
	*uParam0 = sParam1;
	uParam0->f_1 = { Param2 };
	uParam0->f_3 = iParam4;
	uParam0->f_5 = iParam6;
	uParam0->f_6 = { vParam7 };
	uParam0->f_9 = iParam10;
	StringCopy(&(uParam0->f_10), sParam11, 16);
	uParam0->f_14 = iParam12;
	uParam0->f_15 = iParam13;
	StringCopy(&(uParam0->f_16), sParam14, 24);
	uParam0->f_22 = iParam15;
	uParam0->f_23 = iParam16;
	uParam0->f_24 = iParam17;
	uParam0->f_25 = iParam18;
	uParam0->f_26 = iParam19;
	uParam0->f_27 = iParam20;
	uParam0->f_28 = iParam21;
	uParam0->f_29 = uParam22;
	uParam0->f_30 = iParam23;
	uParam0->f_31 = iParam24;
}

bool func_191(int iParam0)//Position - 0xF10B
{
	switch (iParam0)
	{
		case 0:
			return false;
			break;
		
		case 1:
			return false;
			break;
		
		case 2:
			return true;
			break;
		
		case 3:
			return true;
			break;
		
		case 4:
			return false;
			break;
		
		case 5:
			return true;
			break;
		
		case 6:
			return true;
			break;
		
		case 7:
			return false;
			break;
		
		case 8:
			return true;
			break;
		
		case 9:
			return false;
			break;
		
		case 10:
			return false;
			break;
		
		case 11:
			return false;
			break;
		
		case 12:
			return true;
			break;
		
		case 13:
			return false;
			break;
		
		case 14:
			return true;
			break;
		
		case 15:
			return false;
			break;
		
		case 16:
			return true;
			break;
		
		case 17:
			return true;
			break;
		
		case 18:
			return true;
			break;
		
		case 19:
			return true;
			break;
		
		case 20:
			return true;
			break;
		
		case 21:
			return true;
			break;
		
		case 22:
			return true;
			break;
		
		case 23:
			return true;
			break;
		
		case 24:
			return true;
			break;
		
		case 25:
			return true;
			break;
		
		case 26:
			return true;
			break;
		
		case 27:
			return false;
			break;
		
		case 28:
			return true;
			break;
		
		case 29:
			return true;
			break;
		
		case 30:
			return true;
			break;
		
		case 31:
			return false;
			break;
		
		case 32:
			return true;
			break;
		
		case 33:
			return true;
			break;
		
		case 34:
			return true;
			break;
		
		case 35:
			return false;
			break;
		
		case 36:
			return false;
			break;
		
		case 37:
			return false;
			break;
		
		case 38:
			return true;
			break;
		
		case 39:
			return true;
			break;
		
		case 40:
			return true;
			break;
		
		case 41:
			return true;
			break;
		
		case 42:
			return true;
			break;
		
		case 43:
			return true;
			break;
		
		case 44:
			return false;
			break;
		
		case 45:
			return false;
			break;
		
		case 46:
			return true;
			break;
		
		case 47:
			return true;
			break;
		
		case 48:
			return false;
			break;
		
		case 49:
			return true;
			break;
		
		case 50:
			return true;
			break;
		
		case 51:
			return true;
			break;
		
		case 52:
			return true;
			break;
		
		case 54:
			return true;
			break;
		
		case 55:
			return true;
			break;
		
		case 56:
			return true;
			break;
		
		case 53:
			return true;
			break;
		
		case 57:
			return true;
			break;
		
		case 58:
			return true;
			break;
		
		case 59:
			return true;
			break;
		
		case 60:
			return true;
			break;
		
		case 61:
			return true;
			break;
		
		case 62:
			return true;
			break;
		
		default:
			break;
	}
	return false;
}

struct<2> func_192(int iParam0)//Position - 0xF451
{
	struct<2> Var0;
	char[] cVar2[8];
	
	StringCopy(&Var0, "", 8);
	cVar2 = { func_187(iParam0) };
	if (gameplay::is_string_null_or_empty(&cVar2))
	{
	}
	else
	{
		StringCopy(&Var0, "RC_", 8);
		StringConCat(&Var0, &cVar2, 8);
	}
	return Var0;
}

int func_193(int iParam0)//Position - 0xF488
{
	switch (iParam0)
	{
		case 69:
		case 70:
			return func_194(Global_101652.f_8028.f_99.f_205[10]);
			break;
		
		case 74:
		case 75:
			return func_194(Global_101652.f_8028.f_99.f_205[8]);
			break;
		
		case 84:
		case 85:
			return func_194(Global_101652.f_8028.f_99.f_205[11]);
			break;
		
		case 90:
			return func_194(Global_101652.f_8028.f_99.f_205[7]);
			break;
		
		case 93:
			return func_194(Global_101652.f_8028.f_99.f_205[9]);
			break;
	}
	return 0;
}

int func_194(int iParam0)//Position - 0xF544
{
	switch (iParam0)
	{
		case 1:
		case 3:
		case 5:
		case 6:
		case 8:
			return 0;
			break;
		
		case 2:
		case 4:
		case 7:
		case 9:
			return 1;
			break;
	}
	return -1;
}

int func_195(char* sParam0, int iParam1)//Position - 0xF598
{
	int iVar0;
	int iVar1;
	
	iVar0 = gameplay::get_hash_key(sParam0);
	iVar1 = func_196(iVar0, 1);
	if (iVar1 == -1 && !iParam1)
	{
	}
	return iVar1;
}

int func_196(int iParam0, int iParam1)//Position - 0xF5C2
{
	int iVar0;
	
	iVar0 = 0;
	while (iVar0 < 94)
	{
		if (Global_82607[iVar0 /*34*/].f_6 == iParam0)
		{
			return iVar0;
		}
		iVar0++;
	}
	if (!iParam1)
	{
	}
	return -1;
}

void func_197(int iParam0)//Position - 0xF5F8
{
	int iVar0;
	int iVar1;
	
	iVar0 = 0;
	iVar1 = 0;
	iVar0 = 0;
	while (iVar0 < 3)
	{
		iVar1 = 0;
		while (iVar1 < 11)
		{
			Global_101652.f_19507.f_233[iVar0 /*69*/].f_2[iVar1 /*6*/].f_3 = Global_101652.f_19507.f_233[iVar0 /*69*/].f_2[iVar1 /*6*/];
			Global_101652.f_19507.f_233[iVar0 /*69*/].f_2[iVar1 /*6*/].f_4 = Global_101652.f_19507.f_233[iVar0 /*69*/].f_2[iVar1 /*6*/].f_1;
			Global_101652.f_19507.f_233[iVar0 /*69*/].f_2[iVar1 /*6*/].f_5 = Global_101652.f_19507.f_233[iVar0 /*69*/].f_2[iVar1 /*6*/].f_2;
			iVar1++;
		}
		iVar0++;
	}
	iVar0 = 0;
	while (iVar0 < 10)
	{
		Global_53000[iVar0 /*3*/][0] = Global_101652.f_19507[iVar0];
		Global_53000.f_31[iVar0 /*3*/][0] = Global_101652.f_19507.f_11[iVar0];
		Global_53000.f_62[iVar0 /*3*/][0] = Global_101652.f_19507.f_22[iVar0];
		Global_53000.f_93[iVar0 /*3*/][0] = Global_101652.f_19507.f_33[iVar0];
		Global_53000.f_124[iVar0 /*3*/][0] = Global_101652.f_19507.f_44[iVar0];
		Global_53000.f_155[iVar0 /*3*/][0] = Global_101652.f_19507.f_55[iVar0];
		Global_53000.f_186[iVar0 /*3*/][0] = Global_101652.f_19507.f_66[iVar0];
		Global_53000.f_217[iVar0 /*3*/][0] = Global_101652.f_19507.f_77[iVar0];
		Global_53000.f_248[iVar0 /*3*/][0] = Global_101652.f_19507.f_88[iVar0];
		if (!iParam0)
		{
			Global_53000[iVar0 /*3*/][1] = Global_101652.f_19507[iVar0];
			Global_53000.f_31[iVar0 /*3*/][1] = Global_101652.f_19507.f_11[iVar0];
			Global_53000.f_62[iVar0 /*3*/][1] = Global_101652.f_19507.f_22[iVar0];
			Global_53000.f_93[iVar0 /*3*/][1] = Global_101652.f_19507.f_33[iVar0];
			Global_53000.f_124[iVar0 /*3*/][1] = Global_101652.f_19507.f_44[iVar0];
			Global_53000.f_155[iVar0 /*3*/][1] = Global_101652.f_19507.f_55[iVar0];
			Global_53000.f_186[iVar0 /*3*/][1] = Global_101652.f_19507.f_66[iVar0];
			Global_53000.f_217[iVar0 /*3*/][1] = Global_101652.f_19507.f_77[iVar0];
			Global_53000.f_248[iVar0 /*3*/][1] = Global_101652.f_19507.f_88[iVar0];
		}
		iVar0++;
	}
}

void func_198(int iParam0, int iParam1, int iParam2)//Position - 0xF87A
{
	if (func_244() && func_35())
	{
		while (Global_91481 != 6)
		{
			system::wait(0);
		}
		gameplay::set_game_paused(false);
		if (entity::does_entity_exist(player::player_ped_id()))
		{
			if (!ped::is_ped_injured(player::player_ped_id()))
			{
				ped::clear_ped_wetness(player::player_ped_id());
			}
		}
		if (iParam0 != 0)
		{
			if (!ped::is_ped_injured(player::player_ped_id()))
			{
				if (entity::does_entity_exist(iParam0))
				{
					if (vehicle::is_vehicle_driveable(iParam0, 0))
					{
						if (!ped::is_ped_in_vehicle(player::player_ped_id(), iParam0, 0))
						{
							ped::set_ped_into_vehicle(player::player_ped_id(), iParam0, iParam1);
							cam::set_gameplay_cam_relative_pitch(0f, 1065353216);
							cam::set_gameplay_cam_relative_heading(0f);
							system::wait(0);
						}
					}
				}
			}
		}
		if (iParam2 == 1)
		{
			if (player::is_player_playing(player::player_id()))
			{
				player::set_player_control(player::player_id(), true, 0);
			}
		}
		graphics::_stop_all_screen_effects();
		func_199(0);
	}
}

void func_199(int iParam0)//Position - 0xF93E
{
	if (iParam0 == 1)
	{
		gameplay::set_bit(&(Global_91486.f_20), 13);
	}
	else
	{
		gameplay::clear_bit(&(Global_91486.f_20), 13);
	}
}

void func_200()//Position - 0xF967
{
	if (gameplay::get_distance_between_coords(entity::get_entity_coords(player::player_ped_id(), 1), vLocal_314, 1) < 500f)
	{
		if (iLocal_214 == 0)
		{
			if (!entity::does_entity_exist(iLocal_51[0]))
			{
				streaming::request_model(joaat("sandking"));
				if (streaming::has_model_loaded(joaat("sandking")))
				{
					iLocal_51[0] = vehicle::create_vehicle(joaat("sandking"), 1754.951f, 3290.994f, 40.1176f, 182.397f, 1, true);
					entity::freeze_entity_position(iLocal_51[0], true);
					streaming::set_model_as_no_longer_needed(joaat("sandking"));
				}
			}
			if (entity::does_entity_exist(iLocal_51[0]))
			{
				iLocal_214 = 1;
			}
		}
	}
	else if (iLocal_214 == 1)
	{
		if (gameplay::get_distance_between_coords(entity::get_entity_coords(player::player_ped_id(), 1), vLocal_314, 1) > 550f)
		{
			if (entity::does_entity_exist(iLocal_51[0]))
			{
				vehicle::delete_vehicle(&(iLocal_51[0]));
			}
			iLocal_214 = 0;
		}
	}
}

void func_201()//Position - 0xFA36
{
	if (iLocal_175 > 0)
	{
		func_108();
		func_207();
		func_200();
		if (player::get_player_wanted_level(player::player_id()) != 4)
		{
			player::set_player_wanted_level(player::player_id(), 4, 0);
			player::set_player_wanted_level_now(player::player_id(), 0);
		}
		func_206();
		func_205();
		iLocal_176 = 0;
		while (iLocal_176 <= 12)
		{
			if (!ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_48, 0))
			{
				func_204(iLocal_33[iLocal_176], &(Local_70[iLocal_176 /*8*/]), -1, 0, 0, 0, -1082130432, 0, -1, -1, 1);
			}
			else
			{
				func_107(&(Local_70[iLocal_176 /*8*/]));
			}
			iLocal_176++;
		}
	}
	if (iLocal_175 == 0)
	{
		if (iLocal_196 == 1)
		{
			iLocal_197 = 0;
			func_33();
			iLocal_196 = 0;
		}
		iLocal_199 = 0;
		iLocal_202[0] = 0;
		iLocal_202[1] = 0;
		iLocal_205 = 0;
		iLocal_206[0] = 0;
		iLocal_206[1] = 0;
		iLocal_209 = 0;
		iLocal_214 = 0;
		iLocal_215[0] = 0;
		iLocal_273 = 0;
		iLocal_274 = 0;
		iLocal_295 = 0;
		iLocal_296 = 0;
		iLocal_297 = 0;
		iLocal_298 = 0;
		iLocal_299 = 0;
		iLocal_300 = 0;
		iLocal_183 = gameplay::get_game_timer();
		iLocal_188 = gameplay::get_game_timer();
		if (entity::does_entity_exist(iLocal_48))
		{
			entity::freeze_entity_position(iLocal_48, false);
		}
		func_134(1, "STAGE_ESCAPE_MILITARY", 0, 0, 0, 1);
		if (cam::is_screen_faded_out())
		{
			if (!func_35())
			{
				streaming::load_scene(entity::get_entity_coords(player::player_ped_id(), 1));
			}
			func_198(iLocal_48, -1, 1);
		}
		if (!cam::is_screen_faded_in())
		{
			cam::do_screen_fade_in(800);
		}
		if (!audio::is_audio_scene_active("DH_P_2B_ENTER_CHOPPER"))
		{
			audio::start_audio_scene("DH_P_2B_ENTER_CHOPPER");
		}
		if (!audio::is_audio_scene_active("DH_P_2B_ENEMY_CHOPPERS_ARRIVE"))
		{
			audio::start_audio_scene("DH_P_2B_ENEMY_CHOPPERS_ARRIVE");
		}
		func_203(602, 0);
		player::set_police_radar_blips(0);
		if (entity::does_entity_exist(iLocal_48))
		{
			if (vehicle::is_vehicle_driveable(iLocal_48, 0))
			{
				func_202(iLocal_48, -1);
			}
		}
		unk1::_0x293220DA1B46CEBC(10f, 5f, 4);
		iLocal_197 = 1;
		iLocal_175 = 1;
	}
	if (iLocal_175 == 1)
	{
		if (iLocal_206[0] == 1)
		{
			if (ui::does_blip_exist(uLocal_63[0]))
			{
				ui::remove_blip(&(uLocal_63[0]));
			}
			if (entity::does_entity_exist(iLocal_49[0]))
			{
				audio::_0x18EB48CFC41F2EA0(iLocal_49[0], 0f);
			}
			if (audio::is_audio_scene_active("DH_P_2B_ENEMY_CHOPPERS_ARRIVE"))
			{
				audio::stop_audio_scene("DH_P_2B_ENEMY_CHOPPERS_ARRIVE");
			}
			func_117(1, 602);
			func_203(600, 0);
			if (entity::does_entity_exist(iLocal_48))
			{
				if (vehicle::is_vehicle_driveable(iLocal_48, 0))
				{
					if (entity::is_entity_in_angled_area(iLocal_48, 1721.001f, 3264.248f, 38.40064f, 1765.509f, 3276.518f, 46.05385f, 48.25f, 0, true, 0))
					{
						if (ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_48, 0))
						{
							player::set_player_wanted_level(player::player_id(), 0, 0);
							player::set_player_wanted_level_now(player::player_id(), 0);
							iLocal_175 = 0;
							iLocal_28 = 5;
						}
						else
						{
							player::set_player_wanted_level(player::player_id(), 0, 0);
							player::set_player_wanted_level_now(player::player_id(), 0);
							func_29();
						}
					}
					else
					{
						iLocal_175 = 0;
						iLocal_28 = 4;
					}
				}
			}
		}
		else if (iLocal_209 == 0)
		{
			if (entity::does_entity_exist(iLocal_48))
			{
				if (vehicle::is_vehicle_driveable(iLocal_48, 0))
				{
					if (ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_48, 0))
					{
						if (gameplay::get_game_timer() > iLocal_183 + 10000)
						{
							if (!ui::is_message_being_displayed())
							{
								func_113("DP_GOD5", 7500, 1);
								iLocal_209 = 1;
							}
						}
					}
				}
			}
		}
	}
}

void func_202(int iParam0, int iParam1)//Position - 0xFD18
{
	Global_55829 = iParam0;
	Global_55830 = iParam1;
}

void func_203(int iParam0, int iParam1)//Position - 0xFD2A
{
	int iVar0;
	
	Global_55828 = iParam0;
	if (!Global_55826)
	{
		Global_55826 = 1;
	}
	if (iParam1)
	{
		iVar0 = 0;
		while (iVar0 < Global_67913)
		{
			if (Global_67914[iVar0 /*9*/] == iParam0)
			{
				Global_67914[iVar0 /*9*/].f_1 = 0;
			}
			iVar0++;
		}
	}
}

bool func_204(int iParam0, var uParam1, int iParam2, int iParam3, int iParam4, int iParam5, float fParam6, char* sParam7, int iParam8, int iParam9, int iParam10)//Position - 0xFD74
{
	if (iParam3 == 0)
	{
		iParam3 = player::get_player_index();
	}
	if (fParam6 < 0f)
	{
		fParam6 = 100f;
	}
	if (!ped::is_ped_injured(iParam0))
	{
		if (!ui::does_ped_have_ai_blip(iParam0))
		{
			if (iParam8 == -1)
			{
				ui::_0xD30C50DF888D58B5(iParam0, 1);
			}
			else
			{
				unk_0xB13DCB4C6FAAD238(iParam0, 1, iParam8);
			}
			uParam1->f_7 = iParam0;
			ui::_0xE52B8E7F85D39A08(iParam0, iParam2);
			ui::_0x97C65887D4B37FA9(iParam0, fParam6);
			if (ui::does_blip_exist(*uParam1))
			{
				ui::set_blip_priority(*uParam1, 7);
			}
		}
		if (!iParam9 == -1)
		{
			unk_0xFCFACD0DB9D7A57D(iParam0, iParam9);
		}
		ui::_0x0C4BBF625CA98C4E(iParam0, iParam4);
		ui::hide_special_ability_lockon_operation(iParam0, iParam5);
		*uParam1 = ui::_0x7CD934010E115C2C(iParam0);
		if (!iParam9 == -1)
		{
			if (ui::does_blip_exist(*uParam1))
			{
				if (!iParam8 == -1)
				{
					ui::set_blip_colour(*uParam1, iParam8);
				}
				ui::begin_text_command_set_blip_name("STRING");
				if (iParam10)
				{
					ui::add_text_component_substring_player_name(sParam7);
				}
				else
				{
					ui::_add_text_component_item_string(sParam7);
				}
				ui::end_text_command_set_blip_name(*uParam1);
				ui::set_blip_priority(*uParam1, 7);
			}
		}
		if (!gameplay::is_bit_set(uParam1->f_6, 2))
		{
			if (ui::does_blip_exist(*uParam1))
			{
				if (!gameplay::is_string_null_or_empty(sParam7))
				{
					ui::begin_text_command_set_blip_name("STRING");
					if (iParam10)
					{
						ui::add_text_component_substring_player_name(sParam7);
					}
					else
					{
						ui::_add_text_component_item_string(sParam7);
					}
					ui::end_text_command_set_blip_name(*uParam1);
				}
				gameplay::set_bit(&(uParam1->f_6), 2);
			}
		}
		if (ped::is_ped_in_any_vehicle(iParam0, 0))
		{
			uParam1->f_1 = ui::_0x56176892826A4FE8(iParam0);
			if (!gameplay::is_bit_set(uParam1->f_6, 3))
			{
				if (ui::does_blip_exist(uParam1->f_1))
				{
					ui::set_blip_priority(uParam1->f_1, 7);
					gameplay::set_bit(&(uParam1->f_6), 3);
				}
			}
		}
		else if (ui::does_blip_exist(uParam1->f_1))
		{
			uParam1->f_1 = 0;
			gameplay::clear_bit(&(uParam1->f_6), 3);
		}
	}
	else
	{
		return true;
	}
	return false;
}

void func_205()//Position - 0xFF11
{
	iLocal_53 = vehicle::get_closest_vehicle(entity::get_entity_coords(player::player_ped_id(), 1), 300f, joaat("lazer"), 4);
	iLocal_54 = vehicle::get_closest_vehicle(entity::get_entity_coords(player::player_ped_id(), 1), 300f, joaat("lazer"), 16386);
	if (entity::does_entity_exist(iLocal_53) && entity::is_entity_in_air(iLocal_53))
	{
		if (!ui::does_blip_exist(iLocal_65))
		{
			iLocal_65 = ui::add_blip_for_entity(iLocal_53);
			ui::set_blip_as_friendly(iLocal_65, false);
		}
	}
	if (entity::does_entity_exist(iLocal_54) && entity::is_entity_in_air(iLocal_54))
	{
		if (!ui::does_blip_exist(iLocal_66))
		{
			iLocal_66 = ui::add_blip_for_entity(iLocal_54);
			ui::set_blip_as_friendly(iLocal_66, false);
		}
	}
}

void func_206()//Position - 0xFFA9
{
	if (iLocal_28 == 3)
	{
		if (entity::does_entity_exist(iLocal_48))
		{
			if (vehicle::is_vehicle_driveable(iLocal_48, 0))
			{
				if (ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_48, 0))
				{
					vLocal_320 = { entity::get_entity_coords(player::player_ped_id(), 1) };
					if (entity::does_entity_exist(iLocal_49[0]))
					{
						if (vehicle::is_vehicle_driveable(iLocal_49[0], 0))
						{
							if (entity::does_entity_exist(iLocal_31[0]))
							{
								if (!ped::is_ped_injured(iLocal_31[0]))
								{
									if (func_2(player::player_ped_id(), iLocal_31[0], 1) < 600f)
									{
										if (gameplay::get_distance_between_coords(vLocal_320, -75.8f, -819.9f, 326f, 1) > 1600f && gameplay::get_distance_between_coords(vLocal_320, -2159f, 3067f, 33f, 1) < 1000f)
										{
											if (vLocal_320.y > 70f)
											{
												if (iLocal_30 != 2)
												{
													iLocal_215[0] = 1;
													iLocal_30 = 2;
												}
											}
											else if (iLocal_30 != 1)
											{
												iLocal_215[0] = 1;
												iLocal_30 = 1;
											}
											if (iLocal_273 == 1)
											{
												if (iLocal_274 == 0)
												{
													if (!func_114())
													{
														if (!ui::is_message_being_displayed() || !ui::is_subtitle_preference_switched_on())
														{
															func_133(&uLocal_403, 4, 0, "PilotDispatch", 0, 1);
															func_133(&uLocal_403, 5, 0, "PilotDispatch2", 0, 1);
															if (func_132(&uLocal_403, "DP2BAUD", "DP2B_CHAT54", 7, 0, 0, 0))
															{
																iLocal_274 = 1;
															}
														}
													}
												}
											}
										}
										else
										{
											if (gameplay::get_distance_between_coords(vLocal_320, -75.8f, -819.9f, 326f, 1) < 1600f)
											{
												if (iLocal_30 != 3)
												{
													iLocal_215[0] = 1;
													iLocal_30 = 3;
												}
												if (iLocal_273 == 0)
												{
													if (!func_114())
													{
														if (!ui::is_message_being_displayed() || !ui::is_subtitle_preference_switched_on())
														{
															func_133(&uLocal_403, 4, 0, "PilotDispatch", 0, 1);
															func_133(&uLocal_403, 5, 0, "PilotDispatch2", 0, 1);
															if (func_132(&uLocal_403, "DP2BAUD", "DP2B_CHAT53", 7, 0, 0, 0))
															{
																iLocal_273 = 1;
															}
														}
													}
												}
											}
											if (gameplay::get_distance_between_coords(vLocal_320, -2159f, 3067f, 33f, 1) > 1000f)
											{
												if (iLocal_30 != 3)
												{
													iLocal_215[0] = 1;
													iLocal_30 = 3;
												}
											}
										}
									}
									else if (iLocal_30 != 4)
									{
										iLocal_215[0] = 1;
										iLocal_30 = 4;
									}
								}
							}
						}
					}
				}
				else if (gameplay::get_distance_between_coords(vLocal_320, -75.8f, -819.9f, 326f, 1) > 1600f)
				{
					if (iLocal_30 != 0)
					{
						iLocal_215[0] = 1;
						iLocal_30 = 0;
					}
					if (iLocal_273 == 1)
					{
						if (iLocal_274 == 0)
						{
							if (!func_114())
							{
								if (!ui::is_message_being_displayed() || !ui::is_subtitle_preference_switched_on())
								{
									func_133(&uLocal_403, 4, 0, "PilotDispatch", 0, 1);
									func_133(&uLocal_403, 5, 0, "PilotDispatch2", 0, 1);
									if (func_132(&uLocal_403, "DP2BAUD", "DP2B_CHAT54", 7, 0, 0, 0))
									{
										iLocal_274 = 1;
									}
								}
							}
						}
					}
				}
				else
				{
					if (iLocal_30 != 3)
					{
						iLocal_215[0] = 1;
						iLocal_30 = 3;
					}
					if (iLocal_273 == 0)
					{
						if (!func_114())
						{
							if (!ui::is_message_being_displayed() || !ui::is_subtitle_preference_switched_on())
							{
								func_133(&uLocal_403, 4, 0, "PilotDispatch", 0, 1);
								func_133(&uLocal_403, 5, 0, "PilotDispatch2", 0, 1);
								if (func_132(&uLocal_403, "DP2BAUD", "DP2B_CHAT53", 7, 0, 0, 0))
								{
									iLocal_273 = 1;
								}
							}
						}
					}
				}
			}
		}
	}
	if (iLocal_202[0] == 0)
	{
		if (iLocal_28 == 2)
		{
			if (entity::does_entity_exist(iLocal_49[0]))
			{
				if (vehicle::is_vehicle_driveable(iLocal_49[0], 0))
				{
					if (entity::does_entity_exist(iLocal_31[0]))
					{
						if (!ped::is_ped_injured(iLocal_31[0]))
						{
							if (func_2(player::player_ped_id(), iLocal_31[0], 1) < 200f)
							{
								vLocal_317 = { entity::get_entity_coords(iLocal_49[0], 1) };
								ai::clear_ped_tasks(iLocal_31[0]);
								ped::set_ped_sphere_defensive_area(iLocal_31[0], vLocal_317, 10f, 0, 0);
								ai::task_combat_hated_targets_around_ped(iLocal_31[0], 250f, 0);
								iLocal_202[0] = 1;
							}
						}
					}
				}
			}
		}
		if (iLocal_28 == 3)
		{
			if (entity::does_entity_exist(iLocal_49[0]))
			{
				if (vehicle::is_vehicle_driveable(iLocal_49[0], 0))
				{
					if (entity::does_entity_exist(iLocal_31[0]))
					{
						if (!ped::is_ped_injured(iLocal_31[0]))
						{
							if (!ui::does_blip_exist(uLocal_63[0]))
							{
								uLocal_63[0] = func_112(iLocal_31[0], 1, 0);
							}
							vLocal_317 = { entity::get_entity_coords(iLocal_49[0], 1) };
							ai::clear_ped_tasks(iLocal_31[0]);
							ai::open_sequence_task(&iLocal_572);
							if (!ped::is_ped_in_vehicle(iLocal_31[0], iLocal_49[0], 0))
							{
								ai::task_enter_vehicle(0, iLocal_49[0], 20000, -1, 2f, 1, 0);
							}
							ai::task_heli_mission(0, iLocal_49[0], 0, 0, vLocal_317.x, vLocal_317.y, (vLocal_317.y + 20f), 4, 30f, 10f, -1f, 170, 40, -1f, 0);
							ai::task_heli_mission(0, iLocal_49[0], 0, player::player_ped_id(), 0f, 0f, 0f, 6, 40f, 20f, -1f, 170, 40, -1f, 0);
							ai::close_sequence_task(iLocal_572);
							ai::task_perform_sequence(iLocal_31[0], iLocal_572);
							ai::clear_sequence_task(&iLocal_572);
							iLocal_202[0] = 1;
						}
					}
				}
			}
		}
	}
	else if (iLocal_28 == 3)
	{
		if (entity::does_entity_exist(iLocal_49[0]))
		{
			if (vehicle::is_vehicle_driveable(iLocal_49[0], 0))
			{
				if (entity::does_entity_exist(iLocal_31[0]))
				{
					if (!ped::is_ped_injured(iLocal_31[0]))
					{
						if (ped::is_ped_in_vehicle(iLocal_31[0], iLocal_49[0], 0))
						{
							if (gameplay::get_game_timer() > (iLocal_188 + 90000))
							{
								if (iLocal_297 == 0)
								{
									ped::set_ped_accuracy(iLocal_31[0], 100);
									iLocal_296 = 0;
									iLocal_297 = 1;
								}
							}
							else if (gameplay::get_game_timer() > iLocal_188 + 10000 && !ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_48, 0))
							{
								if (iLocal_297 == 0)
								{
									ped::set_ped_accuracy(iLocal_31[0], 100);
									iLocal_296 = 0;
									iLocal_297 = 1;
								}
							}
							else if (iLocal_296 == 0)
							{
								ped::set_ped_accuracy(iLocal_31[0], 0);
								iLocal_297 = 0;
								iLocal_296 = 1;
							}
							if (func_2(iLocal_49[0], player::player_ped_id(), 1) < 300f)
							{
								if (iLocal_299 == 0)
								{
									weapon::set_current_ped_vehicle_weapon(iLocal_31[0], joaat("vehicle_weapon_space_rocket"));
									ped::set_ped_firing_pattern(iLocal_31[0], -1857128337);
									iLocal_298 = 0;
									iLocal_299 = 1;
								}
							}
							else if (iLocal_298 == 0)
							{
								weapon::set_current_ped_vehicle_weapon(iLocal_31[0], joaat("vehicle_weapon_player_buzzard"));
								ped::set_ped_firing_pattern(iLocal_31[0], 1566631136);
								iLocal_299 = 0;
								iLocal_298 = 1;
							}
						}
					}
				}
			}
		}
		if (iLocal_205 == 0)
		{
			if (entity::does_entity_exist(iLocal_49[0]))
			{
				if (vehicle::is_vehicle_driveable(iLocal_49[0], 0))
				{
					if (entity::does_entity_exist(iLocal_31[0]))
					{
						if (!ped::is_ped_injured(iLocal_31[0]))
						{
							if (ped::is_ped_in_vehicle(iLocal_31[0], iLocal_49[0], 0))
							{
								ped::set_ped_accuracy(iLocal_31[0], 0);
								weapon::set_current_ped_vehicle_weapon(iLocal_31[0], joaat("vehicle_weapon_space_rocket"));
								iLocal_205 = 1;
							}
						}
					}
				}
			}
		}
		switch (iLocal_30)
		{
			case 0:
				if (iLocal_215[0] == 1)
				{
					if (entity::does_entity_exist(iLocal_49[0]))
					{
						if (vehicle::is_vehicle_driveable(iLocal_49[0], 0))
						{
							if (entity::does_entity_exist(iLocal_31[0]))
							{
								if (!ped::is_ped_injured(iLocal_31[0]))
								{
									ai::task_heli_mission(iLocal_31[0], iLocal_49[0], 0, player::player_ped_id(), 0f, 0f, 0f, 6, 20f, 20f, -1f, 15, 10, -1f, 0);
									iLocal_215[0] = 0;
								}
							}
						}
					}
				}
				break;
			
			case 1:
				if (iLocal_215[0] == 1)
				{
					if (entity::does_entity_exist(iLocal_49[0]))
					{
						if (vehicle::is_vehicle_driveable(iLocal_49[0], 0))
						{
							if (entity::does_entity_exist(iLocal_31[0]))
							{
								if (!ped::is_ped_injured(iLocal_31[0]))
								{
									ai::task_heli_mission(iLocal_31[0], iLocal_49[0], 0, player::player_ped_id(), 0f, 0f, 0f, 6, 40f, 20f, -1f, 50, 20, -1f, 0);
									iLocal_215[0] = 0;
								}
							}
						}
					}
				}
				break;
			
			case 2:
				if (iLocal_215[0] == 1)
				{
					if (entity::does_entity_exist(iLocal_49[0]))
					{
						if (vehicle::is_vehicle_driveable(iLocal_49[0], 0))
						{
							if (entity::does_entity_exist(iLocal_31[0]))
							{
								if (!ped::is_ped_injured(iLocal_31[0]))
								{
									ai::task_heli_mission(iLocal_31[0], iLocal_49[0], 0, player::player_ped_id(), 0f, 0f, 0f, 6, 40f, 20f, -1f, 170, 70, -1f, 0);
									iLocal_215[0] = 0;
								}
							}
						}
					}
				}
				break;
			
			case 3:
				if (iLocal_215[0] == 1)
				{
					if (entity::does_entity_exist(iLocal_49[0]))
					{
						if (vehicle::is_vehicle_driveable(iLocal_49[0], 0))
						{
							if (entity::does_entity_exist(iLocal_31[0]))
							{
								if (!ped::is_ped_injured(iLocal_31[0]))
								{
									ai::task_heli_mission(iLocal_31[0], iLocal_49[0], 0, 0, entity::get_offset_from_entity_in_world_coords(iLocal_49[0], 20f, 0f, 0f), 4, 10f, 10f, entity::get_entity_heading(iLocal_49[0]), system::round(entity::get_entity_height(iLocal_49[0], entity::get_entity_coords(iLocal_49[0], 1), 1, 1)), 100, -1f, 0);
									iLocal_215[0] = 0;
								}
							}
						}
					}
				}
				if (iLocal_295 == 0)
				{
					if (gameplay::get_distance_between_coords(vLocal_320, -2159f, 3067f, 33f, 1) > 1000f)
					{
						if (entity::does_entity_exist(iLocal_49[0]))
						{
							if (vehicle::is_vehicle_driveable(iLocal_49[0], 0))
							{
								if (entity::does_entity_exist(iLocal_31[0]))
								{
									if (!ped::is_ped_injured(iLocal_31[0]))
									{
										ai::task_heli_mission(iLocal_31[0], iLocal_49[0], 0, player::player_ped_id(), 0f, 0f, 0f, 6, 20f, 20f, -1f, 170, 70, -1f, 0);
										iLocal_295 = 1;
									}
								}
							}
						}
					}
				}
				break;
			
			case 4:
				if (iLocal_215[0] == 1)
				{
					if (entity::does_entity_exist(iLocal_49[0]))
					{
						if (vehicle::is_vehicle_driveable(iLocal_49[0], 0))
						{
							if (entity::does_entity_exist(iLocal_31[0]))
							{
								if (!ped::is_ped_injured(iLocal_31[0]))
								{
									ai::task_heli_mission(iLocal_31[0], iLocal_49[0], 0, player::player_ped_id(), 0f, 0f, 0f, 8, 40f, 50f, -1f, 200, 170, -1f, 0);
									iLocal_215[0] = 0;
								}
							}
						}
					}
				}
				break;
			}
	}
	if (entity::does_entity_exist(iLocal_31[0]))
	{
		if (ped::is_ped_injured(iLocal_31[0]))
		{
			if (ui::does_blip_exist(uLocal_63[0]))
			{
				ui::remove_blip(&(uLocal_63[0]));
			}
			iLocal_206[0] = 1;
		}
	}
	else
	{
		if (ui::does_blip_exist(uLocal_63[0]))
		{
			ui::remove_blip(&(uLocal_63[0]));
		}
		iLocal_206[0] = 1;
	}
	if (entity::does_entity_exist(iLocal_49[0]))
	{
		if (!vehicle::is_vehicle_driveable(iLocal_49[0], 0))
		{
			if (ui::does_blip_exist(uLocal_63[0]))
			{
				ui::remove_blip(&(uLocal_63[0]));
			}
			iLocal_206[0] = 1;
		}
	}
	else
	{
		if (ui::does_blip_exist(uLocal_63[0]))
		{
			ui::remove_blip(&(uLocal_63[0]));
		}
		iLocal_206[0] = 1;
	}
	if (entity::does_entity_exist(iLocal_49[0]))
	{
		if (vehicle::is_vehicle_driveable(iLocal_49[0], 0))
		{
			if (entity::does_entity_exist(iLocal_31[0]))
			{
				if (!ped::is_ped_injured(iLocal_31[0]))
				{
					if (ped::is_ped_in_vehicle(iLocal_31[0], iLocal_49[0], 0))
					{
						if (ui::does_blip_exist(uLocal_63[0]))
						{
							ui::set_blip_scale(uLocal_63[0], 1f);
						}
					}
					if (func_2(player::player_ped_id(), iLocal_31[0], 1) > 600f)
					{
						if (ui::does_blip_exist(uLocal_63[0]))
						{
							ui::remove_blip(&(uLocal_63[0]));
						}
						iLocal_206[0] = 1;
					}
				}
			}
		}
	}
	if (entity::does_entity_exist(iLocal_31[0]))
	{
		if (!ped::is_ped_injured(iLocal_31[0]))
		{
			if (entity::is_entity_in_water(iLocal_31[0]))
			{
				ai::clear_ped_tasks(iLocal_31[0]);
				entity::set_entity_health(iLocal_31[0], 0);
				if (ui::does_blip_exist(uLocal_63[0]))
				{
					ui::remove_blip(&(uLocal_63[0]));
				}
				iLocal_206[0] = 1;
			}
		}
	}
}

void func_207()//Position - 0x10AB5
{
	if (iLocal_210 == 0)
	{
		if ((((func_208(entity::get_entity_coords(player::player_ped_id(), 1), 3, 0, 0) || entity::is_entity_in_angled_area(player::player_ped_id(), -1601.514f, 2794.148f, 14.84222f, -1587.692f, 2806.101f, 20.29557f, 16f, 0, true, 0)) || entity::is_entity_in_angled_area(player::player_ped_id(), -1598.278f, 2803.98f, 17.01772f, -1665.98f, 2895.398f, 34.58953f, 14.5f, 0, true, 0)) || entity::is_entity_in_angled_area(player::player_ped_id(), -1648.554f, 2873.74f, 24.85017f, -1673.864f, 2889.698f, 38.18856f, 14.5f, 0, true, 0)) || entity::is_entity_in_angled_area(player::player_ped_id(), -1647.446f, 2873.969f, 24.82373f, -1667.316f, 2914.302f, 39.39478f, 14.5f, 0, true, 0))
		{
			iLocal_210 = 1;
		}
	}
	if (iLocal_210 == 1)
	{
		if ((((!func_208(entity::get_entity_coords(player::player_ped_id(), 1), 3, 0, 0) && !entity::is_entity_in_angled_area(player::player_ped_id(), -1601.514f, 2794.148f, 14.84222f, -1587.692f, 2806.101f, 20.29557f, 16f, 0, true, 0)) && !entity::is_entity_in_angled_area(player::player_ped_id(), -1598.278f, 2803.98f, 17.01772f, -1665.98f, 2895.398f, 34.58953f, 14.5f, 0, true, 0)) && !entity::is_entity_in_angled_area(player::player_ped_id(), -1648.554f, 2873.74f, 24.85017f, -1673.864f, 2889.698f, 38.18856f, 14.5f, 0, true, 0)) && !entity::is_entity_in_angled_area(player::player_ped_id(), -1647.446f, 2873.969f, 24.82373f, -1667.316f, 2914.302f, 39.39478f, 14.5f, 0, true, 0))
		{
			iLocal_210 = 0;
		}
	}
	if (iLocal_201 == 1)
	{
		if (((iLocal_210 == 1 || iLocal_289 == 1) || iLocal_302 == 1) || iLocal_211 == 1)
		{
			if (player::get_player_wanted_level(player::player_id()) != 4)
			{
				player::set_player_wanted_level(player::player_id(), 4, 0);
				player::set_player_wanted_level_now(player::player_id(), 0);
			}
			iLocal_176 = 0;
			while (iLocal_176 <= 12)
			{
				if (entity::does_entity_exist(iLocal_33[iLocal_176]))
				{
					if (!ped::is_ped_injured(iLocal_33[iLocal_176]))
					{
						if (entity::does_entity_exist(iLocal_48))
						{
							if (vehicle::is_vehicle_driveable(iLocal_48, 0))
							{
								if (ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_48, 0) || iLocal_212 == 1)
								{
									if (func_2(player::player_ped_id(), iLocal_33[iLocal_176], 1) < 39f)
									{
										if (iLocal_217[iLocal_176] == 0)
										{
											ai::clear_ped_tasks(iLocal_33[iLocal_176]);
											ped::set_ped_sphere_defensive_area(iLocal_33[iLocal_176], entity::get_entity_coords(iLocal_33[iLocal_176], 1), 50f, 0, 0);
											ai::task_combat_ped(iLocal_33[iLocal_176], player::player_ped_id(), 0, 16);
											ped::set_ped_combat_attributes(iLocal_33[iLocal_176], 51, true);
											ped::set_ped_combat_attributes(iLocal_33[iLocal_176], 43, true);
											iLocal_231[iLocal_176] = 0;
											iLocal_245[iLocal_176] = 0;
											iLocal_259[iLocal_176] = 0;
											iLocal_217[iLocal_176] = 1;
										}
									}
									else if (iLocal_231[iLocal_176] == 0)
									{
										ai::clear_ped_tasks(iLocal_33[iLocal_176]);
										ai::open_sequence_task(&iLocal_572);
										ai::task_follow_nav_mesh_to_coord(0, entity::get_entity_coords(iLocal_48, 1), 2f, -1, 20f, 0, 1193033728);
										ai::task_combat_ped(0, player::player_ped_id(), 0, 16);
										ai::close_sequence_task(iLocal_572);
										ai::task_perform_sequence(iLocal_33[iLocal_176], iLocal_572);
										ai::clear_sequence_task(&iLocal_572);
										iLocal_245[iLocal_176] = 0;
										iLocal_259[iLocal_176] = 0;
										iLocal_217[iLocal_176] = 0;
										iLocal_231[iLocal_176] = 1;
									}
								}
								else
								{
									if (func_2(player::player_ped_id(), iLocal_33[iLocal_176], 1) < 39f)
									{
										if (iLocal_245[iLocal_176] == 0)
										{
											ai::clear_ped_tasks(iLocal_33[iLocal_176]);
											ped::set_ped_sphere_defensive_area(iLocal_33[iLocal_176], entity::get_entity_coords(iLocal_33[iLocal_176], 1), 50f, 0, 0);
											ai::task_combat_ped(iLocal_33[iLocal_176], player::player_ped_id(), 0, 16);
											ped::set_ped_combat_attributes(iLocal_33[iLocal_176], 51, true);
											ped::set_ped_combat_attributes(iLocal_33[iLocal_176], 43, true);
											iLocal_231[iLocal_176] = 0;
											iLocal_259[iLocal_176] = 0;
											iLocal_217[iLocal_176] = 0;
											iLocal_245[iLocal_176] = 1;
										}
									}
									if (func_2(player::player_ped_id(), iLocal_33[iLocal_176], 1) > 41f && func_2(player::player_ped_id(), iLocal_33[iLocal_176], 1) < 400f)
									{
										if (iLocal_259[iLocal_176] == 0)
										{
											iLocal_195 = gameplay::get_random_int_in_range(0, 4);
											ai::clear_ped_tasks(iLocal_33[iLocal_176]);
											ped::set_ped_sphere_defensive_area(iLocal_33[iLocal_176], entity::get_entity_coords(iLocal_33[iLocal_176], 1), 50f, 0, 0);
											ai::open_sequence_task(&iLocal_572);
											if (iLocal_195 == 0)
											{
												ai::task_go_to_entity(0, player::player_ped_id(), -1, 25f, 2f, 1073741824, 0);
											}
											else if (iLocal_195 == 1)
											{
												ai::task_stand_still(0, 500);
												ai::task_go_to_entity(0, player::player_ped_id(), -1, 25f, 2f, 1073741824, 0);
											}
											else if (iLocal_195 == 2)
											{
												ai::task_go_to_entity(0, player::player_ped_id(), -1, 25f, 3f, 1073741824, 0);
											}
											else if (iLocal_195 == 3)
											{
												ai::task_stand_still(0, 500);
												ai::task_go_to_entity(0, player::player_ped_id(), -1, 25f, 3f, 1073741824, 0);
											}
											ai::close_sequence_task(iLocal_572);
											ai::task_perform_sequence(iLocal_33[iLocal_176], iLocal_572);
											ai::clear_sequence_task(&iLocal_572);
											iLocal_231[iLocal_176] = 0;
											iLocal_245[iLocal_176] = 0;
											iLocal_217[iLocal_176] = 0;
											iLocal_259[iLocal_176] = 1;
										}
									}
								}
							}
						}
					}
				}
				iLocal_176++;
			}
		}
		if (((iLocal_210 == 0 && iLocal_289 == 0) && iLocal_302 == 0) && iLocal_211 == 0)
		{
			iLocal_193 = 0;
			while (iLocal_193 <= 1)
			{
				if (entity::does_entity_exist(iLocal_33[iLocal_193]))
				{
					if (!ped::is_ped_injured(iLocal_33[iLocal_193]))
					{
						if (func_2(iLocal_33[iLocal_193], player::player_ped_id(), 1) < 25f)
						{
							if (iLocal_292[iLocal_193] == 0)
							{
								if (!entity::is_entity_on_screen(iLocal_33[iLocal_193]))
								{
									ai::clear_ped_tasks_immediately(iLocal_33[iLocal_193]);
								}
								else
								{
									ai::clear_ped_tasks(iLocal_33[iLocal_193]);
								}
								ai::task_aim_gun_at_entity(iLocal_33[iLocal_193], player::player_ped_id(), -1, 0);
								iLocal_292[iLocal_193] = 1;
							}
							if (iLocal_303 == 1)
							{
								if (gameplay::get_game_timer() > iLocal_191 + 20000)
								{
									iLocal_302 = 1;
								}
							}
						}
						else if (func_2(iLocal_33[iLocal_193], player::player_ped_id(), 1) > 30f)
						{
							if (iLocal_292[iLocal_193] == 1)
							{
								if (!entity::is_entity_on_screen(iLocal_33[iLocal_193]))
								{
									ai::clear_ped_tasks_immediately(iLocal_33[iLocal_193]);
								}
								else
								{
									ai::clear_ped_tasks(iLocal_33[iLocal_193]);
								}
								ai::task_aim_gun_at_entity(iLocal_33[iLocal_193], player::player_ped_id(), 1, 0);
								iLocal_292[iLocal_193] = 0;
							}
						}
					}
				}
				iLocal_193++;
			}
		}
	}
}

bool func_208(vector3 vParam0, int iParam3, int iParam4, int iParam5)//Position - 0x1113F
{
	vector3 vVar0[15];
	vector3 vVar46[15];
	float fVar92[15];
	int iVar108;
	int iVar109;
	int iVar110;
	int iVar111;
	
	iVar110 = 0;
	switch (iParam3)
	{
		case 1:
			vVar0[0 /*3*/] = { -1332.211f, 100.4608f, 40.38437f };
			vVar46[0 /*3*/] = { -1094.238f, 148.4274f, 73f };
			fVar92[0] = 171.25f;
			vVar0[1 /*3*/] = { -999.7344f, -110.2231f, 25.25706f };
			vVar46[1 /*3*/] = { -1149.494f, 109.2558f, 73f };
			fVar92[1] = 132f;
			vVar0[2 /*3*/] = { -1035.113f, -84.95885f, 28.2746f };
			vVar46[2 /*3*/] = { -1261.103f, 50.08148f, 73f };
			fVar92[2] = 132f;
			iVar108 = 3;
			break;
		
		case 2:
			vVar0[0 /*3*/] = { -804.3439f, -3346.5f, 10f };
			vVar46[0 /*3*/] = { -1816.954f, -2768.893f, IntToFloat((250 + iParam4)) };
			fVar92[0] = 247f;
			vVar0[1 /*3*/] = { -1911.488f, -2934.197f, 10f };
			vVar46[1 /*3*/] = { -968.6236f, -3477.748f, IntToFloat((250 + iParam4)) };
			fVar92[1] = 149f;
			vVar0[2 /*3*/] = { -844.9433f, -2802.785f, 10f };
			vVar46[2 /*3*/] = { -1011.081f, -3086.904f, IntToFloat((250 + iParam4)) };
			fVar92[2] = 185.5f;
			vVar0[3 /*3*/] = { -1021.086f, -2952.277f, 10f };
			vVar46[3 /*3*/] = { -1599.008f, -2616.271f, IntToFloat((250 + iParam4)) };
			fVar92[3] = 250f;
			vVar0[4 /*3*/] = { -1027.136f, -2436.457f, 10f };
			vVar46[4 /*3*/] = { -1392.61f, -2226.763f, IntToFloat((250 + iParam4)) };
			fVar92[4] = 193.5f;
			vVar0[5 /*3*/] = { -1497.549f, -2408.712f, 10f };
			vVar46[5 /*3*/] = { -1136.917f, -2617.955f, IntToFloat((250 + iParam4)) };
			fVar92[5] = 234.5f;
			vVar0[6 /*3*/] = { -982.7924f, -2831.709f, 12.93313f };
			vVar46[6 /*3*/] = { -966.4677f, -2803.458f, 16.68313f };
			fVar92[6] = 16f;
			vVar0[7 /*3*/] = { -1110.083f, -3496.806f, 12f };
			vVar46[7 /*3*/] = { -1955.298f, -3010.431f, IntToFloat((250 + iParam4)) };
			fVar92[7] = 80f;
			vVar0[8 /*3*/] = { -1886.899f, -3193.024f, 12f };
			vVar46[8 /*3*/] = { -1836.143f, -3105.268f, IntToFloat((250 + iParam4)) };
			fVar92[8] = 142f;
			vVar0[9 /*3*/] = { -1134.337f, -3535.648f, 12f };
			vVar46[9 /*3*/] = { -1259.649f, -3463.486f, IntToFloat((250 + iParam4)) };
			fVar92[9] = 30.75f;
			vVar0[10 /*3*/] = { -969.1279f, -3463.899f, 12f };
			vVar46[10 /*3*/] = { -896.3734f, -3505.715f, IntToFloat((250 + iParam4)) };
			fVar92[10] = 150f;
			vVar0[11 /*3*/] = { -1369.491f, -2173.579f, 10f };
			vVar46[11 /*3*/] = { -1685.626f, -2720.364f, IntToFloat((250 + iParam4)) };
			fVar92[11] = 29.25f;
			vVar0[12 /*3*/] = { -1010.926f, -3550.943f, 10f };
			vVar46[12 /*3*/] = { -1110.198f, -3493.617f, IntToFloat((250 + iParam4)) };
			fVar92[12] = 43f;
			iVar108 = 13;
			break;
		
		case 3:
			vVar0[0 /*3*/] = { -1773.944f, 3287.334f, 30f };
			vVar46[0 /*3*/] = { -2029.776f, 2845.083f, IntToFloat((250 + iParam4)) };
			fVar92[0] = 250f;
			vVar0[1 /*3*/] = { -2725.889f, 3291.099f, 30f };
			vVar46[1 /*3*/] = { -2009.182f, 2879.835f, IntToFloat((250 + iParam4)) };
			fVar92[1] = 180f;
			vVar0[2 /*3*/] = { -2442.026f, 3326.699f, 30f };
			vVar46[2 /*3*/] = { -2033.928f, 3089.049f, IntToFloat((250 + iParam4)) };
			fVar92[2] = 200f;
			vVar0[3 /*3*/] = { -1917.165f, 3374.209f, 30f };
			vVar46[3 /*3*/] = { -2016.791f, 3195.058f, IntToFloat((250 + iParam4)) };
			fVar92[3] = 86.25f;
			vVar0[4 /*3*/] = { -2192.753f, 3373.278f, 30f };
			vVar46[4 /*3*/] = { -2191.544f, 3150.417f, IntToFloat((250 + iParam4)) };
			fVar92[4] = 140.5f;
			vVar0[5 /*3*/] = { -2077.663f, 3344.514f, 30f };
			vVar46[5 /*3*/] = { -2191.544f, 3150.417f, IntToFloat((250 + iParam4)) };
			fVar92[5] = 140.5f;
			vVar0[6 /*3*/] = { -2861.755f, 3352.661f, 30f };
			vVar46[6 /*3*/] = { -2715.871f, 3269.916f, IntToFloat((250 + iParam4)) };
			fVar92[6] = 90f;
			vVar0[7 /*3*/] = { -2005.574f, 3364.533f, 30f };
			vVar46[7 /*3*/] = { -1977.569f, 3330.888f, IntToFloat((250 + iParam4)) };
			fVar92[7] = 100f;
			vVar0[8 /*3*/] = { -1682.235f, 3004.285f, 30f };
			vVar46[8 /*3*/] = { -1942.747f, 2947.441f, IntToFloat((250 + iParam4)) };
			fVar92[8] = 248.75f;
			vVar0[9 /*3*/] = { -2393.295f, 2936.406f, 31.6801f };
			vVar46[9 /*3*/] = { -2453.037f, 3006.863f, 52.31003f };
			fVar92[9] = 128f;
			vVar0[10 /*3*/] = { -2347.185f, 3023.83f, 31.56573f };
			vVar46[10 /*3*/] = { -2517.33f, 2989.063f, 49.95644f };
			fVar92[10] = 127.25f;
			vVar0[11 /*3*/] = { -2259.922f, 3358.04f, 29.99972f };
			vVar46[11 /*3*/] = { -2299.772f, 3385.79f, 38.06014f };
			fVar92[11] = 16f;
			vVar0[12 /*3*/] = { -2476.309f, 3363.914f, 31.67933f };
			vVar46[12 /*3*/] = { -2431.981f, 3287.669f, 39.97826f };
			fVar92[12] = 214.25f;
			vVar0[13 /*3*/] = { -2103.081f, 2797.783f, 29.37864f };
			vVar46[13 /*3*/] = { -2096.821f, 2874.423f, 57.80989f };
			fVar92[13] = 65.75f;
			if (iParam5)
			{
				iVar111 = iParam4;
			}
			else
			{
				iVar111 = 0;
			}
			vVar46[9 /*3*/].f_2 = (vVar46[9 /*3*/].f_2 + IntToFloat(iVar111));
			vVar46[10 /*3*/].f_2 = (vVar46[10 /*3*/].f_2 + IntToFloat(iVar111));
			vVar46[11 /*3*/].f_2 = (vVar46[11 /*3*/].f_2 + IntToFloat(iVar111));
			vVar46[12 /*3*/].f_2 = (vVar46[12 /*3*/].f_2 + IntToFloat(iVar111));
			vVar46[13 /*3*/].f_2 = (vVar46[13 /*3*/].f_2 + IntToFloat(iVar111));
			iVar108 = 14;
			break;
		
		case 4:
			vVar0[0 /*3*/] = { 1541.607f, 2527.555f, 40f };
			vVar46[0 /*3*/] = { 1815.575f, 2535.06f, IntToFloat((150 + iParam4)) };
			fVar92[0] = 114f;
			vVar0[1 /*3*/] = { 1788.879f, 2445.727f, 40f };
			vVar46[1 /*3*/] = { 1716.96f, 2502.957f, IntToFloat((150 + iParam4)) };
			fVar92[1] = 88.5f;
			vVar0[2 /*3*/] = { 1601.157f, 2436.244f, 40f };
			vVar46[2 /*3*/] = { 1650.078f, 2515.923f, IntToFloat((150 + iParam4)) };
			fVar92[2] = 133.25f;
			vVar0[3 /*3*/] = { 1706.331f, 2407.597f, 40f };
			vVar46[3 /*3*/] = { 1698.555f, 2460.208f, IntToFloat((150 + iParam4)) };
			fVar92[3] = 104.5f;
			vVar0[4 /*3*/] = { 1712.452f, 2756.218f, 40f };
			vVar46[4 /*3*/] = { 1718.848f, 2589.162f, IntToFloat((150 + iParam4)) };
			fVar92[4] = 121.75f;
			vVar0[5 /*3*/] = { 1830.228f, 2661.24f, 40f };
			vVar46[5 /*3*/] = { 1774.812f, 2679.419f, IntToFloat((150 + iParam4)) };
			fVar92[5] = 84.5f;
			vVar0[6 /*3*/] = { 1559.05f, 2632.22f, 40f };
			vVar46[6 /*3*/] = { 1657.208f, 2595.484f, IntToFloat((150 + iParam4)) };
			fVar92[6] = 103.75f;
			vVar0[7 /*3*/] = { 1612.021f, 2716.869f, 40f };
			vVar46[7 /*3*/] = { 1657.165f, 2669.721f, IntToFloat((150 + iParam4)) };
			fVar92[7] = 104.25f;
			vVar0[8 /*3*/] = { 1809.872f, 2729.827f, 40f };
			vVar46[8 /*3*/] = { 1789.855f, 2705.037f, IntToFloat((150 + iParam4)) };
			fVar92[8] = 91f;
			vVar0[9 /*3*/] = { 1818.789f, 2605.948f, 40f };
			vVar46[9 /*3*/] = { 1783.114f, 2606.783f, IntToFloat((150 + iParam4)) };
			fVar92[9] = 51.25f;
			iVar108 = 10;
			break;
		
		case 5:
			vVar0[0 /*3*/] = { 3411.002f, 3663.185f, 20f };
			vVar46[0 /*3*/] = { 3615.583f, 3626.194f, IntToFloat((40 + iParam4)) };
			fVar92[0] = 45.75f;
			vVar0[1 /*3*/] = { 3426.66f, 3733.078f, 20f };
			vVar46[1 /*3*/] = { 3643.801f, 3694.362f, IntToFloat((40 + iParam4)) };
			fVar92[1] = 99f;
			vVar0[2 /*3*/] = { 3446.036f, 3795.688f, 20f };
			vVar46[2 /*3*/] = { 3650.914f, 3766.152f, IntToFloat((40 + iParam4)) };
			fVar92[2] = 81.5f;
			iVar108 = 3;
			break;
		
		case 6:
			vVar0[0 /*3*/] = { 526.053f, -3391.497f, -10f };
			vVar46[0 /*3*/] = { 523.2289f, -3118.678f, IntToFloat((10 + iParam4)) };
			fVar92[0] = 120f;
			vVar0[1 /*3*/] = { 459.4397f, -3199.99f, 4.819676f };
			vVar46[1 /*3*/] = { 593.8928f, -3199.998f, 30.06926f };
			fVar92[1] = 170f;
			vVar0[2 /*3*/] = { 552.8467f, -3111.054f, 4.819394f };
			vVar46[2 /*3*/] = { 585.3137f, -3111.844f, 17.56923f };
			fVar92[2] = 12.5f;
			vVar0[3 /*3*/] = { 598.4666f, -3140.147f, 4.819257f };
			vVar46[3 /*3*/] = { 597.4973f, -3117.063f, 17.31926f };
			fVar92[3] = 9.75f;
			iVar108 = 4;
			break;
		
		case 7:
			vVar0[0 /*3*/] = { -1108.55f, -570.8798f, 20f };
			vVar46[0 /*3*/] = { -1187.811f, -477.5037f, IntToFloat((50 + iParam4)) };
			fVar92[0] = 162f;
			vVar0[1 /*3*/] = { -1201.378f, -485.9673f, 20f };
			vVar46[1 /*3*/] = { -1215.796f, -464.8281f, IntToFloat((50 + iParam4)) };
			fVar92[1] = 124f;
			vVar0[2 /*3*/] = { -985.6311f, -525.4233f, 20f };
			vVar46[2 /*3*/] = { -1013.393f, -475.2057f, IntToFloat((50 + iParam4)) };
			fVar92[2] = 55f;
			vVar0[3 /*3*/] = { -1055.849f, -477.8226f, 20f };
			vVar46[3 /*3*/] = { -1073.333f, -498.717f, IntToFloat((50 + iParam4)) };
			fVar92[3] = 142f;
			iVar108 = 4;
			break;
		
		case 8:
			vVar0[0 /*3*/] = { 461.5684f, -984.572f, 29.43951f };
			vVar46[0 /*3*/] = { 471.17f, -984.4292f, 40.14212f };
			fVar92[0] = 7.75f;
			vVar0[1 /*3*/] = { 457.3404f, -984.756f, 34.43951f };
			vVar46[1 /*3*/] = { 457.2084f, -993.7189f, 29.38958f };
			fVar92[1] = 14.75f;
			vVar0[2 /*3*/] = { 477.6227f, -986.6f, 40.00819f };
			vVar46[2 /*3*/] = { 424.8687f, -986.3279f, 48.71241f };
			fVar92[2] = 31.5f;
			vVar0[3 /*3*/] = { 474.3889f, -974.4613f, 39.55761f };
			vVar46[3 /*3*/] = { 474.0358f, -1021.972f, 49.10033f };
			fVar92[3] = 30.5f;
			vVar0[4 /*3*/] = { 442.1768f, -974.1888f, 29.68951f };
			vVar46[4 /*3*/] = { 442.1855f, -979.8635f, 33.43951f };
			fVar92[4] = 6.75f;
			iVar108 = 5;
			break;
	}
	iVar109 = 0;
	while (iVar109 < iVar108)
	{
		if (object::is_point_in_angled_area(vParam0, vVar0[iVar109 /*3*/], vVar46[iVar109 /*3*/], fVar92[iVar109], iVar110, true))
		{
			return true;
		}
		iVar109++;
	}
	return false;
}

void func_209()//Position - 0x11E93
{
	if (iLocal_175 > 0)
	{
		func_108();
		func_207();
		func_206();
	}
	if (iLocal_175 == 0)
	{
		if (iLocal_196 == 1)
		{
			iLocal_197 = 0;
			func_33();
			iLocal_196 = 0;
		}
		iLocal_198 = 0;
		iLocal_201 = 0;
		iLocal_202[0] = 0;
		iLocal_202[1] = 0;
		iLocal_210 = 0;
		iLocal_211 = 0;
		iLocal_212 = 0;
		iLocal_290 = 0;
		iLocal_291 = 0;
		iLocal_292[0] = 0;
		iLocal_292[1] = 0;
		iLocal_302 = 0;
		iLocal_303 = 0;
		iLocal_306 = 0;
		iLocal_307 = 0;
		iLocal_310 = 0;
		iLocal_191 = 0;
		iLocal_176 = 0;
		while (iLocal_176 <= 12)
		{
			iLocal_217[iLocal_176] = 0;
			iLocal_231[iLocal_176] = 0;
			iLocal_245[iLocal_176] = 0;
			iLocal_259[iLocal_176] = 0;
			iLocal_176++;
		}
		player::set_player_wanted_level(player::player_id(), 0, 0);
		player::set_player_wanted_level_now(player::player_id(), 0);
		audio::prepare_alarm("PORT_OF_LS_HEIST_FORT_ZANCUDO_ALARMS");
		iLocal_182 = gameplay::get_game_timer();
		vehicle::set_vehicle_model_is_suppressed(joaat("lazer"), true);
		streaming::request_model(joaat("s_m_y_marine_01"));
		streaming::request_model(joaat("s_m_m_pilot_02"));
		if (!entity::does_entity_exist(iLocal_48))
		{
			if (entity::does_entity_exist(Global_88316[0]))
			{
				if (vehicle::is_vehicle_driveable(Global_88316[0], 0))
				{
					entity::set_entity_as_mission_entity(Global_88316[0], true, 1);
					iLocal_48 = Global_88316[0];
					vehicle::set_vehicle_can_be_targetted(iLocal_48, 0);
					entity::set_entity_load_collision_flag(iLocal_48, true);
					streaming::set_model_as_no_longer_needed(joaat("cargobob"));
					vehicle::set_vehicle_model_is_suppressed(joaat("cargobob"), true);
					vehicle::set_vehicle_engine_can_degrade(iLocal_48, false);
					vehicle::set_vehicle_strong(iLocal_48, true);
					func_92(iLocal_48, 0);
				}
			}
		}
		if (!entity::does_entity_exist(iLocal_49[0]))
		{
			if (entity::does_entity_exist(Global_88316[1]))
			{
				if (vehicle::is_vehicle_driveable(Global_88316[1], 0))
				{
					entity::set_entity_as_mission_entity(Global_88316[1], true, 1);
					iLocal_49[0] = Global_88316[1];
					vehicle::set_vehicle_can_be_targetted(iLocal_49[0], 1);
					entity::set_entity_load_collision_flag(iLocal_49[0], true);
					entity::freeze_entity_position(iLocal_49[0], false);
					audio::_0x153973AB99FE8980(iLocal_49[0], "DH_P_2B_ENEMY_CHOPPERS", 0f);
					vehicle::set_vehicle_is_considered_by_player(iLocal_49[0], 0);
				}
			}
		}
		if (entity::does_entity_exist(Global_88316[2]))
		{
			if (vehicle::is_vehicle_driveable(Global_88316[2], 0))
			{
				if (vehicle::is_this_model_a_heli(entity::get_entity_model(Global_88316[2])))
				{
					entity::set_entity_as_mission_entity(Global_88316[2], true, 1);
					func_217(1734.799f, 3234.833f, 40.7041f, 321.0399f, 0, 145);
				}
				if (((vehicle::is_this_model_a_car(entity::get_entity_model(Global_88316[2])) || vehicle::is_this_model_a_bike(entity::get_entity_model(Global_88316[2]))) || vehicle::is_this_model_a_bicycle(entity::get_entity_model(Global_88316[2]))) || vehicle::is_this_model_a_quadbike(entity::get_entity_model(Global_88316[2])))
				{
					entity::set_entity_as_mission_entity(Global_88316[2], true, 1);
					func_217(1748.05f, 3294.7f, 40.106f, 204.2419f, 0, 145);
				}
			}
		}
		if (entity::does_entity_exist(Global_88316.f_9[0]))
		{
			entity::set_entity_as_mission_entity(Global_88316.f_9[0], true, 1);
			iLocal_33[0] = Global_88316.f_9[0];
		}
		if (entity::does_entity_exist(Global_88316.f_9[1]))
		{
			entity::set_entity_as_mission_entity(Global_88316.f_9[1], true, 1);
			iLocal_33[1] = Global_88316.f_9[1];
		}
		if (entity::does_entity_exist(iLocal_48))
		{
			entity::freeze_entity_position(iLocal_48, false);
		}
		audio::set_audio_flag("PoliceScannerDisabled", 1);
		if (cam::is_screen_faded_out())
		{
			if (!func_35())
			{
				streaming::load_scene(entity::get_entity_coords(player::player_ped_id(), 1));
			}
			func_198(iLocal_55, -1, 1);
		}
		if (!cam::is_screen_faded_in())
		{
			cam::do_screen_fade_in(800);
		}
		func_216(player::player_ped_id(), -1);
		func_215(73);
		iLocal_197 = 1;
		iLocal_175 = 1;
	}
	if (iLocal_175 == 1)
	{
		if (ai::does_scenario_group_exist("ARMY_GUARD"))
		{
			if (ai::is_scenario_group_enabled("ARMY_GUARD"))
			{
				ai::set_scenario_group_enabled("ARMY_GUARD", false);
			}
		}
		func_89();
		if (iLocal_211 == 0)
		{
			if (gameplay::get_game_timer() > iLocal_182 + 3000)
			{
				iLocal_184 = 0;
				while (iLocal_184 <= 12)
				{
					if (entity::does_entity_exist(iLocal_33[iLocal_184]))
					{
						if (!ped::is_ped_injured(iLocal_33[iLocal_184]))
						{
							if (func_2(player::player_ped_id(), iLocal_33[iLocal_184], 1) < 40f)
							{
								if (ped::_0x6CD5A433374D4CFB(iLocal_33[iLocal_184], player::player_ped_id()))
								{
									if (ped::is_ped_jacking(player::player_ped_id()))
									{
										audio::start_alarm("PORT_OF_LS_HEIST_FORT_ZANCUDO_ALARMS", false);
										audio::set_ambient_zone_state("AZ_AFB_ALARM_SPEECH", 1, 1);
										iLocal_211 = 1;
									}
									if (iLocal_210 == 1)
									{
										audio::start_alarm("PORT_OF_LS_HEIST_FORT_ZANCUDO_ALARMS", false);
										audio::set_ambient_zone_state("AZ_AFB_ALARM_SPEECH", 1, 1);
										iLocal_211 = 1;
									}
									if (iLocal_307 == 0)
									{
										if (!ped::is_ped_in_any_vehicle(player::player_ped_id(), 0) && !func_214(0))
										{
											if (func_213(player::player_ped_id()) != joaat("weapon_unarmed"))
											{
												iLocal_194 = gameplay::get_game_timer();
												iLocal_307 = 1;
											}
										}
									}
									else if (!ped::is_ped_in_any_vehicle(player::player_ped_id(), 0) && !func_214(0))
									{
										if (func_213(player::player_ped_id()) != joaat("weapon_unarmed"))
										{
											if (gameplay::get_game_timer() > iLocal_194 + 3000)
											{
												audio::start_alarm("PORT_OF_LS_HEIST_FORT_ZANCUDO_ALARMS", false);
												audio::set_ambient_zone_state("AZ_AFB_ALARM_SPEECH", 1, 1);
												iLocal_211 = 1;
											}
										}
										else if (iLocal_306 == 0)
										{
											iLocal_307 = 0;
											iLocal_306 = 1;
										}
									}
								}
							}
						}
					}
					iLocal_184++;
				}
			}
		}
		if (iLocal_198 == 0)
		{
			ui::clear_prints();
			unk1::_0x293220DA1B46CEBC(5f, 10f, 4);
			func_113("DP_GOD2", 7500, 1);
			iLocal_198 = 1;
		}
		if (iLocal_210 == 1)
		{
			if (!func_212(5))
			{
				func_211(5);
			}
		}
		else if (func_212(5))
		{
			func_210(5);
		}
		if (entity::does_entity_exist(iLocal_48))
		{
			if (vehicle::is_vehicle_driveable(iLocal_48, 0))
			{
				if (func_2(player::player_ped_id(), iLocal_48, 1) < 30f)
				{
					iLocal_212 = 1;
				}
				if (ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_48, 0))
				{
					weapon::give_weapon_to_ped(player::player_ped_id(), joaat("gadget_parachute"), -1, false, true);
					iLocal_175 = 0;
					unk1::_0x293220DA1B46CEBC(10f, 10f, 4);
					iLocal_28 = 3;
				}
			}
		}
	}
}

void func_210(int iParam0)//Position - 0x123F7
{
	gameplay::clear_bit(&Global_87674, iParam0);
}

void func_211(int iParam0)//Position - 0x12409
{
	gameplay::set_bit(&Global_87674, iParam0);
}

int func_212(int iParam0)//Position - 0x1241B
{
	return gameplay::is_bit_set(Global_87674, iParam0);
}

var func_213(int iParam0)//Position - 0x1242D
{
	var uVar0;
	
	weapon::get_current_ped_weapon(iParam0, &uVar0, 1);
	return uVar0;
}

bool func_214(int iParam0)//Position - 0x12441
{
	if (iParam0 == 1)
	{
		if (Global_14443.f_1 > 3)
		{
			if (gameplay::is_bit_set(Global_2313, 14))
			{
				return true;
			}
			else
			{
				return false;
			}
		}
		else
		{
			return false;
		}
	}
	if (script::_get_number_of_instances_of_streamed_script(joaat("cellphone_flashhand")) > 0)
	{
		return true;
	}
	if (Global_14443.f_1 > 3)
	{
		return true;
	}
	return false;
}

void func_215(int iParam0)//Position - 0x1249B
{
	if (Global_88741 != -1)
	{
		if (iParam0 == Global_88741)
		{
			Global_88745 = 1;
			return;
		}
	}
}

void func_216(int iParam0, int iParam1)//Position - 0x124BF
{
	int iVar0;
	
	Global_55831 = iParam0;
	iVar0 = 0;
	while (iVar0 < Global_67913)
	{
		if (iParam1 == -1 || Global_67914[iVar0 /*9*/] == iParam1)
		{
			if (Global_67914[iVar0 /*9*/].f_6 != iParam0)
			{
				Global_67914[iVar0 /*9*/].f_6 = iParam0;
				Global_67914[iVar0 /*9*/].f_7 = 1;
				Global_67914[iVar0 /*9*/].f_8 = 0;
			}
		}
		iVar0++;
	}
}

void func_217(vector3 vParam0, float fParam3, int iParam4, int iParam5)//Position - 0x1252A
{
	vector3 vVar0;
	var uVar3;
	
	if (entity::does_entity_exist(Global_93588.f_4))
	{
		if (vehicle::is_vehicle_driveable(Global_93588.f_4, 0))
		{
			if (func_226(24) != Global_93588.f_4)
			{
				if (iParam4 == 1)
				{
					if (func_223(entity::get_entity_coords(Global_93588.f_4, 1), iParam5, &vVar0, &uVar3))
					{
						vParam0 = { vVar0 };
						fParam3 = uVar3;
					}
				}
				func_218(Global_93588.f_4, vParam0, fParam3, 24, 0);
			}
		}
	}
}

void func_218(int iParam0, vector3 vParam1, float fParam4, int iParam5, int iParam6)//Position - 0x125A5
{
	struct<60> Var0;
	
	if (entity::does_entity_exist(iParam0) && vehicle::is_vehicle_driveable(iParam0, 0))
	{
		if (iParam5 != 24 && iParam5 != 25)
		{
			return;
		}
		if (iParam5 == 24)
		{
			if (entity::does_entity_exist(Global_68526.f_484[25]) && vehicle::is_vehicle_driveable(Global_68526.f_484[25], 0))
			{
				if (Global_68526.f_484[25] == iParam0)
				{
					return;
				}
			}
		}
		if (!iParam6)
		{
			if ((vehicle::is_big_vehicle(iParam0) || entity::get_entity_model(iParam0) == joaat("bus")) || entity::get_entity_model(iParam0) == joaat("tourbus"))
			{
				return;
			}
		}
		func_222(iParam5);
		Var0.f_9 = 49;
		Var0.f_59 = 2;
		func_40(iParam0, &Var0);
		if (func_8(vParam1, 0f, 0f, 0f, 0))
		{
			vParam1 = { entity::get_entity_coords(iParam0, 1) };
			fParam4 = entity::get_entity_heading(iParam0);
		}
		if (iParam5 == 24)
		{
			if (gameplay::get_hash_key(script::get_this_script_name()) != joaat("vehicle_gen_controller"))
			{
				Global_69514 = gameplay::get_hash_key(script::get_this_script_name());
			}
		}
		func_220(iParam5, &Var0, vParam1, fParam4, func_59(iParam0));
		func_219(iParam5, iParam0, 0);
	}
}

void func_219(int iParam0, int iParam1, int iParam2)//Position - 0x126CE
{
	int iVar0;
	
	if (iParam0 == -1)
	{
		return;
	}
	if (!func_69(&(Global_68526.f_555[0 /*21*/]), iParam0))
	{
		return;
	}
	if (!gameplay::is_bit_set(Global_68526.f_555[0 /*21*/].f_9, 12) && !gameplay::is_bit_set(Global_68526.f_555[0 /*21*/].f_9, 10))
	{
		if (Global_68526.f_555[0 /*21*/].f_4 != entity::get_entity_model(iParam1))
		{
			return;
		}
	}
	if (Global_69433 != -1 && Global_69433 != iParam0)
	{
		return;
	}
	if (entity::does_entity_exist(iParam1))
	{
		if (vehicle::is_vehicle_driveable(iParam1, 0))
		{
			if (!entity::is_entity_a_mission_entity(iParam1))
			{
				entity::set_entity_as_mission_entity(iParam1, true, 1);
			}
			if (iParam0 == 24)
			{
				Global_101652.f_31373.f_4801 = func_175();
			}
			if (iParam1 != Global_68526.f_139[iParam0])
			{
				if (iParam0 == 24)
				{
					iVar0 = func_226(iParam0);
					if ((entity::does_entity_exist(iVar0) && vehicle::is_vehicle_driveable(iVar0, 0)) && iParam1 != iVar0)
					{
						func_39(iVar0, 145);
					}
				}
				Global_69432 = iParam1;
				Global_69433 = iParam0;
				Global_69434 = iParam2;
			}
		}
	}
}

void func_220(int iParam0, var uParam1, vector3 vParam2, float fParam5, int iParam6)//Position - 0x127EB
{
	if (func_69(&(Global_68526.f_555[0 /*21*/]), iParam0))
	{
		if (gameplay::is_bit_set(Global_68526.f_555[0 /*21*/].f_9, 10))
		{
			func_221(iParam0);
			func_66(uParam1, &(Global_101652.f_31373.f_69[Global_68526.f_555[0 /*21*/].f_14 /*78*/]));
			if (gameplay::is_bit_set(Global_68526.f_555[0 /*21*/].f_9, 11))
			{
				Global_101652.f_31373.f_1864[Global_68526.f_555[0 /*21*/].f_14 /*3*/] = { vParam2 };
				Global_101652.f_31373.f_1934[Global_68526.f_555[0 /*21*/].f_14] = fParam5;
			}
			else
			{
				Global_101652.f_31373.f_1864[Global_68526.f_555[0 /*21*/].f_14 /*3*/] = { 0f, 0f, 0f };
				Global_101652.f_31373.f_1934[Global_68526.f_555[0 /*21*/].f_14] = -1f;
			}
			Global_101652.f_31373.f_1958[Global_68526.f_555[0 /*21*/].f_14] = iParam6 + 1;
			func_62(iParam0, 1);
		}
	}
}

void func_221(int iParam0)//Position - 0x128EA
{
	if (iParam0 == -1)
	{
		return;
	}
	if (func_69(&(Global_68526.f_555[0 /*21*/]), iParam0))
	{
		if (entity::does_entity_exist(Global_68526.f_139[iParam0]))
		{
			entity::set_entity_as_mission_entity(Global_68526.f_139[iParam0], true, 1);
			entity::set_vehicle_as_no_longer_needed(&(Global_68526.f_139[iParam0]));
			Global_68526.f_139[iParam0] = 0;
		}
		if (gameplay::is_bit_set(Global_68526.f_555[0 /*21*/].f_9, 13))
		{
			func_62(iParam0, 0);
		}
	}
}

void func_222(int iParam0)//Position - 0x12964
{
	if (iParam0 != 24 && iParam0 != 25)
	{
	}
	func_221(iParam0);
	func_62(iParam0, 0);
}

bool func_223(vector3 vParam0, int iParam3, var uParam4, var uParam5)//Position - 0x1298B
{
	int iVar0;
	
	iVar0 = func_224(vParam0, iParam3, 1);
	switch (iVar0)
	{
		case 0:
			*uParam4 = { -827.351f, 157.785f, 68.2143f };
			*uParam5 = 85.1509f;
			return true;
			break;
		
		case 1:
		case 2:
			*uParam4 = { 1992.523f, 3813.916f, 31.1008f };
			*uParam5 = 122.1498f;
			return true;
			break;
		
		case 3:
			*uParam4 = { -1184.258f, -1496.556f, 3.3895f };
			*uParam5 = 303.2098f;
			return true;
			break;
		
		case 4:
			*uParam4 = { 118.1067f, -1325.906f, 28.3706f };
			*uParam5 = 123.5016f;
			return true;
			break;
		
		case 5:
			*uParam4 = { -18.118f, -1455.126f, 29.5004f };
			*uParam5 = 273.2822f;
			return true;
			break;
		
		case 6:
			*uParam4 = { 1.5947f, 543.4017f, 173.4644f };
			*uParam5 = 310.7556f;
			return true;
			break;
		
		default:
			break;
	}
	return false;
}

int func_224(vector3 vParam0, int iParam3, int iParam4)//Position - 0x12AA1
{
	int iVar0;
	float fVar1;
	float fVar2;
	int iVar3;
	
	fVar2 = 1000000f;
	iVar3 = 10;
	iVar0 = 0;
	while (iVar0 <= (10 - 1))
	{
		if (Global_86857[iVar0 /*10*/].f_7 != 263)
		{
			if (Global_86857[iVar0 /*10*/].f_9 == iParam3 || iParam3 == 145)
			{
				if (func_225(iVar0) || iParam4 == 0)
				{
					fVar1 = gameplay::get_distance_between_coords(vParam0, Global_86857[iVar0 /*10*/].f_3, 1);
					if (fVar1 < fVar2)
					{
						fVar2 = fVar1;
						iVar3 = iVar0;
					}
				}
			}
		}
		iVar0++;
	}
	return iVar3;
}

int func_225(int iParam0)//Position - 0x12B30
{
	return gameplay::is_bit_set(Global_101652.f_6172[iParam0], 0);
}

int func_226(int iParam0)//Position - 0x12B48
{
	if (iParam0 == -1)
	{
		return 0;
	}
	return Global_68526.f_139[iParam0];
}

void func_227()//Position - 0x12B64
{
	if (iLocal_175 == 0)
	{
		func_231(1, 0);
		func_231(2, 0);
		func_231(7, 0);
		func_231(8, 0);
		func_231(9, 0);
		func_231(10, 0);
		func_231(4, 0);
		func_231(12, 0);
		ped::add_relationship_group("MarineGroupHash", &iLocal_60);
		ped::set_relationship_between_groups(5, iLocal_60, 1862763509);
		ped::set_relationship_between_groups(5, -472287501, 1862763509);
		ped::set_relationship_between_groups(1, iLocal_60, -472287501);
		ped::set_relationship_between_groups(1, -472287501, iLocal_60);
		ped::set_relationship_between_groups(1, -1533126372, iLocal_60);
		ped::set_relationship_between_groups(1, iLocal_60, -1533126372);
		ped::set_relationship_between_groups(1, -1533126372, -472287501);
		ped::set_relationship_between_groups(1, -472287501, -1533126372);
		if (func_244())
		{
			if (Global_85996 == 1)
			{
				if (func_230() == 0)
				{
					func_229(vLocal_311, fLocal_323, 1, 0);
					iLocal_196 = 1;
					iLocal_175 = 0;
					iLocal_28 = 3;
				}
				if (func_230() == 1)
				{
					func_229(-629.1677f, 2871.31f, 385.0313f, 283.1214f, 1, 0);
					iLocal_196 = 1;
					iLocal_175 = 0;
					iLocal_28 = 4;
				}
				if (func_230() == 2)
				{
					func_228();
				}
			}
			else
			{
				if (func_230() == 0)
				{
					func_229(-1565.084f, 2780.813f, 16.4022f, 53.6086f, 1, 0);
					iLocal_196 = 1;
					iLocal_175 = 0;
					iLocal_28 = 2;
				}
				if (func_230() == 1)
				{
					func_229(vLocal_311, fLocal_323, 1, 0);
					iLocal_196 = 1;
					iLocal_175 = 0;
					iLocal_28 = 3;
				}
				if (func_230() == 2)
				{
					func_229(-629.1677f, 2871.31f, 385.0313f, 283.1214f, 1, 0);
					iLocal_196 = 1;
					iLocal_175 = 0;
					iLocal_28 = 4;
				}
			}
		}
		else if (func_27(0))
		{
			func_229(-1565.084f, 2780.813f, 16.4022f, 53.6086f, 1, 0);
			iLocal_196 = 1;
			iLocal_175 = 0;
			iLocal_28 = 2;
		}
		else
		{
			iLocal_175 = 0;
			iLocal_28 = 2;
		}
	}
}

void func_228()//Position - 0x12D2E
{
	iLocal_197 = 0;
	if (!cam::is_screen_faded_out())
	{
		cam::do_screen_fade_out(0);
	}
	entity::set_entity_coords(player::player_ped_id(), 1747.04f, 3267.456f, 40.246f, 1, false, 0, 1);
	entity::set_entity_heading(player::player_ped_id(), 229.0887f);
	if (entity::does_entity_exist(iLocal_48))
	{
		vehicle::delete_vehicle(&iLocal_48);
	}
	if (!entity::does_entity_exist(iLocal_48))
	{
		streaming::request_model(joaat("cargobob"));
		while (!streaming::has_model_loaded(joaat("cargobob")))
		{
			system::wait(0);
		}
		iLocal_48 = vehicle::create_vehicle(joaat("cargobob"), 1740.852f, 3263.161f, 40.2743f, 280.3712f, 1, true);
		vehicle::set_vehicle_door_shut(iLocal_48, 0, 1);
		vehicle::set_vehicle_door_shut(iLocal_48, 1, 1);
		vehicle::set_vehicle_doors_locked(iLocal_48, 2);
		vehicle::set_vehicle_strong(iLocal_48, true);
		entity::freeze_entity_position(iLocal_48, true);
		vehicle::set_vehicle_engine_can_degrade(iLocal_48, false);
		func_92(iLocal_48, 0);
	}
	if (cam::is_screen_faded_out())
	{
		streaming::load_scene(entity::get_entity_coords(player::player_ped_id(), 1));
	}
	cam::set_gameplay_cam_relative_heading(0f);
	if (!cam::is_screen_faded_in())
	{
		cam::do_screen_fade_in(800);
	}
	while (!cam::is_screen_faded_in())
	{
		cam::do_screen_fade_in(800);
		system::wait(0);
	}
	func_29();
}

void func_229(vector3 vParam0, float fParam3, int iParam4, int iParam5)//Position - 0x12E3C
{
	if (func_244())
	{
		gameplay::set_this_script_can_be_paused(0);
		gameplay::clear_bit(&(Global_91486.f_20), 2);
		gameplay::set_game_paused(true);
		if (player::is_player_playing(player::player_id()))
		{
			player::set_player_control(player::player_id(), false, 0);
		}
		Global_91482 = { vParam0 };
		Global_91485 = fParam3;
		Global_91481 = 1;
		if (iParam4 == 1)
		{
			gameplay::set_bit(&(Global_91486.f_20), 14);
		}
		else
		{
			gameplay::clear_bit(&(Global_91486.f_20), 14);
		}
		if (iParam5 == 1)
		{
			gameplay::set_bit(&(Global_91486.f_20), 24);
		}
		else
		{
			gameplay::clear_bit(&(Global_91486.f_20), 24);
		}
		func_199(1);
	}
}

int func_230()//Position - 0x12ED1
{
	if (!Global_91486 == 10 && !Global_91486 == 9)
	{
		return 0;
	}
	return Global_91486.f_2;
}

void func_231(int iParam0, int iParam1)//Position - 0x12EFB
{
	gameplay::_0x9B2BD3773123EA2F(iParam0, !iParam1);
	gameplay::_0xDC0F817884CDD856(iParam0, iParam1);
}

void func_232()//Position - 0x12F14
{
	if (!func_244())
	{
		if (iLocal_175 == 0)
		{
			iLocal_28 = 1;
		}
	}
	else
	{
		iLocal_175 = 0;
		iLocal_28 = 1;
	}
}

void func_233()//Position - 0x12F36
{
	if (entity::does_entity_exist(iLocal_48))
	{
		if (vehicle::is_vehicle_driveable(iLocal_48, 0))
		{
			if (!ped::is_ped_injured(player::player_ped_id()))
			{
				if (ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_48, 0))
				{
					if (ped::is_ped_sitting_in_vehicle(player::player_ped_id(), iLocal_48))
					{
						if (func_234(player::player_ped_id(), iLocal_48) == -1)
						{
							controls::disable_control_action(0, 114, 1);
						}
					}
				}
			}
		}
	}
}

int func_234(int iParam0, int iParam1)//Position - 0x12F8E
{
	if (!entity::is_entity_dead(iParam0, 0) && !entity::is_entity_dead(iParam1, 0))
	{
		if (ped::is_ped_sitting_in_vehicle(iParam0, iParam1))
		{
			if (vehicle::get_ped_in_vehicle_seat(iParam1, -1, 0) == iParam0)
			{
				return -1;
			}
			if (vehicle::get_ped_in_vehicle_seat(iParam1, 0, 0) == iParam0)
			{
				return 0;
			}
			if (vehicle::get_ped_in_vehicle_seat(iParam1, 1, 0) == iParam0)
			{
				return 1;
			}
			if (vehicle::get_ped_in_vehicle_seat(iParam1, 2, 0) == iParam0)
			{
				return 2;
			}
		}
	}
	return -2;
}

void func_235()//Position - 0x13000
{
	if (!ped::is_ped_injured(player::player_ped_id()))
	{
		if (iLocal_28 == 2 || iLocal_28 == 3)
		{
			if (func_208(entity::get_entity_coords(player::player_ped_id(), 1), 3, 200, 0) || iLocal_211 == 1)
			{
				player::_0xDC64D2C53493ED12(player::player_id());
				player::_0x4669B3ED80F24B4E(player::player_id());
			}
		}
		if (iLocal_28 == 4)
		{
			if (player::get_player_wanted_level(player::player_id()) != 0 && gameplay::get_distance_between_coords(entity::get_entity_coords(player::player_ped_id(), 1), vLocal_311, 1) > 1000f)
			{
				player::set_player_wanted_level(player::player_id(), 0, 0);
				player::set_player_wanted_level_now(player::player_id(), 0);
			}
		}
	}
}

void func_236()//Position - 0x13097
{
}

void func_237()//Position - 0x1309F
{
	if (iLocal_289 == 0)
	{
		iLocal_185 = 0;
		while (iLocal_185 <= 12)
		{
			if (entity::does_entity_exist(iLocal_33[iLocal_185]))
			{
				if (!ped::is_ped_injured(iLocal_33[iLocal_185]))
				{
					if (ped::_0x6CD5A433374D4CFB(iLocal_33[iLocal_185], player::player_ped_id()))
					{
						if (func_2(iLocal_33[iLocal_185], player::player_ped_id(), 1) < 40f)
						{
							if (ped::is_ped_shooting(player::player_ped_id()))
							{
								iLocal_289 = 1;
							}
						}
						if (func_2(iLocal_33[iLocal_185], player::player_ped_id(), 1) < 25f)
						{
							if (func_213(player::player_ped_id()) != joaat("weapon_unarmed"))
							{
								if (func_242(iLocal_33[iLocal_185], 6))
								{
									iLocal_289 = 1;
								}
							}
						}
					}
				}
			}
			iLocal_185++;
		}
	}
	if (iLocal_213 == 0)
	{
		if (func_20() == 2)
		{
			func_133(&uLocal_403, 2, player::player_ped_id(), "TREVOR", 0, 1);
			iLocal_213 = 1;
		}
	}
	if (iLocal_210 == 0)
	{
		iLocal_192 = 0;
		while (iLocal_192 <= 1)
		{
			if (entity::does_entity_exist(iLocal_33[iLocal_192]))
			{
				if (!ped::is_ped_injured(iLocal_33[iLocal_192]))
				{
					if (iLocal_290 == 0 && iLocal_291 == 0)
					{
						if (!func_114())
						{
							if (!ui::is_message_being_displayed() || !ui::is_subtitle_preference_switched_on())
							{
								if (func_2(player::player_ped_id(), iLocal_33[iLocal_192], 1) < 25f)
								{
									if (ped::_0x6CD5A433374D4CFB(iLocal_33[iLocal_192], player::player_ped_id()))
									{
										if (!ped::is_ped_in_any_vehicle(player::player_ped_id(), 0) && !func_214(0))
										{
											if (func_213(player::player_ped_id()) != joaat("weapon_unarmed"))
											{
												if (entity::does_entity_exist(iLocal_33[0]))
												{
													if (!ped::is_ped_injured(iLocal_33[0]))
													{
														if (func_2(player::player_ped_id(), iLocal_33[0], 1) < 30f)
														{
															func_133(&uLocal_403, 4, iLocal_33[0], "ARMY_Guard01", 0, 1);
														}
													}
												}
												if (entity::does_entity_exist(iLocal_33[1]))
												{
													if (!ped::is_ped_injured(iLocal_33[1]))
													{
														if (func_2(player::player_ped_id(), iLocal_33[1], 1) < 30f)
														{
															func_133(&uLocal_403, 4, iLocal_33[1], "ARMY_Guard01", 0, 1);
														}
													}
												}
												if (func_132(&uLocal_403, "ARMYAUD", "ARMY_WRN1", 7, 0, 0, 0))
												{
													iLocal_187 = gameplay::get_game_timer();
													iLocal_186 = gameplay::get_game_timer();
													iLocal_290 = 1;
												}
											}
										}
									}
								}
							}
						}
					}
					if (iLocal_291 == 0 && iLocal_290 == 0)
					{
						if (!func_114())
						{
							if (!ui::is_message_being_displayed() || !ui::is_subtitle_preference_switched_on())
							{
								if (func_2(player::player_ped_id(), iLocal_33[iLocal_192], 1) < 25f)
								{
									if (ped::_0x6CD5A433374D4CFB(iLocal_33[iLocal_192], player::player_ped_id()))
									{
										if (!ped::is_ped_in_any_vehicle(player::player_ped_id(), 0))
										{
											if (func_213(player::player_ped_id()) == joaat("weapon_unarmed") || func_214(0))
											{
												if (entity::does_entity_exist(iLocal_33[0]))
												{
													if (!ped::is_ped_injured(iLocal_33[0]))
													{
														if (func_2(player::player_ped_id(), iLocal_33[0], 1) < 30f)
														{
															func_133(&uLocal_403, 4, iLocal_33[0], "ARMY_Guard01", 0, 1);
														}
													}
												}
												if (entity::does_entity_exist(iLocal_33[1]))
												{
													if (!ped::is_ped_injured(iLocal_33[1]))
													{
														if (func_2(player::player_ped_id(), iLocal_33[1], 1) < 30f)
														{
															func_133(&uLocal_403, 4, iLocal_33[1], "ARMY_Guard01", 0, 1);
														}
													}
												}
												if (func_132(&uLocal_403, "ARMYAUD", "ARMY_WRN1", 7, 0, 0, 0))
												{
													iLocal_187 = gameplay::get_game_timer();
													iLocal_186 = gameplay::get_game_timer();
													iLocal_291 = 1;
												}
											}
										}
									}
								}
							}
						}
					}
					if (iLocal_290 == 1 || iLocal_291 == 1)
					{
						if (iLocal_289 == 0 && iLocal_210 == 0)
						{
							if (iLocal_310 == 0)
							{
								if (gameplay::get_game_timer() > iLocal_186 + 8000)
								{
									if (!func_114())
									{
										if (!ui::is_message_being_displayed() || !ui::is_subtitle_preference_switched_on())
										{
											if (func_2(player::player_ped_id(), iLocal_33[iLocal_192], 1) < 25f)
											{
												if (ped::_0x6CD5A433374D4CFB(iLocal_33[iLocal_192], player::player_ped_id()))
												{
													if (!ped::is_ped_in_any_vehicle(player::player_ped_id(), 0) && !func_214(0))
													{
														if (func_213(player::player_ped_id()) != joaat("weapon_unarmed"))
														{
															if (entity::does_entity_exist(iLocal_33[0]))
															{
																if (!ped::is_ped_injured(iLocal_33[0]))
																{
																	if (func_2(player::player_ped_id(), iLocal_33[0], 1) < 30f)
																	{
																		func_133(&uLocal_403, 4, iLocal_33[0], "ARMY_Guard01", 0, 1);
																	}
																}
															}
															if (entity::does_entity_exist(iLocal_33[1]))
															{
																if (!ped::is_ped_injured(iLocal_33[1]))
																{
																	if (func_2(player::player_ped_id(), iLocal_33[1], 1) < 30f)
																	{
																		func_133(&uLocal_403, 4, iLocal_33[1], "ARMY_Guard01", 0, 1);
																	}
																}
															}
															if (func_132(&uLocal_403, "ARMYAUD", "ARMY_WRN1a", 7, 0, 0, 0))
															{
																iLocal_186 = gameplay::get_game_timer();
																iLocal_310 = 1;
															}
														}
													}
												}
											}
										}
									}
								}
							}
							if (gameplay::get_game_timer() > iLocal_187 + 8000)
							{
								if (!func_114())
								{
									if (!ui::is_message_being_displayed() || !ui::is_subtitle_preference_switched_on())
									{
										if (func_2(player::player_ped_id(), iLocal_33[iLocal_192], 1) < 25f)
										{
											if (ped::_0x6CD5A433374D4CFB(iLocal_33[iLocal_192], player::player_ped_id()))
											{
												if (!ped::is_ped_in_any_vehicle(player::player_ped_id(), 0))
												{
													if (func_213(player::player_ped_id()) == joaat("weapon_unarmed") || func_214(0))
													{
														if (entity::does_entity_exist(iLocal_33[0]))
														{
															if (!ped::is_ped_injured(iLocal_33[0]))
															{
																if (func_2(player::player_ped_id(), iLocal_33[0], 1) < 30f)
																{
																	func_133(&uLocal_403, 4, iLocal_33[0], "ARMY_Guard01", 0, 1);
																}
															}
														}
														if (entity::does_entity_exist(iLocal_33[1]))
														{
															if (!ped::is_ped_injured(iLocal_33[1]))
															{
																if (func_2(player::player_ped_id(), iLocal_33[1], 1) < 30f)
																{
																	func_133(&uLocal_403, 4, iLocal_33[1], "ARMY_Guard01", 0, 1);
																}
															}
														}
														if (iLocal_310 == 0)
														{
															if (func_132(&uLocal_403, "ARMYAUD", "ARMY_WRN1a", 7, 0, 0, 0))
															{
																iLocal_187 = gameplay::get_game_timer();
																iLocal_310 = 1;
															}
														}
														if (iLocal_303 == 0)
														{
															iLocal_191 = gameplay::get_game_timer();
															iLocal_303 = 1;
														}
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
			iLocal_192++;
		}
	}
	if (gameplay::get_game_timer() > iLocal_177 + 12000)
	{
		if (iLocal_210 == 1 || iLocal_289 == 1)
		{
			if (!ui::is_message_being_displayed() || !ui::is_subtitle_preference_switched_on())
			{
				if (!func_114())
				{
					if (func_241())
					{
						iLocal_181 = gameplay::get_random_int_in_range(0, 6);
						if (iLocal_181 == 0)
						{
							func_238(func_240(), "OVER_THERE", 9);
							iLocal_177 = gameplay::get_game_timer();
						}
						else if (iLocal_181 == 1)
						{
							func_238(func_240(), "PROVOKE_TRESSPASS", 9);
							iLocal_177 = gameplay::get_game_timer();
						}
						else if (iLocal_181 == 2)
						{
							func_238(func_240(), "UP_THERE", 9);
							iLocal_177 = gameplay::get_game_timer();
						}
						else if (iLocal_181 == 3)
						{
							func_238(func_240(), "suspect_spotted", 9);
							iLocal_177 = gameplay::get_game_timer();
						}
						else if (iLocal_181 == 4)
						{
							func_238(func_240(), "GENERIC_INSULT_HIGH", 9);
							iLocal_177 = gameplay::get_game_timer();
						}
						else if (iLocal_181 == 5)
						{
							func_238(func_240(), "GENERIC_INSULT_MED", 9);
							iLocal_177 = gameplay::get_game_timer();
						}
					}
				}
			}
		}
	}
}

void func_238(int iParam0, char* sParam1, int iParam2)//Position - 0x1376C
{
	audio::_play_ambient_speech1(iParam0, sParam1, func_239(iParam2), 1);
}

int func_239(int iParam0)//Position - 0x13783
{
	int iVar0;
	
	switch (iParam0)
	{
		case 0:
			return "SPEECH_PARAMS_STANDARD";
		
		case 1:
			return "SPEECH_PARAMS_ALLOW_REPEAT";
		
		case 2:
			return "SPEECH_PARAMS_BEAT";
		
		case 3:
			return "SPEECH_PARAMS_FORCE";
		
		case 4:
			return "SPEECH_PARAMS_FORCE_FRONTEND";
		
		case 5:
			return "SPEECH_PARAMS_FORCE_NO_REPEAT_FRONTEND";
		
		case 6:
			return "SPEECH_PARAMS_FORCE_NORMAL";
		
		case 7:
			return "SPEECH_PARAMS_FORCE_NORMAL_CLEAR";
		
		case 8:
			return "SPEECH_PARAMS_FORCE_NORMAL_CRITICAL";
		
		case 9:
			return "SPEECH_PARAMS_FORCE_SHOUTED";
		
		case 10:
			return "SPEECH_PARAMS_FORCE_SHOUTED_CLEAR";
		
		case 11:
			return "SPEECH_PARAMS_FORCE_SHOUTED_CRITICAL";
		
		case 12:
			return "SPEECH_PARAMS_FORCE_PRELOAD_ONLY";
		
		case 13:
			return "SPEECH_PARAMS_MEGAPHONE";
		
		case 14:
			return "SPEECH_PARAMS_HELI";
		
		case 15:
			return "SPEECH_PARAMS_FORCE_MEGAPHONE";
		
		case 16:
			return "SPEECH_PARAMS_FORCE_HELI";
		
		case 17:
			return "SPEECH_PARAMS_INTERRUPT";
		
		case 18:
			return "SPEECH_PARAMS_INTERRUPT_SHOUTED";
		
		case 19:
			return "SPEECH_PARAMS_INTERRUPT_SHOUTED_CLEAR";
		
		case 20:
			return "SPEECH_PARAMS_INTERRUPT_SHOUTED_CRITICAL";
		
		case 21:
			return "SPEECH_PARAMS_INTERRUPT_NO_FORCE";
		
		case 22:
			return "SPEECH_PARAMS_INTERRUPT_FRONTEND";
		
		case 23:
			return "SPEECH_PARAMS_INTERRUPT_NO_FORCE_FRONTEND";
		
		case 24:
			return "SPEECH_PARAMS_ADD_BLIP";
		
		case 25:
			return "SPEECH_PARAMS_ADD_BLIP_ALLOW_REPEAT";
		
		case 26:
			return "SPEECH_PARAMS_ADD_BLIP_FORCE";
		
		case 27:
			return "SPEECH_PARAMS_ADD_BLIP_SHOUTED";
		
		case 28:
			return "SPEECH_PARAMS_ADD_BLIP_SHOUTED_FORCE";
		
		case 29:
			return "SPEECH_PARAMS_ADD_BLIP_INTERRUPT";
		
		case 30:
			return "SPEECH_PARAMS_ADD_BLIP_INTERRUPT_FORCE";
		
		case 31:
			return "SPEECH_PARAMS_FORCE_PRELOAD_ONLY_SHOUTED";
		
		case 32:
			return "SPEECH_PARAMS_FORCE_PRELOAD_ONLY_SHOUTED_CLEAR";
		
		case 33:
			return "SPEECH_PARAMS_FORCE_PRELOAD_ONLY_SHOUTED_CRITICAL";
		
		case 34:
			return "SPEECH_PARAMS_SHOUTED";
		
		case 35:
			return "SPEECH_PARAMS_SHOUTED_CLEAR";
		
		case 36:
			return "SPEECH_PARAMS_SHOUTED_CRITICAL";
		
		default:
	}
	iVar0 = 0;
	return iVar0;
}

int func_240()//Position - 0x13978
{
	int iVar0;
	
	if (!ped::is_ped_injured(player::player_ped_id()))
	{
		ped::get_closest_ped(entity::get_entity_coords(player::player_ped_id(), 1), 30f, 0, 1, &iVar0, 0, 1, -1);
	}
	iLocal_179 = 0;
	while (iLocal_179 <= 9)
	{
		if (entity::does_entity_exist(iLocal_33[iLocal_179]))
		{
			if (!ped::is_ped_injured(iLocal_33[iLocal_179]))
			{
				if (iVar0 == iLocal_33[iLocal_179])
				{
					return iLocal_33[iLocal_179];
				}
			}
		}
		iLocal_179++;
	}
	return 0;
}

bool func_241()//Position - 0x139E9
{
	iLocal_180 = 0;
	while (iLocal_180 <= 9)
	{
		if (entity::does_entity_exist(iLocal_33[iLocal_180]))
		{
			if (!ped::is_ped_injured(iLocal_33[iLocal_180]))
			{
				if (func_2(player::player_ped_id(), iLocal_33[iLocal_180], 1) < 25f)
				{
					return true;
				}
			}
		}
		iLocal_180++;
	}
	return false;
}

bool func_242(int iParam0, int iParam1)//Position - 0x13A3C
{
	if (entity::does_entity_exist(iParam0) && !ped::is_ped_injured(iParam0))
	{
		if (weapon::is_ped_armed(player::player_ped_id(), iParam1))
		{
			if (player::is_player_free_aiming_at_entity(player::player_id(), iParam0) || player::is_player_targetting_entity(player::player_id(), iParam0))
			{
				return true;
			}
		}
	}
	return false;
}

void func_243()//Position - 0x13A88
{
	if (ai::does_scenario_group_exist("ARMY_HELI"))
	{
		if (ai::is_scenario_group_enabled("ARMY_HELI"))
		{
			ai::set_scenario_group_enabled("ARMY_HELI", false);
		}
	}
}

bool func_244()//Position - 0x13AAF
{
	if (Global_91486 == 10 || Global_91486 == 9)
	{
		return true;
	}
	return false;
}

void func_245()//Position - 0x13AD3
{
	func_246(73);
	ui::request_additional_text("DOCKP2B", 0);
	while (!ui::has_additional_text_loaded(0))
	{
		system::wait(0);
	}
	if (!ped::is_ped_injured(player::player_ped_id()))
	{
		ped::set_ped_using_action_mode(player::player_ped_id(), false, -1, 0);
	}
	gameplay::_0xDC0F817884CDD856(5, false);
	gameplay::_0xDC0F817884CDD856(3, false);
	gameplay::_0xDC0F817884CDD856(4, false);
	vehicle::set_all_vehicle_generators_active_in_area(-2024.2f, 2968f, 30.2f, -2004f, 2921.5f, 37.6f, false, 1);
	vehicle::set_all_vehicle_generators_active_in_area(-2133.3f, 2993.7f, 41.1f, -2152.7f, 3039.4f, 31.6f, false, 1);
	vehicle::set_all_vehicle_generators_active_in_area(-1884.6f, 2827.7f, 41.8f, -1843.1f, 2772.1f, 29.9f, false, 1);
	iLocal_67 = ped::add_scenario_blocking_area(-1884.6f, 2827.7f, 41.8f, -1843.1f, 2772.1f, 29.9f, 0, 1, 1, 1);
	iLocal_69 = ped::add_scenario_blocking_area(-2168.3f, 3223.6f, 52.8f, -2156.2f, 3205f, 29f, 0, 1, 1, 1);
	gameplay::clear_area(-1876.8f, 2806.1f, 32.3f, 8f, 1, 0, 0, false);
	gameplay::clear_area(-1857.7f, 2797.9f, 32.4f, 8f, 1, 0, 0, false);
	audio::set_audio_flag("WantedMusicOnMission", 1);
	vehicle::set_vehicle_model_is_suppressed(joaat("buzzard"), true);
	vehicle::set_all_vehicle_generators_active_in_area(-2195.3f, 3231.1f, 41.4f, -2164.1f, 3250.5f, 29f, false, 1);
	vehicle::remove_vehicles_from_generators_in_area(-2195.3f, 3231.1f, 41.4f, -2164.1f, 3250.5f, 29f, 0);
	vehicle::set_all_vehicle_generators_active_in_area(-2050.8f, 3139.5f, 41f, -2018.5f, 3160f, 27f, false, 1);
	vehicle::remove_vehicles_from_generators_in_area(-2050.8f, 3139.5f, 41f, -2018.5f, 3160f, 27f, 0);
}

void func_246(int iParam0)//Position - 0x13CB9
{
	Global_87674 = 0;
	switch (iParam0)
	{
		case 72:
			func_211(2);
			func_211(4);
			break;
		
		case 73:
			func_211(0);
			func_211(1);
			func_211(7);
			break;
		
		case 92:
			func_211(10);
			func_211(9);
			func_211(13);
			func_211(6);
			break;
		
		case 68:
			func_211(11);
			break;
		
		case 78:
			func_211(14);
			break;
		
		case 79:
			func_211(3);
			break;
		
		default:
			break;
	}
}

void func_247()//Position - 0x13D47
{
	func_248();
	vehicle::set_vehicle_model_is_suppressed(joaat("cargobob"), false);
	vehicle::set_vehicle_model_is_suppressed(joaat("buzzard"), false);
	player::set_police_radar_blips(1);
	vehicle::set_all_vehicle_generators_active_in_area(-2195.3f, 3231.1f, 41.4f, -2164.1f, 3250.5f, 29f, true, 1);
	vehicle::set_all_vehicle_generators_active_in_area(-2050.8f, 3139.5f, 41f, -2018.5f, 3160f, 27f, true, 1);
	vehicle::_0x0A436B8643716D14();
	ped::remove_scenario_blocking_area(iLocal_67, 0);
	ped::remove_scenario_blocking_area(iLocal_68, 0);
	ped::remove_scenario_blocking_area(iLocal_69, 0);
	func_231(1, 1);
	func_231(2, 1);
	func_231(7, 1);
	func_231(8, 1);
	func_231(9, 1);
	func_231(10, 1);
	func_231(4, 1);
	func_231(12, 1);
	func_106();
	if (ai::does_scenario_group_exist("ARMY_GUARD"))
	{
		if (!ai::is_scenario_group_enabled("ARMY_GUARD"))
		{
			ai::set_scenario_group_enabled("ARMY_GUARD", true);
		}
	}
	audio::stop_alarm("PORT_OF_LS_HEIST_FORT_ZANCUDO_ALARMS", true);
	audio::set_ambient_zone_state("AZ_AFB_ALARM_SPEECH", 0, 0);
	audio::set_audio_flag("PoliceScannerDisabled", 0);
	audio::set_audio_flag("WantedMusicOnMission", 0);
	iLocal_176 = 0;
	while (iLocal_176 <= 12)
	{
		func_107(&(Local_70[iLocal_176 /*8*/]));
		iLocal_176++;
	}
	if (ai::does_scenario_group_exist("ARMY_HELI"))
	{
		if (!ai::is_scenario_group_enabled("ARMY_HELI"))
		{
			ai::set_scenario_group_enabled("ARMY_HELI", true);
		}
	}
	ped::remove_relationship_group(iLocal_60);
	script::terminate_this_thread();
}

void func_248()//Position - 0x13E8F
{
	Global_87674 = 0;
}

void func_249()//Position - 0x13E9C
{
	int iVar0;
	
	if (script::has_script_loaded("buddyDeathResponse"))
	{
		system::start_new_script("buddyDeathResponse", 1424);
	}
	if (Global_101652.f_8028 || func_27(0))
	{
		if (!func_250())
		{
			iVar0 = func_26();
			if (iVar0 != -1)
			{
				if (!func_14(iVar0))
				{
					return;
				}
				gameplay::set_bit(&(Global_82571[iVar0 /*5*/].f_1), 5);
				return;
			}
		}
		else
		{
			func_19();
		}
	}
}

bool func_250()//Position - 0x13F0D
{
	if (((Global_91486 == 13 || Global_91486 == 10) || Global_91486 == 11) || Global_91486 == 12)
	{
		return false;
	}
	return true;
}

