text: #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;
  	var uLocal_29 = 0;
  	var uLocal_30 = 0;
  	float fLocal_31 = 0f;
  	float fLocal_32 = 0f;
  	float fLocal_33 = 0f;
  	var uLocal_34 = 0;
  	var uLocal_35 = 0;
  	var uLocal_36 = 0;
  	var uLocal_37 = 0;
  	var uLocal_38 = 0;
  	int iLocal_39 = 0;
  	int iLocal_40 = 0;
  	int iLocal_41 = 0;
  	int iLocal_42 = 0;
  	var uLocal_43 = 0;
  	var uLocal_44 = 0;
  	var uLocal_45 = 0;
  	var uLocal_46 = 0;
  	var uLocal_47 = -1;
  	var uLocal_48 = 0;
  	var uLocal_49 = 0;
  	var uLocal_50 = 0;
  	var uLocal_51 = 0;
  	var uLocal_52 = 0;
  	var uLocal_53 = 0;
  	var uLocal_54 = 1000;
  	var uLocal_55 = 1000;
  	var uLocal_56 = 0;
  	int iLocal_57[6] = { 0, 0, 0, 0, 0, 0 };
  	int iLocal_64 = 0;
  	int iLocal_65 = 0;
  	int iLocal_66 = 0;
  	var uLocal_67 = 0;
  	var uLocal_68 = 0;
  	var uLocal_69 = 0;
  	var uLocal_70 = 0;
  	var uLocal_71 = 0;
  	var uLocal_72 = 0;
  	var uLocal_73 = 0;
  	var uLocal_74 = 0;
  	var uLocal_75 = 0;
  	var uLocal_76 = 0;
  	int iLocal_77 = 0;
  	int iLocal_78 = 0;
  	bool bLocal_79 = 0;
  	int iLocal_80 = 0;
  	int iLocal_81 = 0;
  	int iLocal_82 = 0;
  	struct<3> Local_83 = { 0, 0, 0 } ;
  	int iLocal_86 = 0;
  	int iLocal_87 = 0;
  	int iLocal_88 = 0;
  	int iLocal_89 = 0;
  	int* iLocal_90 = NULL;
  	var uLocal_91 = 0;
  	var uLocal_92 = 0;
  	int iLocal_93 = 0;
  	bool bLocal_94 = 0;
  	float fLocal_95 = 0f;
  	int iLocal_96 = 0;
  	int iLocal_97 = 0;
  	var uLocal_98 = 0;
  	var uLocal_99 = 0;
  	var uLocal_100 = 1132396544;
  	var uLocal_101 = 1132396544;
  	var uLocal_102 = 1132396544;
  	var uLocal_103 = 0;
  	var uLocal_104 = -1082130432;
  	var uLocal_105 = 0;
  	var uLocal_106 = 0;
  	var uLocal_107 = 8;
  	var uLocal_108 = 0;
  	var uLocal_109 = 0;
  	var uLocal_110 = 0;
  	var uLocal_111 = 0;
  	var uLocal_112 = 0;
  	var uLocal_113 = 0;
  	var uLocal_114 = 0;
  	var uLocal_115 = 0;
  	var uLocal_116 = 0;
  	var uLocal_117 = 0;
  	var uLocal_118 = 0;
  	var uLocal_119 = 0;
  	var uLocal_120 = 0;
  	var uLocal_121 = 0;
  	var uLocal_122 = 0;
  	var uLocal_123 = 0;
  	var uLocal_124 = 0;
  	var uLocal_125 = 0;
  	var uLocal_126 = 0;
  	var uLocal_127 = 0;
  	var uLocal_128 = 0;
  	var uLocal_129 = 0;
  	var uLocal_130 = 0;
  	var uLocal_131 = 0;
  	var uLocal_132 = 0;
  	var uLocal_133 = 0;
  	var uLocal_134 = 0;
  	var uLocal_135 = 0;
  	var uLocal_136 = 0;
  	var uLocal_137 = 0;
  	var uLocal_138 = 0;
  	var uLocal_139 = 0;
  	var uLocal_140 = 0;
  	var uLocal_141 = 0;
  	var uLocal_142 = 0;
  	var uLocal_143 = 0;
  	var uLocal_144 = 0;
  	var uLocal_145 = 0;
  	var uLocal_146 = 0;
  	var uLocal_147 = 0;
  	var uLocal_148 = 0;
  	var uLocal_149 = 0;
  	var uLocal_150 = 0;
  	var uLocal_151 = 0;
  	var uLocal_152 = 0;
  	var uLocal_153 = 0;
  	var uLocal_154 = 0;
  	var uLocal_155 = 0;
  	var uLocal_156 = 0;
  	var uLocal_157 = 0;
  	var uLocal_158 = 0;
  	var uLocal_159 = 0;
  	var uLocal_160 = 0;
  	var uLocal_161 = 0;
  	var uLocal_162 = 0;
  	var uLocal_163 = 0;
  	var uLocal_164 = -1;
  	var uLocal_165 = 1092616192;
  	var uLocal_166 = 0;
  	var uLocal_167 = 0;
  	int iLocal_168 = 0;
  	struct<21> Local_169 = { 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } ;
  	struct<10> Local_190[15];
  	int iLocal_341 = 0;
  	float fLocal_342 = 0f;
  	struct<2> Local_343 = { 0, 16 } ;
  	var uLocal_345 = 0;
  	var uLocal_346 = 0;
  	var uLocal_347 = 0;
  	var uLocal_348 = 0;
  	var uLocal_349 = 0;
  	var uLocal_350 = 0;
  	var uLocal_351 = 0;
  	var uLocal_352 = 0;
  	var uLocal_353 = 0;
  	var uLocal_354 = 0;
  	var uLocal_355 = 0;
  	var uLocal_356 = 0;
  	var uLocal_357 = 0;
  	var uLocal_358 = 0;
  	var uLocal_359 = 0;
  	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 = 0;
  	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 = 0;
  	var uLocal_404 = 0;
  	var uLocal_405 = 0;
  	var uLocal_406 = 0;
  	var uLocal_407 = 0;
  	var uLocal_408 = 0;
  	var uLocal_409 = 0;
  	struct<411> Local_410 = { 0, 0, 0, 0, 0, 0, 1065353216, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } ;
  	var uLocal_821 = 0;
  	var uLocal_822 = 0;
  	var uLocal_823 = 0;
  	var uLocal_824 = 0;
  	var uLocal_825 = 0;
  	var uLocal_826 = 0;
  	var uLocal_827 = 0;
  	var uLocal_828 = -1;
  	var uLocal_829 = -1;
  	var uLocal_830 = -1;
  	var uLocal_831 = -1;
  	var uLocal_832 = 0;
  	var uLocal_833 = 0;
  	var uLocal_834 = 0;
  	var uLocal_835 = 0;
  	var uLocal_836 = 0;
  	var uLocal_837 = 0;
  	var uLocal_838 = 0;
  	var uLocal_839 = 0;
  	var uLocal_840 = 0;
  	var uLocal_841 = 0;
  	var uLocal_842 = 0;
  	var uLocal_843 = 0;
  	var uLocal_844 = 0;
  	var uLocal_845 = 0;
  	var uLocal_846 = 0;
  	int iLocal_847 = 0;
  	struct<3> Local_848[1];
  	int iLocal_852 = 0;
  	int iLocal_853 = 0;
  	struct<3> Local_854 = { 0, 0, 0 } ;
  	struct<3> Local_857 = { 0, 0, 0 } ;
  	struct<3> Local_860 = { 0, 0, 0 } ;
  	struct<3> Local_863 = { 0, 0, 0 } ;
  	struct<3> Local_866 = { 0, 0, 0 } ;
  	int iLocal_869 = 0;
  	int iLocal_870 = 0;
  	var uLocal_871 = 0;
  	int iLocal_872 = 0;
  	float fLocal_873 = 0f;
  	float fLocal_874 = 0f;
  	float fLocal_875 = 0f;
  	int iLocal_876 = 0;
  	int iLocal_877 = 0;
  	int iLocal_878 = 0;
  	bool bLocal_879 = 0;
  	bool bLocal_880 = 0;
  	int iLocal_881 = 0;
  	int iLocal_882 = 0;
  	char* sLocal_883 = NULL;
  	char* sLocal_884 = NULL;
  	bool bLocal_885 = 0;
  	struct<28> Local_886 = { -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } ;
  	var uLocal_914 = 0;
  	var uLocal_915 = 0;
  	var uLocal_916 = 5;
  	var uLocal_917 = 0;
  	var uLocal_918 = 0;
  	var uLocal_919 = 0;
  	var uLocal_920 = 0;
  	var uLocal_921 = 0;
  	var uLocal_922 = 0;
  	var uLocal_923 = 0;
  	var uLocal_924 = 0;
  	var uLocal_925 = 0;
  	var uLocal_926 = 0;
  	var uLocal_927 = 0;
  	var uLocal_928 = 0;
  	var uLocal_929 = 0;
  	var uLocal_930 = 0;
  	var uLocal_931 = 0;
  	var uLocal_932 = 0;
  	var uLocal_933 = 0;
  	var uLocal_934 = 0;
  	var uLocal_935 = 0;
  	var uLocal_936 = 0;
  	var uLocal_937 = 0;
  	var uLocal_938 = 0;
  	var uLocal_939 = 0;
  	var uLocal_940 = 0;
  	var uLocal_941 = 0;
  	var uLocal_942 = 0;
  	var uLocal_943 = 0;
  	var uLocal_944 = 0;
  	var uLocal_945 = 0;
  	var uLocal_946 = 0;
  	var uLocal_947 = 0;
  	var uLocal_948 = 0;
  	var uLocal_949 = 0;
  	var uLocal_950 = 0;
  	var uLocal_951 = 0;
  	var uLocal_952 = 0;
  	var uLocal_953 = 0;
  	var uLocal_954 = 0;
  	var uLocal_955 = 0;
  	var uLocal_956 = 0;
  	var uLocal_957 = 0;
  	var uLocal_958 = 0;
  	var uLocal_959 = 1097859072;
  	var uLocal_960 = 1500;
  	var uLocal_961 = 45;
  	var uLocal_962 = 1103626240;
  	var uLocal_963 = 5;
  	int iLocal_964 = 0;
  	var uLocal_965 = 0;
  	var uLocal_966 = 0;
  	var uLocal_967 = 0;
  	var uLocal_968 = 0;
  	var uLocal_969 = 0;
  	var uLocal_970 = 0;
  	var uLocal_971 = 0;
  	var uLocal_972 = 0;
  	var uLocal_973 = 0;
  #endregion
  
  void __EntryFunction__()
  {
  	iLocal_2 = 1;
  	iLocal_3 = 134;
  	iLocal_4 = 134;
  	iLocal_5 = 1;
  	iLocal_6 = 1;
  	iLocal_7 = 1;
  	iLocal_8 = 134;
  	iLocal_9 = 1;
  	iLocal_10 = 12;
  	iLocal_11 = 12;
  	fLocal_14 = 0.001f;
  	iLocal_17 = -1;
  	sLocal_20 = "NULL";
  	fLocal_21 = 0f;
  	fLocal_25 = -0.0375f;
  	fLocal_26 = 0.17f;
  	iLocal_28 = 3;
  	fLocal_31 = 80f;
  	fLocal_32 = 140f;
  	fLocal_33 = 180f;
  	iLocal_39 = 1;
  	iLocal_40 = 65;
  	iLocal_41 = 49;
  	iLocal_42 = 64;
  	iLocal_77 = HUD::GET_STANDARD_BLIP_ENUM_ID();
  	iLocal_78 = HUD::GET_WAYPOINT_BLIP_ENUM_ID();
  	Local_83 = { 500f, 500f, 500f };
  	iLocal_852 = joaat("a_m_y_soucent_04");
  	Local_854 = { -1230.55f, -896.7814f, 11.11059f };
  	Local_857 = { 58.8213f, 293.848f, 109.6124f };
  	Local_860 = { 62.7742f, 307.4984f, 109.981f };
  	Local_863 = { 0f, 0f, 0f };
  	Local_866 = { 0f, 0f, 0f };
  	iLocal_869 = 1;
  	fLocal_873 = 0f;
  	fLocal_874 = 12f;
  	sLocal_884 = "random@drunk_driver_1";
  	if (PLAYER::HAS_FORCE_CLEANUP_OCCURRED(67))
  	{
  		func_438(2);
  		func_437();
  	}
  	MISC::SET_MISSION_FLAG(true);
  	func_424();
  	while (true)
  	{
  		if (ENTITY::DOES_ENTITY_EXIST(Local_410.f_2))
  		{
  			func_9();
  		}
  		else
  		{
  			func_1(&Local_410);
  		}
  		SYSTEM::WAIT(0);
  	}
  }
  
  void func_1(var uParam0)
  {
  	uParam0->f_2 = PLAYER::PLAYER_PED_ID();
  	func_7(&(uParam0->f_244));
  	uParam0->f_428 = func_2();
  }
  
  int func_2()
  {
  	int iVar0;
  	int iVar1;
  	
  	iVar1 = func_3(PLAYER::PLAYER_PED_ID());
  	if (iVar1 == 0)
  	{
  		iVar0 = joaat("sp0_dist_driving_car");
  	}
  	else if (iVar1 == 2)
  	{
  		iVar0 = joaat("sp2_dist_driving_car");
  	}
  	else if (iVar1 == 1)
  	{
  		iVar0 = joaat("sp1_dist_driving_car");
  	}
  	else
  	{
  		iVar0 = joaat("sp0_dist_driving_car");
  	}
  	return iVar0;
  }
  
  int func_3(int iParam0)
  {
  	int iVar0;
  	int iVar1;
  	
  	if (ENTITY::DOES_ENTITY_EXIST(iParam0))
  	{
  		iVar1 = ENTITY::GET_ENTITY_MODEL(iParam0);
  		iVar0 = 0;
  		while (iVar0 <= 2)
  		{
  			if (func_4(iVar0) == iVar1)
  			{
  				return iVar0;
  			}
  			iVar0++;
  		}
  	}
  	return 145;
  }
  
  int func_4(int iParam0)
  {
  	if (func_6(iParam0))
  	{
  		return func_5(iParam0);
  	}
  	else if (iParam0 != 145)
  	{
  	}
  	return 0;
  }
  
  var func_5(int iParam0)
  {
  	return Global_1918[iParam0 /*29*/];
  }
  
  bool func_6(int iParam0)
  {
  	return iParam0 < 3;
  }
  
  void func_7(var uParam0)
  {
  	int iVar0;
  	char cVar1[64];
  	
  	iVar0 = func_3(PLAYER::PLAYER_PED_ID());
  	if (iVar0 == 0)
  	{
  		func_8(uParam0, 0, PLAYER::PLAYER_PED_ID(), "MICHAEL", 0, 1);
  	}
  	else if (iVar0 == 2)
  	{
  		func_8(uParam0, 0, PLAYER::PLAYER_PED_ID(), "TREVOR", 0, 1);
  	}
  	else if (iVar0 == 1)
  	{
  		func_8(uParam0, 0, PLAYER::PLAYER_PED_ID(), "FRANKLIN", 0, 1);
  	}
  	else
  	{
  		func_8(uParam0, 0, PLAYER::PLAYER_PED_ID(), "MICHAEL", 0, 1);
  		StringCopy(&cVar1, "Invalid enum passed to Taxi dialogue is: ", 64);
  		StringIntConCat(&cVar1, iVar0, 64);
  	}
  	func_8(uParam0, 8, 0, "TaxiDispatch", 0, 1);
  }
  
  void func_8(var uParam0, int iParam1, int iParam2, char* sParam3, int iParam4, int iParam5)
  {
  	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_77852)
  	{
  		if (!PED::IS_PED_INJURED(iParam2))
  		{
  			if ((uParam0[iParam1 /*10*/])->f_8 == 0)
  			{
  				PED::SET_PED_CAN_PLAY_AMBIENT_ANIMS(iParam2, false);
  			}
  			else
  			{
  				PED::SET_PED_CAN_PLAY_AMBIENT_ANIMS(iParam2, true);
  			}
  		}
  		if (!PED::IS_PED_INJURED(iParam2))
  		{
  			if ((uParam0[iParam1 /*10*/])->f_9 == 0)
  			{
  				PED::SET_PED_CAN_USE_AUTO_CONVERSATION_LOOKAT(iParam2, false);
  			}
  			else
  			{
  				PED::SET_PED_CAN_USE_AUTO_CONVERSATION_LOOKAT(iParam2, true);
  			}
  		}
  	}
  }
  
  void func_9()
  {
  	if (func_423(&Local_410))
  	{
  		func_422(&Local_410);
  		if (Local_410.f_410 > 0)
  		{
  			if ((MISC::GET_GAME_TIMER() % 1000) < 50)
  			{
  			}
  			if (func_421(&Local_410, 0))
  			{
  				func_419();
  			}
  		}
  		else if (func_418(&Local_410, 31) > 5f)
  		{
  			func_438(2);
  			func_437();
  		}
  	}
  	else
  	{
  		func_417(&Local_410);
  		func_383(&Local_410, &uLocal_957);
  		func_382(&Local_410, &uLocal_871, 0);
  		func_381(&Local_410);
  		if (Local_410.f_410 > 2 && iLocal_847 == 0)
  		{
  			if (!func_380(&Local_410))
  			{
  				func_347();
  			}
  			else
  			{
  				func_341(&Local_410, "Taxi Not Driveable", func_346(&Local_410));
  			}
  		}
  		if (Local_410.f_410 == 9 && iLocal_847 == 0)
  		{
  			func_317(&Local_410, 0, 0);
  			func_315();
  			if (bLocal_879)
  			{
  				if (func_314())
  				{
  					func_341(&Local_410, "Rider is too damn uncomfortable.", 9);
  				}
  			}
  		}
  		switch (Local_410.f_410)
  		{
  			case 0:
  				func_313(&(Local_848[0 /*3*/]), "TAXI_SC_BN_01", 100);
  				func_312(&Local_410, &Local_848);
  				func_309();
  				func_308(&Local_410, 16, 4f, 0);
  				func_306(&Local_410, Local_857, Local_860, "TaxiOtis", iLocal_852, 135.3f, 40f);
  				func_304(&Local_410);
  				func_303(&Local_410, 1);
  				break;
  			
  			case 1:
  				if (func_301())
  				{
  					func_300();
  					func_280();
  					func_279(&Local_410);
  					Local_410.f_14 = { Local_857 };
  					func_303(&Local_410, 3);
  				}
  				break;
  			
  			case 3:
  				if (func_274(&Local_410, 1))
  				{
  					if (!ENTITY::IS_ENTITY_DEAD(Local_410.f_3, false))
  					{
  						PED::SET_PED_COMPONENT_VARIATION(Local_410.f_3, 3, 1, 0, 0);
  						PED::SET_PED_COMPONENT_VARIATION(Local_410.f_3, 4, 1, 0, 0);
  						PED::SET_PED_COMPONENT_VARIATION(Local_410.f_3, 0, 1, 0, 0);
  						PED::SET_PED_FLEE_ATTRIBUTES(Local_410.f_3, 1024, true);
  						PED::SET_PED_FLEE_ATTRIBUTES(Local_410.f_3, 131072, true);
  					}
  					func_273(&Local_410, 1, 0);
  					func_303(&Local_410, 5);
  				}
  				break;
  			
  			case 5:
  				if (func_243(&Local_410, 0, 1109393408))
  				{
  					func_303(&Local_410, 15);
  				}
  				break;
  			
  			case 15:
  				if (func_242(&Local_410))
  				{
  					Local_410.f_17 = { Local_854 };
  					func_239(&Local_410, 9, 1, 0, 0);
  					func_238(&Local_410);
  					Local_410.f_46 = ENTITY::GET_ENTITY_HEALTH(Local_410.f_4);
  					func_237();
  					switch (func_236(&Local_410))
  					{
  						case 2:
  							sLocal_883 = "vomit_van";
  							break;
  						
  						case 0:
  							sLocal_883 = "vomit_low";
  							break;
  						
  						case 1:
  							sLocal_883 = "vomit_outside";
  							break;
  					}
  					func_303(&Local_410, 9);
  				}
  				if (VEHICLE::IS_VEHICLE_DRIVEABLE(Local_410.f_4, false))
  				{
  					if (!PED::IS_PED_IN_VEHICLE(Local_410.f_2, Local_410.f_4, false))
  					{
  						func_234(&Local_410);
  						func_303(&Local_410, 5);
  					}
  				}
  				break;
  			
  			case 9:
  				if (!iLocal_882)
  				{
  					if ((func_233(&Local_410, 0) || func_233(&Local_410, 2)) || func_232(&Local_410, 2))
  					{
  						iLocal_882 = 1;
  					}
  				}
  				if (func_229(&Local_410, 1086324736) && iLocal_847 == 1)
  				{
  					if (iLocal_853 != 0)
  					{
  						GRAPHICS::STOP_PARTICLE_FX_LOOPED(iLocal_853, false);
  						iLocal_853 = 0;
  					}
  					TASK::CLEAR_PED_TASKS(Local_410.f_3);
  					bLocal_879 = true;
  				}
  				switch (iLocal_847)
  				{
  					case 0:
  						if (func_211(&Local_410, 1086324736, 1097859072))
  						{
  							func_209(&uLocal_916);
  							func_208(&Local_886, 3, 0);
  							HUD::REMOVE_BLIP(&(Local_410.f_9));
  							func_206(&Local_410);
  							func_193(&(Local_410.f_244), Local_410.f_144, "txm1_arrive", 9, 0, 0, 0);
  							func_303(&Local_410, 22);
  						}
  						if ((((func_192(&Local_410) >= 2 && PLAYER::GET_PLAYER_WANTED_LEVEL(PLAYER::PLAYER_ID()) < 1) && !ENTITY::IS_ENTITY_UPSIDEDOWN(Local_410.f_4)) && !(ENTITY::GET_ENTITY_ROLL(Local_410.f_4) <= -145f || ENTITY::GET_ENTITY_ROLL(Local_410.f_4) >= 145f)) && !bLocal_879)
  						{
  							if (func_191())
  							{
  								func_189();
  								func_239(&Local_410, 61, 1, 0, 0);
  							}
  							Local_410.f_76 = 0;
  							iLocal_847 = 1;
  						}
  						if (CAM::DOES_CAM_EXIST(Local_410.f_0))
  						{
  							CAM::DESTROY_CAM(Local_410.f_0, false);
  							CAM::RENDER_SCRIPT_CAMS(false, false, 3000, true, false, 0);
  						}
  						break;
  					
  					case 1:
  						if (!bLocal_879)
  						{
  							func_187(&(Local_410.f_3));
  						}
  						if (func_184())
  						{
  							if (bLocal_880)
  							{
  								func_239(&Local_410, 62, 1, 0, 0);
  								iLocal_847 = 0;
  							}
  							else
  							{
  								func_239(&Local_410, 63, 1, 0, 0);
  								iLocal_847 = 0;
  							}
  							CAM::SET_CINEMATIC_BUTTON_ACTIVE(true);
  						}
  						if (!func_179(&Local_410))
  						{
  							func_167(&Local_410, 1);
  							if (!PLAYER::IS_PLAYER_CONTROL_ON(PLAYER::GET_PLAYER_INDEX()))
  							{
  								PLAYER::SET_PLAYER_CONTROL(PLAYER::GET_PLAYER_INDEX(), true, 0);
  							}
  						}
  						else if (ENTITY::IS_ENTITY_AT_COORD(Local_410.f_4, Local_410.f_17, 2f, 2f, 20f, false, true, 0))
  						{
  							PLAYER::SET_PLAYER_CONTROL(PLAYER::GET_PLAYER_INDEX(), false, 0);
  						}
  						break;
  				}
  				break;
  			
  			case 22:
  				if (!func_191())
  				{
  					if (bLocal_879)
  					{
  						func_166(0);
  					}
  					else
  					{
  						func_166(1);
  						func_165(&Local_410, 0);
  					}
  					func_303(&Local_410, 27);
  				}
  				break;
  			
  			case 27:
  				if (func_155(&Local_410, 1))
  				{
  					func_154(&Local_410);
  					func_239(&Local_410, 104, 1, 1, 0);
  					func_303(&Local_410, 29);
  				}
  				break;
  			
  			case 28:
  				if (func_114(&uLocal_409, &Local_410, &(Local_410.f_3), &uLocal_840, 1))
  				{
  					func_239(&Local_410, 104, 1, 1, 0);
  					func_303(&Local_410, 29);
  				}
  				break;
  			
  			case 29:
  				if (func_81(&Local_410, &iLocal_964))
  				{
  					func_11(1, &Local_410, 1);
  					func_303(&Local_410, 30);
  				}
  				if (!PED::IS_PED_INJURED(Local_410.f_3))
  				{
  					if (func_10(Local_410.f_3, -1226.25f, -902.82f, 11.33f, 1) < 3f)
  					{
  						PED::SET_PED_RESET_FLAG(Local_410.f_3, 60, true);
  					}
  				}
  				break;
  			
  			case 30:
  				if (!PED::IS_PED_INJURED(Local_410.f_3))
  				{
  					if (func_10(Local_410.f_3, -1226.25f, -902.82f, 11.33f, 1) < 3f)
  					{
  						PED::SET_PED_RESET_FLAG(Local_410.f_3, 60, true);
  					}
  					if (func_10(Local_410.f_3, Local_410.f_29, 1) < 1f)
  					{
  						func_437();
  					}
  				}
  				else
  				{
  					func_437();
  				}
  				break;
  			}
  	}
  }
  
  float func_10(int iParam0, struct<3> Param1, bool bParam4)
  {
  	if (ENTITY::IS_ENTITY_DEAD(iParam0, false))
  	{
  		return -1f;
  	}
  	return MISC::GET_DISTANCE_BETWEEN_COORDS(ENTITY::GET_ENTITY_COORDS(iParam0, true), Param1, bParam4);
  }
  
  void func_11(bool bParam0, var uParam1, bool bParam2)
  {
  	if (bParam0)
  	{
  		func_55(uParam1);
  		if (!PED::IS_PED_INJURED(uParam1->f_3))
  		{
  			PED::SET_PED_CONFIG_FLAG(uParam1->f_3, 317, true);
  		}
  	}
  	else
  	{
  		func_53(1, 0);
  	}
  	func_12(uParam1, bParam2);
  }
  
  void func_12(var uParam0, bool bParam1)
  {
  	func_422(uParam0);
  	if (func_191())
  	{
  		func_51();
  	}
  	func_49();
  	HUD::CLEAR_PRINTS();
  	HUD::CLEAR_HELP(true);
  	func_44(0);
  	if (VEHICLE::IS_VEHICLE_DRIVEABLE(uParam0->f_4, false))
  	{
  		VEHICLE::SET_VEHICLE_HAS_STRONG_AXLES(uParam0->f_4, false);
  		VEHICLE::REMOVE_VEHICLE_STUCK_CHECK(uParam0->f_4);
  		VEHICLE::REMOVE_VEHICLE_UPSIDEDOWN_CHECK(uParam0->f_4);
  	}
  	func_41(uParam0->f_14, 1);
  	func_39(uParam0->f_14, 1, 1114636288);
  	func_38(&(uParam0->f_244), 3);
  	PED::SET_PED_CONFIG_FLAG(PLAYER::PLAYER_PED_ID(), 32, true);
  	if (func_35())
  	{
  		PLAYER::SET_PLAYER_CONTROL(PLAYER::PLAYER_ID(), true, 0);
  	}
  	CUTSCENE::_0xC61B86C9F61EB404(true);
  	func_25(0, 1, 1, 0, 0, 0, 0);
  	HUD::DISPLAY_RADAR(true);
  	HUD::DISPLAY_HUD(true);
  	if (CAM::DOES_CAM_EXIST(*uParam0))
  	{
  		CAM::DESTROY_CAM(*uParam0, false);
  		CAM::RENDER_SCRIPT_CAMS(false, false, 3000, true, false, 0);
  		CAM::SET_CINEMATIC_BUTTON_ACTIVE(true);
  	}
  	if (func_24(Global_112915.f_19097, 4))
  	{
  		func_22(&(Global_112915.f_19097), 4);
  		VEHICLE::SET_VEHICLE_MODEL_IS_SUPPRESSED(func_21(), false);
  	}
  	if (bParam1)
  	{
  		func_20(uParam0);
  	}
  	func_19(uParam0);
  	STREAMING::REMOVE_ANIM_DICT("gestures@m@standing@casual");
  	STREAMING::REMOVE_ANIM_DICT("oddjobs@taxi@");
  	STREAMING::REMOVE_ANIM_DICT("oddjobs@towingcome_here");
  	if (NETWORK::NETWORK_IS_SIGNED_ONLINE())
  	{
  		func_17(uParam0->f_411);
  	}
  	if (!PLAYER::IS_PLAYER_CONTROL_ON(PLAYER::GET_PLAYER_INDEX()))
  	{
  		PLAYER::SET_PLAYER_CONTROL(PLAYER::GET_PLAYER_INDEX(), true, 0);
  	}
  	STATS::PLAYSTATS_ODDJOB_DONE(SYSTEM::ROUND((func_13(&iLocal_90) * 1000f)), 12, 0);
  }
  
  float func_13(var uParam0)
  {
  	if (func_16(uParam0))
  	{
  		if (func_15(uParam0))
  		{
  			return uParam0->f_2;
  		}
  		else
  		{
  			return (func_14(MISC::IS_BIT_SET(*uParam0, 4)) - uParam0->f_1);
  		}
  	}
  	return 0f;
  }
  
  float func_14(bool bParam0)
  {
  	float fVar0;
  	float fVar1;
  	int iVar2;
  	float fVar3;
  	float fVar4;
  	
  	if (bParam0)
  	{
  		fVar0 = SYSTEM::TO_FLOAT(MISC::GET_GAME_TIMER());
  		fVar1 = (fVar0 / 1000f);
  		return fVar1;
  	}
  	if (NETWORK::NETWORK_IS_GAME_IN_PROGRESS())
  	{
  		iVar2 = NETWORK::GET_NETWORK_TIME();
  		fVar3 = SYSTEM::TO_FLOAT(iVar2);
  		fVar4 = (fVar3 / 1000f);
  		return fVar4;
  	}
  	return (SYSTEM::TO_FLOAT(MISC::GET_GAME_TIMER()) / 1000f);
  }
  
  bool func_15(var uParam0)
  {
  	return MISC::IS_BIT_SET(*uParam0, 2);
  }
  
  bool func_16(var uParam0)
  {
  	return MISC::IS_BIT_SET(*uParam0, 1);
  }
  
  void func_17(int iParam0)
  {
  	var uVar0;
  	
  	if (iLocal_57[0] != 0)
  	{
  		MemCopy(&uVar0, {func_18(iParam0)}, 6);
  		if (!MISC::IS_STRING_NULL(&uVar0))
  		{
  		}
  	}
  }
  
  struct<8> func_18(int iParam0)
  {
  	struct<8> Var0;
  	
  	switch (iParam0)
  	{
  		case 0:
  			StringCopy(&Var0, "TAXI_SC_N_NE", 32);
  			break;
  		
  		case 1:
  			StringCopy(&Var0, "TAXI_SC_N_TE", 32);
  			break;
  		
  		case 2:
  			StringCopy(&Var0, "TAXI_SC_N_DL", 32);
  			break;
  		
  		case 3:
  			StringCopy(&Var0, "TAXI_SC_N_GB", 32);
  			break;
  		
  		case 4:
  			StringCopy(&Var0, "TAXI_SC_N_TB", 32);
  			break;
  		
  		case 5:
  			StringCopy(&Var0, "TAXI_SC_N_CY", 32);
  			break;
  		
  		case 6:
  			StringCopy(&Var0, "TAXI_SC_N_GN", 32);
  			break;
  		
  		case 7:
  			StringCopy(&Var0, "TAXI_SC_N_CC", 32);
  			break;
  		
  		case 8:
  			StringCopy(&Var0, "TAXI_SC_N_FC", 32);
  			break;
  		
  		case 9:
  			StringCopy(&Var0, "TAXI_BLIP_CAR", 32);
  			break;
  		
  		default:
  			StringCopy(&Var0, "InvalidEnum", 32);
  			break;
  	}
  	return Var0;
  }
  
  void func_19(var uParam0)
  {
  	VEHICLE::REMOVE_ROAD_NODE_SPEED_ZONE(uParam0->f_51[0]);
  }
  
  void func_20(var uParam0)
  {
  	if (ENTITY::DOES_ENTITY_EXIST(uParam0->f_3))
  	{
  		if (!ENTITY::IS_ENTITY_DEAD(uParam0->f_3, false))
  		{
  			if (!PED::IS_PED_IN_ANY_VEHICLE(uParam0->f_3, false))
  			{
  				PED::RESET_PED_LAST_VEHICLE(uParam0->f_3);
  			}
  			PED::SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(uParam0->f_3, false);
  			PED::SET_RELATIONSHIP_BETWEEN_GROUPS(255, uParam0->f_413, joaat("player"));
  			if (ENTITY::IS_ENTITY_PLAYING_ANIM(uParam0->f_3, "oddjobs@towingcome_here", "come_here_idle_a", 3))
  			{
  				TASK::STOP_ANIM_TASK(uParam0->f_3, "oddjobs@towingcome_here", "come_here_idle_a", -8f);
  			}
  			else if (ENTITY::IS_ENTITY_PLAYING_ANIM(uParam0->f_3, "oddjobs@towingcome_here", "come_here_idle_c", 3))
  			{
  				TASK::STOP_ANIM_TASK(uParam0->f_3, "oddjobs@towingcome_here", "come_here_idle_c", -8f);
  			}
  			if (ENTITY::IS_ENTITY_PLAYING_ANIM(uParam0->f_3, "gestures@m@standing@casual", "gesture_nod_yes_hard", 3))
  			{
  				TASK::STOP_ANIM_TASK(uParam0->f_3, "gestures@m@standing@casual", "gesture_nod_yes_hard", -8f);
  			}
  			if (ENTITY::IS_ENTITY_PLAYING_ANIM(uParam0->f_3, "gestures@m@standing@casual", "gesture_you_hard", 3))
  			{
  				TASK::STOP_ANIM_TASK(uParam0->f_3, "gestures@m@standing@casual", "gesture_you_hard", -8f);
  			}
  			ENTITY::SET_PED_AS_NO_LONGER_NEEDED(&(uParam0->f_3));
  		}
  	}
  }
  
  int func_21()
  {
  	return joaat("taxi");
  }
  
  void func_22(var uParam0, int iParam1)
  {
  	func_23(uParam0, iParam1);
  }
  
  void func_23(var uParam0, int iParam1)
  {
  	*uParam0 = (*uParam0 - (*uParam0 && iParam1));
  }
  
  bool func_24(var uParam0, int iParam1)
  {
  	return (uParam0 && iParam1) != 0;
  }
  
  void func_25(bool bParam0, bool bParam1, int iParam2, bool bParam3, bool bParam4, bool bParam5, bool bParam6)
  {
  	if (bParam0)
  	{
  		PLAYER::SPECIAL_ABILITY_DEACTIVATE_FAST(PLAYER::PLAYER_ID(), 0);
  		PLAYER::SET_ALL_RANDOM_PEDS_FLEE(PLAYER::PLAYER_ID(), true);
  		PLAYER::SET_POLICE_IGNORE_PLAYER(PLAYER::PLAYER_ID(), true);
  		func_34(1);
  		HUD::THEFEED_FLUSH_QUEUE();
  		HUD::THEFEED_PAUSE();
  		if (Global_19954.f_1 > 3 && !bParam6)
  		{
  			if (AUDIO::IS_MOBILE_PHONE_CALL_ONGOING())
  			{
  				AUDIO::STOP_SCRIPTED_CONVERSATION(false);
  			}
  			if (!func_33())
  			{
  				Global_19954.f_1 = 3;
  			}
  			Global_21285 = 5;
  		}
  		func_32(1, bParam3, iParam2, 0);
  		Global_62696 = 1;
  		Global_75024 = 1;
  		Global_77850 = 1;
  	}
  	else
  	{
  		func_34(0);
  		HUD::THEFEED_RESUME();
  		Global_62696 = 0;
  		if (bParam1)
  		{
  			GRAPHICS::CASCADE_SHADOWS_INIT_SESSION();
  		}
  		PLAYER::SET_ALL_RANDOM_PEDS_FLEE(PLAYER::PLAYER_ID(), false);
  		PLAYER::SET_POLICE_IGNORE_PLAYER(PLAYER::PLAYER_ID(), false);
  		func_32(0, bParam3, iParam2, 0);
  		if (NETWORK::NETWORK_IS_GAME_IN_PROGRESS())
  		{
  			if (((((!PED::IS_PED_INJURED(PLAYER::PLAYER_PED_ID()) && !func_30(PLAYER::PLAYER_ID())) && !func_27(PLAYER::PLAYER_ID(), 0)) && !func_26()) && !bParam4) && !bParam5)
  			{
  				ENTITY::SET_ENTITY_INVINCIBLE(PLAYER::PLAYER_PED_ID(), false);
  			}
  		}
  		else if (((!PED::IS_PED_INJURED(PLAYER::PLAYER_PED_ID()) && !func_30(PLAYER::PLAYER_ID())) && !bParam4) && !bParam5)
  		{
  			ENTITY::SET_ENTITY_INVINCIBLE(PLAYER::PLAYER_PED_ID(), false);
  		}
  		Global_77850 = 0;
  	}
  }
  
  bool func_26()
  {
  	return MISC::IS_BIT_SET(Global_1853128[PLAYER::PLAYER_ID() /*888*/].f_36.f_18, 14);
  }
  
  bool func_27(int iParam0, int iParam1)
  {
  	bool bVar0;
  	
  	if (iParam0 == PLAYER::PLAYER_ID())
  	{
  		bVar0 = func_28(-1, 0) == 8;
  	}
  	else
  	{
  		bVar0 = Global_1853128[iParam0 /*888*/].f_205 == 8;
  	}
  	if (iParam1 == 1)
  	{
  		if (NETWORK::NETWORK_IS_PLAYER_ACTIVE(iParam0))
  		{
  			bVar0 = PLAYER::GET_PLAYER_TEAM(iParam0) == 8;
  		}
  	}
  	return bVar0;
  }
  
  int func_28(int iParam0, bool bParam1)
  {
  	int iVar0;
  	int iVar1;
  	
  	iVar1 = iParam0;
  	if (iVar1 == -1)
  	{
  		iVar1 = func_29();
  	}
  	if (Global_1575026[iVar1] == 1)
  	{
  		if (bParam1)
  		{
  		}
  		iVar0 = 8;
  	}
  	else
  	{
  		iVar0 = Global_1574901[iVar1];
  		if (bParam1)
  		{
  		}
  	}
  	return iVar0;
  }
  
  int func_29()
  {
  	return Global_1574907;
  }
  
  int func_30(int iParam0)
  {
  	if (func_27(iParam0, 0))
  	{
  		return 1;
  	}
  	if (func_31())
  	{
  		if (iParam0 == PLAYER::PLAYER_ID())
  		{
  			return 1;
  		}
  	}
  	if (MISC::IS_BIT_SET(Global_2689156[iParam0 /*453*/].f_199, 2))
  	{
  		return 1;
  	}
  	return 0;
  }
  
  bool func_31()
  {
  	return MISC::IS_BIT_SET(Global_2621446, 3);
  }
  
  int func_32(bool bParam0, bool bParam1, var uParam2, bool bParam3)
  {
  	int iVar0;
  	
  	iVar0 = 0;
  	if (MISC::IS_PC_VERSION())
  	{
  		if (CUTSCENE::_0xA0FE76168A189DDB() != bParam0 && uParam2)
  		{
  			CUTSCENE::_0x20746F7B1032A3C7(bParam0, bParam1, true, bParam3);
  			iVar0 = 1;
  		}
  	}
  	return iVar0;
  }
  
  int func_33()
  {
  	if (Global_19954.f_1 == 1 || Global_19954.f_1 == 0)
  	{
  		return 1;
  	}
  	return 0;
  }
  
  void func_34(int iParam0)
  {
  	if (iParam0 == 1)
  	{
  		MISC::SET_BIT(&Global_7824, 13);
  	}
  	else
  	{
  		MISC::CLEAR_BIT(&Global_7824, 13);
  	}
  }
  
  int func_35()
  {
  	if (!func_37() && !func_36())
  	{
  		if (!PLAYER::IS_PLAYER_SCRIPT_CONTROL_ON(PLAYER::GET_PLAYER_INDEX()))
  		{
  			return 1;
  		}
  	}
  	return 0;
  }
  
  int func_36()
  {
  	if (SCRIPT::_GET_NUMBER_OF_REFERENCES_OF_SCRIPT_WITH_NAME_HASH(joaat("appcamera")) > 0)
  	{
  		return 1;
  	}
  	return 0;
  }
  
  int func_37()
  {
  	if (SCRIPT::_GET_NUMBER_OF_REFERENCES_OF_SCRIPT_WITH_NAME_HASH(joaat("appinternet")) > 0)
  	{
  		return 1;
  	}
  	return 0;
  }
  
  void func_38(var uParam0, int iParam1)
  {
  	if ((uParam0[iParam1 /*10*/])->f_7 == 1)
  	{
  		(uParam0[iParam1 /*10*/])->f_7 = 0;
  	}
  }
  
  void func_39(struct<3> Param0, bool bParam3, float fParam4)
  {
  	struct<3> Var0;
  	struct<3> Var3;
  	
  	Var0 = { func_40(Param0, 1f, -fParam4, -fParam4, -fParam4) };
  	Var3 = { func_40(Param0, 1f, fParam4, fParam4, fParam4) };
  	Var0.f_2 = (Var0.f_2 - 22f);
  	Var3.f_2 = (Var3.f_2 + 22f);
  	if (!bParam3)
  	{
  		PATHFIND::SET_ROADS_IN_AREA(Var0, Var3, false, true);
  	}
  	else
  	{
  		PATHFIND::SET_ROADS_BACK_TO_ORIGINAL(Var0, Var3, 1);
  		PED::CLEAR_PED_NON_CREATION_AREA();
  	}
  }
  
  Vector3 func_40(struct<3> Param0, float fParam3, struct<2> Param4, float fParam6)
  {
  	struct<3> Var0;
  	float fVar3;
  	float fVar4;
  	float fVar5;
  	struct<3> Var6;
  	
  	fVar3 = fParam3;
  	fVar4 = SYSTEM::COS(fVar3);
  	fVar5 = SYSTEM::SIN(fVar3);
  	Var0.f_0 = ((Param4.f_0 * fVar4) + (Param4.f_1 * fVar5));
  	Var0.f_1 = ((Param4.f_1 * fVar4) - (Param4.f_0 * fVar5));
  	Var6 = { Param0 + Var0 };
  	return Var6;
  }
  
  void func_41(struct<3> Param0, bool bParam3)
  {
  	struct<3> Var0;
  	struct<3> Var3;
  	
  	if (!func_42(Param0, func_43(), 0))
  	{
  		Var0 = { func_40(Param0, 1f, -30f, -30f, -10f) };
  		Var3 = { func_40(Param0, 1f, 30f, 30f, 10f) };
  		VEHICLE::SET_ALL_VEHICLE_GENERATORS_ACTIVE_IN_AREA(Var0, Var3, bParam3, true);
  	}
  }
  
  bool func_42(struct<3> Param0, struct<3> Param3, bool bParam6)
  {
  	if (bParam6)
  	{
  		return (Param0.f_0 == Param3.f_0 && Param0.f_1 == Param3.f_1);
  	}
  	return ((Param0.f_0 == Param3.f_0 && Param0.f_1 == Param3.f_1) && Param0.f_2 == Param3.f_2);
  }
  
  Vector3 func_43()
  {
  	struct<3> Var0;
  	
  	return Var0;
  }
  
  void func_44(int iParam0)
  {
  	if (func_48())
  	{
  		return;
  	}
  	if (Global_20144)
  	{
  		if (func_47())
  		{
  			func_45(1, 1);
  		}
  		else
  		{
  			func_45(0, 0);
  		}
  	}
  	if (Global_19954.f_1 == 10 || Global_19954.f_1 == 9)
  	{
  		MISC::SET_BIT(&Global_7825, 16);
  	}
  	if (AUDIO::IS_MOBILE_PHONE_CALL_ONGOING())
  	{
  		AUDIO::STOP_SCRIPTED_CONVERSATION(false);
  	}
  	Global_21285 = 5;
  	if (iParam0 == 1)
  	{
  		MISC::SET_BIT(&Global_7824, 30);
  	}
  	else
  	{
  		MISC::CLEAR_BIT(&Global_7824, 30);
  	}
  	if (!func_33())
  	{
  		Global_19954.f_1 = 3;
  	}
  }
  
  void func_45(bool bParam0, bool bParam1)
  {
  	if (bParam0)
  	{
  		if (func_46(0))
  		{
  			Global_20144 = 1;
  			if (bParam1)
  			{
  				MOBILE::GET_MOBILE_PHONE_POSITION(&Global_19891);
  			}
  			Global_19882 = { Global_19900[Global_19899 /*3*/] };
  			MOBILE::SET_MOBILE_PHONE_POSITION(Global_19882);
  		}
  	}
  	else if (Global_20144 == 1)
  	{
  		Global_20144 = 0;
  		Global_19882 = { Global_19907[Global_19899 /*3*/] };
  		if (bParam1)
  		{
  			MOBILE::SET_MOBILE_PHONE_POSITION(Global_19891);
  		}
  		else
  		{
  			MOBILE::SET_MOBILE_PHONE_POSITION(Global_19882);
  		}
  	}
  }
  
  int func_46(int iParam0)
  {
  	if (iParam0 == 1)
  	{
  		if (Global_19954.f_1 > 3)
  		{
  			if (MISC::IS_BIT_SET(Global_7824, 14))
  			{
  				return 1;
  			}
  			else
  			{
  				return 0;
  			}
  		}
  		else
  		{
  			return 0;
  		}
  	}
  	if (SCRIPT::_GET_NUMBER_OF_REFERENCES_OF_SCRIPT_WITH_NAME_HASH(joaat("cellphone_flashhand")) > 0)
  	{
  		return 1;
  	}
  	if (Global_19954.f_1 > 3)
  	{
  		return 1;
  	}
  	return 0;
  }
  
  bool func_47()
  {
  	return MISC::IS_BIT_SET(Global_1958920, 5);
  }
  
  bool func_48()
  {
  	return MISC::IS_BIT_SET(Global_1958920, 19);
  }
  
  void func_49()
  {
  	int iVar0;
  	
  	iVar0 = 0;
  	while (iVar0 < 8)
  	{
  		if (Global_96907[iVar0 /*17*/] && !Global_96907[iVar0 /*17*/].f_1)
  		{
  			if (Global_96907[iVar0 /*17*/].f_3 == 0)
  			{
  				if ((Global_96907[iVar0 /*17*/].f_5 != 88 && Global_96907[iVar0 /*17*/].f_5 != 89) && Global_96907[iVar0 /*17*/].f_5 != 92)
  				{
  					func_50(Global_96907[iVar0 /*17*/].f_5, 1);
  				}
  			}
  		}
  		iVar0++;
  	}
  }
  
  void func_50(int iParam0, bool bParam1)
  {
  	if (bParam1)
  	{
  		if ((iParam0 != 88 && iParam0 != 89) && iParam0 != 92)
  		{
  			Global_93959[iParam0 /*2*/] = 1;
  		}
  	}
  	else
  	{
  		Global_93959[iParam0 /*2*/] = 0;
  	}
  }
  
  void func_51()
  {
  	Global_20151 = 0;
  	func_52();
  }
  
  void func_52()
  {
  	AUDIO::RESTART_SCRIPTED_CONVERSATION();
  	Global_22296 = 0;
  	if (AUDIO::IS_SCRIPTED_CONVERSATION_ONGOING())
  	{
  		AUDIO::STOP_SCRIPTED_CONVERSATION(false);
  		Global_21285 = 6;
  	}
  }
  
  void func_53(int iParam0, int iParam1)
  {
  	switch (iParam0)
  	{
  		case 0:
  			Global_112915.f_19097.f_22[0]++;
  			func_54("Fares Completed ++ = ", Global_112915.f_19097.f_22[0]);
  			break;
  		
  		case 1:
  			Global_112915.f_19097.f_22[1]++;
  			func_54("Fares Failed ++ = ", Global_112915.f_19097.f_22[1]);
  			break;
  		
  		case 2:
  			Global_112915.f_19097.f_22[2]++;
  			func_54("Fares Accepted ++ ", Global_112915.f_19097.f_22[2]);
  			break;
  		
  		case 3:
  			Global_112915.f_19097.f_22[3]++;
  			func_54("Fares Expired ++ ", Global_112915.f_19097.f_22[3]);
  			break;
  		
  		case 13:
  			Global_112915.f_19097.f_22[13]++;
  			func_54("Passengers run ++ = ", Global_112915.f_19097.f_22[13]);
  			break;
  		
  		case 14:
  			Global_112915.f_19097.f_22[14]++;
  			func_54("Passenger Forced to Pay ++ = ", Global_112915.f_19097.f_22[14]);
  			break;
  		
  		case 4:
  			if (iParam1 != 0)
  			{
  				if (iParam1 > Global_112915.f_19097.f_22[4])
  				{
  					Global_112915.f_19097.f_22[4] = iParam1;
  					func_54("This distance ", iParam1);
  					func_54(" is longer than current best", Global_112915.f_19097.f_22[4]);
  				}
  				else
  				{
  					func_54("Longest Distance Not Beat ", Global_112915.f_19097.f_22[4]);
  				}
  			}
  			break;
  		
  		case 5:
  			Global_112915.f_19097.f_22[5] = (Global_112915.f_19097.f_22[5] + iParam1);
  			func_54("Total Distance w/ Passenger = ", Global_112915.f_19097.f_22[5]);
  			break;
  		
  		case 6:
  			if (iParam1 == 0)
  			{
  				Global_112915.f_19097.f_22[6]++;
  			}
  			else
  			{
  				Global_112915.f_19097.f_22[6] = (Global_112915.f_19097.f_22[6] + iParam1);
  			}
  			func_54("Wanted Levels ++ = ", Global_112915.f_19097.f_22[6]);
  			break;
  		
  		case 7:
  			if (iParam1 > 0)
  			{
  				Global_112915.f_19097.f_22[7] = (Global_112915.f_19097.f_22[7] + iParam1);
  			}
  			else
  			{
  				Global_112915.f_19097.f_22[7]++;
  			}
  			func_54("Wanted Levels Lost = ", Global_112915.f_19097.f_22[7]);
  			break;
  		
  		case 8:
  			Global_112915.f_19097.f_22[8]++;
  			func_54("Taxis wrecked ++ = ", Global_112915.f_19097.f_22[8]);
  			break;
  		
  		case 9:
  			Global_112915.f_19097.f_22[9]++;
  			func_54("Horn Honked ++ = ", Global_112915.f_19097.f_22[9]);
  			break;
  		
  		case 10:
  			Global_112915.f_19097.f_22[10] = (Global_112915.f_19097.f_22[10] + iParam1);
  			func_54("Total Money Earned = ", Global_112915.f_19097.f_22[10]);
  			break;
  		
  		case 11:
  			Global_112915.f_19097.f_22[11] = (Global_112915.f_19097.f_22[11] + iParam1);
  			func_54("Total Tips Earned = ", Global_112915.f_19097.f_22[11]);
  			break;
  		
  		case 12:
  			if (iParam1 > Global_112915.f_19097.f_22[12])
  			{
  				Global_112915.f_19097.f_22[12] = iParam1;
  				func_54("New Highest Tip = ", Global_112915.f_19097.f_22[12]);
  			}
  			else
  			{
  				func_54("Highest Tip Not Reached = ", Global_112915.f_19097.f_22[12]);
  			}
  			break;
  	}
  }
  
  void func_54(char* sParam0, int iParam1)
  {
  }
  
  void func_55(var uParam0)
  {
  	func_53(0, 0);
  	if (uParam0->f_411 != 9)
  	{
  		func_438(1);
  		func_67(15, 1);
  	}
  	func_65(&(Global_112915.f_19097), 1024);
  	if (!func_24(Global_112915.f_19097, 64))
  	{
  		func_56(func_63(func_64(uParam0)), 0, 0);
  	}
  }
  
  void func_56(int iParam0, int iParam1, int iParam2)
  {
  	bool bVar0;
  	
  	if (iParam0 < 0)
  	{
  	}
  	if (iParam0 == 321 || iParam0 > 321)
  	{
  	}
  	else
  	{
  		func_62((891 + iParam0), 1, -1);
  	}
  	bVar0 = true;
  	if (Global_112915.f_10194[iParam0 /*12*/].f_5 == 1)
  	{
  		if (Global_112915.f_10194[iParam0 /*12*/].f_6 == 11 || Global_112915.f_10194[iParam0 /*12*/].f_6 == 12)
  		{
  			bVar0 = false;
  		}
  	}
  	else
  	{
  		Global_112915.f_10194[iParam0 /*12*/].f_5 = 1;
  		Global_112915.f_10194[iParam0 /*12*/].f_10 = iParam1;
  		Global_112915.f_10194[iParam0 /*12*/].f_11 = iParam2;
  		if (iParam0 == 287)
  		{
  			STATS::_UPDATE_STAT_INT(joaat("num_hidden_packages_0"), 50, 0);
  		}
  		if (iParam0 == 286)
  		{
  			STATS::_UPDATE_STAT_INT(joaat("num_hidden_packages_1"), 50, 0);
  		}
  		if (iParam0 == 299)
  		{
  			STATS::_UPDATE_STAT_INT(joaat("num_hidden_packages_3"), 50, 0);
  		}
  	}
  	if (bVar0)
  	{
  		func_57();
  	}
  }
  
  void func_57()
  {
  	int iVar0;
  	float fVar1;
  	float fVar2;
  	float fVar3;
  	float fVar4;
  	float fVar5;
  	float fVar6;
  	float fVar7;
  	float fVar8;
  	int iVar9;
  	
  	iVar0 = 0;
  	Global_112651 = 0;
  	Global_112652 = 0;
  	Global_112653 = 0;
  	Global_112654 = 0;
  	Global_112655 = 0;
  	Global_112656 = 0;
  	Global_112657 = 0;
  	fVar1 = 0f;
  	fVar2 = 0f;
  	fVar3 = 0f;
  	fVar4 = 0f;
  	fVar5 = 0f;
  	fVar6 = 0f;
  	fVar7 = 0f;
  	fVar8 = Global_112915.f_10194.f_3853;
  	Global_112915.f_10194.f_3853 = 0f;
  	while (iVar0 < 321)
  	{
  		if (Global_112915.f_10194[iVar0 /*12*/].f_5 == 1)
  		{
  			switch (Global_112915.f_10194[iVar0 /*12*/].f_6)
  			{
  				case 1:
  					Global_112651++;
  					fVar1 = (fVar1 + Global_112915.f_10194[iVar0 /*12*/].f_4);
  					break;
  				
  				case 3:
  					Global_112652++;
  					fVar2 = (fVar2 + Global_112915.f_10194[iVar0 /*12*/].f_4);
  					break;
  				
  				case 5:
  					Global_112653++;
  					fVar3 = (fVar3 + Global_112915.f_10194[iVar0 /*12*/].f_4);
  					break;
  				
  				case 7:
  					Global_112654++;
  					fVar4 = (fVar4 + Global_112915.f_10194[iVar0 /*12*/].f_4);
  					break;
  				
  				case 9:
  					Global_112655++;
  					fVar5 = (fVar5 + (Global_112915.f_10194[iVar0 /*12*/].f_4 * 4f));
  					break;
  				
  				case 11:
  					Global_112656++;
  					fVar6 = (fVar6 + Global_112915.f_10194[iVar0 /*12*/].f_4);
  					break;
  				
  				case 13:
  					Global_112657++;
  					fVar7 = (fVar7 + Global_112915.f_10194[iVar0 /*12*/].f_4);
  					break;
  				
  				default:
  					break;
  				}
  		}
  		iVar0++;
  	}
  	if (Global_112634 > 0)
  	{
  		if (Global_112651 == Global_112634)
  		{
  			fVar1 = 55f;
  		}
  	}
  	if (Global_112635 > 0)
  	{
  		if (Global_112652 == Global_112635)
  		{
  			fVar2 = 10f;
  		}
  	}
  	if (Global_112636 > 0)
  	{
  		if (Global_112653 == Global_112636)
  		{
  			fVar3 = 0f;
  		}
  	}
  	if (Global_112637 > 0)
  	{
  		if (Global_112654 == Global_112637)
  		{
  			fVar4 = 10f;
  		}
  	}
  	if (Global_112638 > 0)
  	{
  		if (((Global_112655 == Global_112638 || (Global_112638 * 10 / Global_112655) < 41) || Global_112655 > Global_112641) || Global_112655 == Global_112641)
  		{
  			if (!MISC::IS_BIT_SET(Global_112915.f_10194.f_3856, 14))
  			{
  				if (Global_112655 == Global_112638)
  				{
  					STATS::_UPDATE_STAT_INT(joaat("num_rndevents_completed"), Global_112638, 0);
  					MISC::SET_BIT(&(Global_112915.f_10194.f_3856), 14);
  				}
  			}
  			fVar5 = 5f;
  		}
  	}
  	if (Global_112639 > 0)
  	{
  		if (Global_112656 == Global_112639)
  		{
  			fVar6 = 15f;
  		}
  	}
  	if (Global_112640 > 0)
  	{
  		if (Global_112657 == Global_112640)
  		{
  			fVar7 = 5f;
  		}
  	}
  	Global_112915.f_10194.f_3853 = ((((((fVar1 + fVar2) + fVar3) + fVar4) + fVar5) + fVar6) + fVar7);
  	if (Global_112655 > Global_112641 || Global_112655 == Global_112641)
  	{
  		iVar9 = Global_112641;
  	}
  	else
  	{
  		iVar9 = Global_112655;
  	}
  	STATS::STAT_SET_INT(joaat("num_missions_completed"), Global_112651, true);
  	STATS::STAT_SET_INT(joaat("num_missions_available"), Global_112634, true);
  	STATS::STAT_SET_INT(joaat("num_minigames_completed"), Global_112652, true);
  	STATS::STAT_SET_INT(joaat("num_minigames_available"), Global_112635, true);
  	STATS::STAT_SET_INT(joaat("num_oddjobs_completed"), Global_112653, true);
  	STATS::STAT_SET_INT(joaat("num_oddjobs_available"), Global_112636, true);
  	STATS::STAT_SET_INT(joaat("num_rndpeople_completed"), Global_112654, true);
  	STATS::STAT_SET_INT(joaat("num_rndpeople_available"), Global_112637, true);
  	STATS::STAT_SET_INT(joaat("num_rndevents_completed"), iVar9, true);
  	STATS::STAT_SET_INT(joaat("num_rndevents_available"), Global_112641, true);
  	STATS::STAT_SET_INT(joaat("num_misc_completed"), (Global_112657 + Global_112656), true);
  	STATS::STAT_SET_INT(joaat("num_misc_available"), (Global_112640 + Global_112639), true);
  	Global_112658 = (Global_112651 * 100 / Global_112634);
  	Global_112660 = ((Global_112653 + Global_112652) * 100 / (Global_112636 + Global_112635));
  	Global_112659 = ((Global_112654 + iVar9) * 100 / (Global_112637 + Global_112641));
  	Global_112661 = ((Global_112656 + Global_112657) * 100 / (Global_112639 + Global_112640));
  	STATS::STAT_SET_FLOAT(joaat("total_progress_made"), Global_112915.f_10194.f_3853, true);
  	STATS::STAT_SET_INT(joaat("percent_story_missions"), Global_112658, true);
  	STATS::STAT_SET_INT(joaat("percent_ambient_missions"), Global_112659, true);
  	STATS::STAT_SET_INT(joaat("percent_oddjobs"), Global_112660, true);
  	if (fVar8 > 0f && SYSTEM::FLOOR(fVar8) < SYSTEM::FLOOR(Global_112915.f_10194.f_3853))
  	{
  		func_61(13, SYSTEM::FLOOR(Global_112915.f_10194.f_3853));
  	}
  	if (!DATAFILE::DATAFILE_IS_SAVE_PENDING())
  	{
  		if (!Global_77852)
  		{
  			if (func_60() == 2 == 0 && !NETWORK::NETWORK_IS_GAME_IN_PROGRESS())
  			{
  				if (NETWORK::NETWORK_IS_CLOUD_AVAILABLE())
  				{
  					Global_112649 = 0;
  				}
  				if (!Global_62690)
  				{
  					func_58();
  				}
  			}
  		}
  	}
  }
  
  int func_58()
  {
  	if (func_59(0))
  	{
  		return 0;
  	}
  	if (Global_100013.f_8)
  	{
  		if (Global_100013.f_10 > 0)
  		{
  			return 0;
  		}
  	}
  	else if (Global_100013.f_10 > 1)
  	{
  		return 0;
  	}
  	Global_100013.f_10++;
  	return 1;
  }
  
  bool func_59(bool bParam0)
  {
  	if (!bParam0 && SCRIPT::_GET_NUMBER_OF_REFERENCES_OF_SCRIPT_WITH_NAME_HASH(joaat("benchmark")) > 0)
  	{
  		return 1;
  	}
  	return MISC::IS_BIT_SET(Global_78100, 0);
  }
  
  int func_60()
  {
  	return Global_31505;
  }
  
  int func_61(int iParam0, int iParam1)
  {
  	int iVar0;
  	
  	if (iParam0 < 0)
  	{
  		return 0;
  	}
  	if (iParam0 > 78)
  	{
  		return 0;
  	}
  	if (iParam1 <= 0 || iParam1 > 100)
  	{
  		return 0;
  	}
  	iVar0 = PLAYER::_GET_ACHIEVEMENT_PROGRESS(iParam0);
  	if (iParam1 > iVar0)
  	{
  		return PLAYER::_SET_ACHIEVEMENT_PROGRESS(iParam0, iParam1);
  	}
  	return 0;
  }
  
  void func_62(int iParam0, bool bParam1, int iParam2)
  {
  	if (iParam2 == -1)
  	{
  		iParam2 = func_29();
  	}
  	STATS::_SET_PACKED_STAT_BOOL(iParam0, bParam1, iParam2);
  }
  
  int func_63(int iParam0)
  {
  	int iVar0;
  	
  	switch (iParam0)
  	{
  		case 0:
  			iVar0 = 199;
  			break;
  		
  		case 1:
  			iVar0 = 200;
  			break;
  		
  		case 2:
  			iVar0 = 201;
  			break;
  		
  		case 3:
  			iVar0 = 202;
  			break;
  		
  		case 4:
  			iVar0 = 203;
  			break;
  		
  		case 5:
  			iVar0 = 204;
  			break;
  		
  		case 6:
  			iVar0 = 205;
  			break;
  		
  		case 7:
  			iVar0 = 206;
  			break;
  		
  		case 8:
  			iVar0 = 207;
  			break;
  		
  		case 9:
  			break;
  		
  		default:
  			iVar0 = 199;
  			break;
  	}
  	return iVar0;
  }
  
  int func_64(var uParam0)
  {
  	return uParam0->f_411;
  }
  
  void func_65(var uParam0, int iParam1)
  {
  	func_66(uParam0, iParam1);
  }
  
  void func_66(var uParam0, int iParam1)
  {
  	*uParam0 = (*uParam0 || iParam1);
  }
  
  int func_67(int iParam0, int iParam1)
  {
  	if (iParam0 >= 78)
  	{
  		return 0;
  	}
  	return func_68(iParam0, iParam1);
  }
  
  int func_68(int iParam0, int iParam1)
  {
  	if (func_80(14) && !func_79(iParam0))
  	{
  		return 0;
  	}
  	if (PLAYER::HAS_ACHIEVEMENT_BEEN_PASSED(iParam0) && iParam1 == 1)
  	{
  		return 0;
  	}
  	if (Global_31755 != 0 && !Global_77852)
  	{
  		return 0;
  	}
  	if (func_78(&Global_4535627))
  	{
  		if (func_76(&Global_4535627, iParam0))
  		{
  			return 0;
  		}
  		if (func_69(&Global_4535627, iParam0))
  		{
  			return 1;
  		}
  	}
  	else
  	{
  		if (!PLAYER::GIVE_ACHIEVEMENT_TO_PLAYER(iParam0))
  		{
  			return 0;
  		}
  		if (PLAYER::HAS_ACHIEVEMENT_BEEN_PASSED(iParam0))
  		{
  			return 1;
  		}
  		return 0;
  	}
  	return 0;
  }
  
  int func_69(var uParam0, int iParam1)
  {
  	int iVar0;
  	var uVar1[78];
  	
  	if (PLAYER::HAS_ACHIEVEMENT_BEEN_PASSED(iParam1))
  	{
  		return 0;
  	}
  	if (func_80(14) && !func_79(iParam1))
  	{
  		return 0;
  	}
  	if (func_76(uParam0, iParam1))
  	{
  		return 0;
  	}
  	if (func_75(uParam0) < 0f)
  	{
  		func_74(uParam0, 0);
  	}
  	func_72(&uVar1);
  	iVar0 = 0;
  	iVar0 = 0;
  	while (iVar0 < (*uParam0 - 1))
  	{
  		uVar1[iVar0 + 1] = (*uParam0)[iVar0];
  		iVar0++;
  	}
  	func_70(&uVar1, iParam1);
  	iVar0 = 0;
  	iVar0 = 0;
  	while (iVar0 < *uParam0)
  	{
  		(*uParam0)[iVar0] = uVar1[iVar0];
  		iVar0++;
  	}
  	return 1;
  }
  
  int func_70(var uParam0, int iParam1)
  {
  	int iVar0;
  	
  	if (PLAYER::HAS_ACHIEVEMENT_BEEN_PASSED(iParam1))
  	{
  		return 0;
  	}
  	if (func_80(14) && !func_79(iParam1))
  	{
  		return 0;
  	}
  	if (func_76(uParam0, iParam1))
  	{
  		return 0;
  	}
  	if (func_75(uParam0) < 0f)
  	{
  		func_74(uParam0, 0);
  	}
  	iVar0 = 0;
  	while (iVar0 < *uParam0)
  	{
  		if (func_71(uParam0, iVar0))
  		{
  			(*uParam0)[iVar0] = iParam1;
  			return 1;
  		}
  		iVar0++;
  	}
  	return 0;
  }
  
  bool func_71(var uParam0, int iParam1)
  {
  	return (*uParam0)[iParam1] == 78;
  }
  
  void func_72(var uParam0)
  {
  	int iVar0;
  	
  	iVar0 = 0;
  	while (iVar0 < *uParam0)
  	{
  		func_73(uParam0, iVar0);
  		iVar0++;
  	}
  	func_74(uParam0, (Global_4535626 - 0.5f));
  }
  
  void func_73(var uParam0, int iParam1)
  {
  	(*uParam0)[iParam1] = 78;
  }
  
  void func_74(var uParam0, float fParam1)
  {
  	if (fParam1 == 0f)
  	{
  		uParam0->f_80 = 0f;
  	}
  	else
  	{
  		uParam0->f_80 = fParam1;
  	}
  }
  
  float func_75(var uParam0)
  {
  	return uParam0->f_80;
  }
  
  bool func_76(var uParam0, int iParam1)
  {
  	return func_77(uParam0, iParam1) != -1;
  }
  
  int func_77(var uParam0, int iParam1)
  {
  	int iVar0;
  	
  	iVar0 = 0;
  	while (iVar0 < *uParam0)
  	{
  		if ((*uParam0)[iVar0] == iParam1)
  		{
  			return iVar0;
  		}
  		iVar0++;
  	}
  	return -1;
  }
  
  bool func_78(var uParam0)
  {
  	return uParam0->f_79 == 1;
  }
  
  int func_79(int iParam0)
  {
  	switch (iParam0)
  	{
  		case 60:
  		case 61:
  		case 62:
  		case 63:
  		case 64:
  		case 65:
  		case 66:
  		case 67:
  		case 68:
  		case 69:
  			return 1;
  		
  		default:
  	}
  	return 0;
  }
  
  bool func_80(int iParam0)
  {
  	return Global_42596 == iParam0;
  }
  
  int func_81(var uParam0, int iParam1)
  {
  	switch (iLocal_168)
  	{
  		case 0:
  			if (!func_191() && func_418(uParam0, 0) > 1f)
  			{
  				if (func_35())
  				{
  					PLAYER::SET_PLAYER_CONTROL(PLAYER::PLAYER_ID(), true, 0);
  				}
  				func_113(uParam0);
  				func_22(&(Global_112915.f_19097), 4096);
  				func_110(iParam1, "TAXI_FARE_TITLE", uParam0->f_50, uParam0->f_56, ((uParam0->f_50 + uParam0->f_56) + uParam0->f_105), uParam0->f_105, func_112(uParam0), "TAXI_FARE_MID", 4000, 1);
  				iParam1->f_1 = 4000;
  				AUDIO::PLAY_SOUND_FRONTEND(-1, "CHECKPOINT_UNDER_THE_BRIDGE", "HUD_MINI_GAME_SOUNDSET", false);
  				func_109(1);
  				iLocal_168 = 6;
  			}
  			break;
  		
  		case 6:
  			if (!func_103(iParam1, 0))
  			{
  				func_82(uParam0);
  				func_308(uParam0, 0, 0, 0);
  				func_109(0);
  				iLocal_168 = 7;
  				return 1;
  			}
  			break;
  	}
  	return 0;
  }
  
  void func_82(var uParam0)
  {
  	int iVar0;
  	
  	iVar0 = ((uParam0->f_50 + uParam0->f_56) + uParam0->f_105);
  	if (iVar0 > 0)
  	{
  		func_83(func_101(), 21, iVar0, 0, 0);
  		func_53(10, iVar0);
  		iLocal_57[0] = iVar0;
  	}
  }
  
  void func_83(int iParam0, int iParam1, int iParam2, bool bParam3, bool bParam4)
  {
  	int iVar0;
  	int iVar1;
  	
  	if (func_100(iParam0) == 3)
  	{
  		return;
  	}
  	if (func_100(iParam0) == 4)
  	{
  		return;
  	}
  	func_84(func_100(iParam0), 1, iParam1, iParam2, 0);
  	if (bParam3)
  	{
  		iVar0 = 0;
  		if (bParam4)
  		{
  			switch (iParam0)
  			{
  				case 0:
  					iVar1 = joaat("sp0_money_made_from_random_peds");
  					break;
  				
  				case 1:
  					iVar1 = joaat("sp1_money_made_from_random_peds");
  					break;
  				
  				case 2:
  					iVar1 = joaat("sp2_money_made_from_random_peds");
  					break;
  				
  				default:
  					return;
  			}
  		}
  		else
  		{
  			switch (iParam0)
  			{
  				case 0:
  					iVar1 = joaat("sp0_money_made_from_missions");
  					break;
  				
  				case 1:
  					iVar1 = joaat("sp1_money_made_from_missions");
  					break;
  				
  				case 2:
  					iVar1 = joaat("sp2_money_made_from_missions");
  					break;
  				
  				default:
  					return;
  				}
  		}
  		STATS::STAT_GET_INT(iVar1, &iVar0, -1);
  		iVar0 = (iVar0 + iParam2);
  		STATS::STAT_SET_INT(iVar1, iVar0, true);
  	}
  }
  
  int func_84(int iParam0, int iParam1, int iParam2, int iParam3, bool bParam4)
  {
  	float fVar0;
  	int iVar1;
  	int iVar2;
  	int iVar3;
  	int iVar4;
  	int iVar5;
  	
  	func_99();
  	if (iParam3 < 1)
  	{
  		return 0;
  	}
  	fVar0 = 1f;
  	switch (iParam1)
  	{
  		case 0:
  			switch (iParam0)
  			{
  				case 0:
  					func_98(99, 1);
  					func_97(joaat("sp0_money_total_spent"), iParam3);
  					break;
  				
  				case 1:
  					func_97(joaat("sp1_money_total_spent"), iParam3);
  					break;
  				
  				case 2:
  					func_97(joaat("sp2_money_total_spent"), iParam3);
  					break;
  			}
  			func_96(0);
  			switch (iParam2)
  			{
  				case 127:
  				case 129:
  				case 125:
  				case 126:
  				case 128:
  					if (func_93(5))
  					{
  						fVar0 = 0.9f;
  						iVar1 = 5;
  					}
  					break;
  				
  				case 63:
  				case 64:
  				case 65:
  				case 66:
  				case 67:
  				case 68:
  					switch (iParam0)
  					{
  						case 0:
  							func_97(joaat("sp0_money_spent_on_tattoos"), iParam3);
  							break;
  						
  						case 1:
  							func_97(joaat("sp1_money_spent_on_tattoos"), iParam3);
  							break;
  						
  						case 2:
  							func_97(joaat("sp2_money_spent_on_tattoos"), iParam3);
  							break;
  					}
  					if (func_93(1))
  					{
  						fVar0 = 0f;
  						iVar1 = 1;
  					}
  					break;
  				
  				case 21:
  					switch (iParam0)
  					{
  						case 0:
  							func_97(joaat("sp0_money_spent_on_taxis"), iParam3);
  							break;
  						
  						case 1:
  							func_97(joaat("sp1_money_spent_on_taxis"), iParam3);
  							break;
  						
  						case 2:
  							func_97(joaat("sp2_money_spent_on_taxis"), iParam3);
  							break;
  					}
  					break;
  				
  				case 25:
  					switch (iParam0)
  					{
  						case 0:
  							func_97(joaat("sp0_money_spent_in_strip_clubs"), iParam3);
  							break;
  						
  						case 1:
  							func_97(joaat("sp1_money_spent_in_strip_clubs"), iParam3);
  							break;
  						
  						case 2:
  							func_97(joaat("sp2_money_spent_in_strip_clubs"), iParam3);
  							break;
  					}
  					break;
  				
  				case 99:
  				case 100:
  				case 101:
  				case 102:
  				case 104:
  				case 105:
  				case 106:
  				case 107:
  				case 108:
  				case 109:
  				case 110:
  				case 111:
  				case 112:
  				case 113:
  					switch (iParam0)
  					{
  						case 0:
  							func_97(joaat("sp0_money_spent_property"), iParam3);
  							break;
  						
  						case 1:
  							func_97(joaat("sp1_money_spent_property"), iParam3);
  							break;
  						
  						case 2:
  							func_97(joaat("sp2_money_spent_property"), iParam3);
  							break;
  					}
  					break;
  				
  				default:
  					switch (SCRIPT::GET_HASH_OF_THIS_SCRIPT_NAME())
  					{
  						case joaat("clothes_shop_sp"):
  							switch (iParam0)
  							{
  								case 0:
  									func_97(joaat("sp0_money_spent_in_clothes"), iParam3);
  									break;
  								
  								case 1:
  									func_97(joaat("sp1_money_spent_in_clothes"), iParam3);
  									break;
  								
  								case 2:
  									func_97(joaat("sp2_money_spent_in_clothes"), iParam3);
  									break;
  							}
  							break;
  						
  						case joaat("hairdo_shop_sp"):
  							switch (iParam0)
  							{
  								case 0:
  									func_97(joaat("sp0_money_spent_on_hairdos"), iParam3);
  									break;
  								
  								case 1:
  									func_97(joaat("sp1_money_spent_on_hairdos"), iParam3);
  									break;
  								
  								case 2:
  									func_97(joaat("sp2_money_spent_on_hairdos"), iParam3);
  									break;
  							}
  							if (func_93(0))
  							{
  								fVar0 = 0f;
  								iVar1 = 0;
  							}
  							break;
  						
  						case joaat("gunclub_shop"):
  							switch (iParam0)
  							{
  								case 0:
  									func_97(joaat("sp0_money_spent_in_buying_guns"), iParam3);
  									break;
  								
  								case 1:
  									func_97(joaat("sp1_money_spent_in_buying_guns"), iParam3);
  									break;
  								
  								case 2:
  									func_97(joaat("sp2_money_spent_in_buying_guns"), iParam3);
  									break;
  							}
  							break;
  						
  						case joaat("carmod_shop"):
  							switch (iParam0)
  							{
  								case 0:
  									func_97(joaat("sp0_money_spent_car_mods"), iParam3);
  									break;
  								
  								case 1:
  									func_97(joaat("sp1_money_spent_car_mods"), iParam3);
  									break;
  								
  								case 2:
  									func_97(joaat("sp2_money_spent_car_mods"), iParam3);
  									break;
  							}
  							func_92(iParam3);
  							break;
  					}
  					break;
  			}
  			break;
  		
  		case 1:
  			switch (iParam0)
  			{
  				case 0:
  					func_98(95, iParam3);
  					break;
  				
  				case 1:
  					func_98(97, iParam3);
  					break;
  				
  				case 2:
  					func_98(96, iParam3);
  					break;
  			}
  			func_98(98, iParam3);
  			break;
  	}
  	iVar2 = iParam0;
  	iParam3 = SYSTEM::FLOOR((fVar0 * SYSTEM::TO_FLOAT(iParam3)));
  	iVar3 = 0;
  	iVar4 = iParam3;
  	if (fVar0 == 0f)
  	{
  		func_87(iVar1);
  		return 1;
  	}
  	else if (fVar0 != 1f)
  	{
  		func_87(iVar1);
  	}
  	iVar5 = (Global_59864[iVar2] + iParam3);
  	switch (iParam1)
  	{
  		case 1:
  			if (Global_59864[iVar2] >= 0 && iParam3 > 0)
  			{
  				if (iVar5 <= 0)
  				{
  					Global_59864[iVar2] = 2147483647;
  				}
  				else
  				{
  					Global_59864[iVar2] = (Global_59864[iVar2] + iParam3);
  				}
  			}
  			switch (iParam0)
  			{
  				case 0:
  					func_97(joaat("sp0_total_cash_earned"), iParam3);
  					break;
  				
  				case 1:
  					func_97(joaat("sp1_total_cash_earned"), iParam3);
  					break;
  				
  				case 2:
  					func_97(joaat("sp2_total_cash_earned"), iParam3);
  					break;
  			}
  			break;
  		
  		case 0:
  			if (!bParam4)
  			{
  				if ((Global_59864[iVar2] - iParam3) < 0)
  				{
  					return 0;
  				}
  			}
  			iVar3 = Global_59864[iVar2];
  			Global_59864[iVar2] = (Global_59864[iVar2] - iParam3);
  			if (bParam4)
  			{
  				iVar4 = iVar3;
  			}
  			break;
  	}
  	if (iParam2 == 1)
  	{
  		if (iVar4 > 20)
  		{
  		}
  	}
  	else
  	{
  		Global_112915.f_20564.f_233[iVar2 /*69*/].f_2[Global_112915.f_20564.f_233[iVar2 /*69*/].f_1 /*6*/] = iParam1;
  		Global_112915.f_20564.f_233[iVar2 /*69*/].f_2[Global_112915.f_20564.f_233[iVar2 /*69*/].f_1 /*6*/].f_1 = iParam2;
  		Global_112915.f_20564.f_233[iVar2 /*69*/].f_2[Global_112915.f_20564.f_233[iVar2 /*69*/].f_1 /*6*/].f_2 = iParam3;
  		Global_112915.f_20564.f_233[iVar2 /*69*/]++;
  		Global_112915.f_20564.f_233[iVar2 /*69*/].f_1++;
  		if (Global_112915.f_20564.f_233[iVar2 /*69*/].f_1 > 10)
  		{
  			Global_112915.f_20564.f_233[iVar2 /*69*/].f_1 = 0;
  		}
  	}
  	func_86(iParam0);
  	if (Global_42596 == 15)
  	{
  		func_85(0);
  	}
  	return 1;
  }
  
  void func_85(bool bParam0)
  {
  	int iVar0;
  	int iVar1;
  	
  	iVar0 = 0;
  	iVar1 = 0;
  	iVar0 = 0;
  	while (iVar0 < 3)
  	{
  		iVar1 = 0;
  		while (iVar1 < 11)
  		{
  			Global_112915.f_20564.f_233[iVar0 /*69*/].f_2[iVar1 /*6*/].f_3 = Global_112915.f_20564.f_233[iVar0 /*69*/].f_2[iVar1 /*6*/];
  			Global_112915.f_20564.f_233[iVar0 /*69*/].f_2[iVar1 /*6*/].f_4 = Global_112915.f_20564.f_233[iVar0 /*69*/].f_2[iVar1 /*6*/].f_1;
  			Global_112915.f_20564.f_233[iVar0 /*69*/].f_2[iVar1 /*6*/].f_5 = Global_112915.f_20564.f_233[iVar0 /*69*/].f_2[iVar1 /*6*/].f_2;
  			iVar1++;
  		}
  		iVar0++;
  	}
  	iVar0 = 0;
  	while (iVar0 < 10)
  	{
  		Global_59872[iVar0 /*3*/][0] = Global_112915.f_20564[iVar0];
  		Global_59872.f_31[iVar0 /*3*/][0] = Global_112915.f_20564.f_11[iVar0];
  		Global_59872.f_62[iVar0 /*3*/][0] = Global_112915.f_20564.f_22[iVar0];
  		Global_59872.f_93[iVar0 /*3*/][0] = Global_112915.f_20564.f_33[iVar0];
  		Global_59872.f_124[iVar0 /*3*/][0] = Global_112915.f_20564.f_44[iVar0];
  		Global_59872.f_155[iVar0 /*3*/][0] = Global_112915.f_20564.f_55[iVar0];
  		Global_59872.f_186[iVar0 /*3*/][0] = Global_112915.f_20564.f_66[iVar0];
  		Global_59872.f_217[iVar0 /*3*/][0] = Global_112915.f_20564.f_77[iVar0];
  		Global_59872.f_248[iVar0 /*3*/][0] = Global_112915.f_20564.f_88[iVar0];
  		if (!bParam0)
  		{
  			Global_59872[iVar0 /*3*/][1] = Global_112915.f_20564[iVar0];
  			Global_59872.f_31[iVar0 /*3*/][1] = Global_112915.f_20564.f_11[iVar0];
  			Global_59872.f_62[iVar0 /*3*/][1] = Global_112915.f_20564.f_22[iVar0];
  			Global_59872.f_93[iVar0 /*3*/][1] = Global_112915.f_20564.f_33[iVar0];
  			Global_59872.f_124[iVar0 /*3*/][1] = Global_112915.f_20564.f_44[iVar0];
  			Global_59872.f_155[iVar0 /*3*/][1] = Global_112915.f_20564.f_55[iVar0];
  			Global_59872.f_186[iVar0 /*3*/][1] = Global_112915.f_20564.f_66[iVar0];
  			Global_59872.f_217[iVar0 /*3*/][1] = Global_112915.f_20564.f_77[iVar0];
  			Global_59872.f_248[iVar0 /*3*/][1] = Global_112915.f_20564.f_88[iVar0];
  		}
  		iVar0++;
  	}
  }
  
  void func_86(int iParam0)
  {
  	int iVar0;
  	
  	iVar0 = Global_59864[iParam0];
  	switch (iParam0)
  	{
  		case 0:
  			STATS::STAT_SET_INT(joaat("sp0_total_cash"), iVar0, true);
  			break;
  		
  		case 1:
  			STATS::STAT_SET_INT(joaat("sp1_total_cash"), iVar0, true);
  			break;
  		
  		case 2:
  			STATS::STAT_SET_INT(joaat("sp2_total_cash"), iVar0, true);
  			break;
  	}
  }
  
  void func_87(int iParam0)
  {
  	bool bVar0;
  	char cVar1[64];
  	
  	if (iParam0 == 8)
  	{
  		func_62(129, 0, -1);
  		return;
  	}
  	if (iParam0 == 9)
  	{
  		func_62(135, 0, -1);
  		return;
  	}
  	if (iParam0 == 10)
  	{
  		func_62(136, 0, -1);
  		return;
  	}
  	if (iParam0 == 11)
  	{
  		func_62(137, 0, -1);
  		return;
  	}
  	if (iParam0 == 12)
  	{
  		func_90(8271, 0, -1, 1, 0);
  		return;
  	}
  	if (iParam0 == 13)
  	{
  		func_90(8272, 0, -1, 1, 0);
  		return;
  	}
  	if (iParam0 == 14)
  	{
  		func_90(8273, 0, -1, 1, 0);
  		return;
  	}
  	if (iParam0 == 15)
  	{
  		func_90(8274, 0, -1, 1, 0);
  		return;
  	}
  	if (iParam0 == 16)
  	{
  		func_90(8275, 0, -1, 1, 0);
  		return;
  	}
  	if (iParam0 == 17)
  	{
  		func_90(8276, 0, -1, 1, 0);
  		return;
  	}
  	bVar0 = false;
  	if (!NETWORK::NETWORK_IS_GAME_IN_PROGRESS())
  	{
  		if (MISC::IS_BIT_SET(Global_112915.f_20564.f_471, iParam0))
  		{
  			bVar0 = true;
  			MISC::CLEAR_BIT(&(Global_112915.f_20564.f_471), iParam0);
  		}
  	}
  	else if (MISC::IS_BIT_SET(Global_112915.f_20564.f_471, iParam0) || MISC::IS_BIT_SET(Global_2359296[func_89() /*5559*/].f_675.f_10, iParam0))
  	{
  		bVar0 = true;
  		MISC::CLEAR_BIT(&(Global_112915.f_20564.f_471), iParam0);
  		MISC::CLEAR_BIT(&(Global_2359296[func_89() /*5559*/].f_675.f_10), iParam0);
  	}
  	if (bVar0)
  	{
  		StringCopy(&cVar1, "CHAR_LIFEINVADER", 64);
  		HUD::BEGIN_TEXT_COMMAND_THEFEED_POST("COUP_RED");
  		HUD::ADD_TEXT_COMPONENT_SUBSTRING_TEXT_LABEL(func_88(iParam0));
  		HUD::END_TEXT_COMMAND_THEFEED_POST_MESSAGETEXT(&cVar1, &cVar1, true, 0, "", 0);
  	}
  }
  
  char* func_88(int iParam0)
  {
  	switch (iParam0)
  	{
  		case 0:
  			return "COUP_HAIRC";
  		
  		case 1:
  			return "COUP_TATTOO";
  		
  		case 2:
  			return "COUP_WARSTOCK";
  		
  		case 3:
  			return "COUP_MOSPORT";
  		
  		case 4:
  			return "COUP_ELITAS";
  		
  		case 5:
  			return "COUP_MEDSPENS";
  		
  		case 6:
  			return "COUP_SPRUNK";
  		
  		case 7:
  			return "COUP_RESPRAY";
  		
  		case 8:
  			return "COUP_XMAS2017";
  		
  		case 9:
  			return "COUP_CAR_XMAS2018";
  		
  		case 10:
  			return "COUP_HELI_XMAS2018";
  		
  		case 11:
  			return "COUP_CAR2_XMAS2018";
  		
  		case 12:
  			return "COUP_CAS_ELITAS";
  		
  		case 13:
  			return "COUP_CAS_DOCKTEASE";
  		
  		case 14:
  			return "COUP_CAS_MOSPORT";
  		
  		case 15:
  			return "COUP_CAS_SSASA";
  		
  		case 16:
  			return "COUP_CAS_WARSTOCK";
  		
  		case 17:
  			return "COUP_CAS_PANDM";
  			break;
  		
  		default:
  			break;
  	}
  	return "";
  }
  
  int func_89()
  {
  	int iVar0;
  	
  	iVar0 = 0;
  	return iVar0;
  }
  
  void func_90(int iParam0, int iParam1, int iParam2, bool bParam3, bool bParam4)
  {
  	int iVar0;
  	
  	if (bParam4)
  	{
  	}
  	iVar0 = Global_2821895[iParam0 /*3*/][func_91(iParam2)];
  	if (iVar0 != 0)
  	{
  		STATS::STAT_SET_INT(iVar0, iParam1, bParam3);
  	}
  }
  
  int func_91(var uParam0)
  {
  	int iVar0;
  	int iVar1;
  	
  	iVar0 = uParam0;
  	if (iVar0 == -1)
  	{
  		iVar1 = func_29();
  		if (iVar1 > -1)
  		{
  			Global_2821607 = 0;
  			iVar0 = iVar1;
  		}
  		else
  		{
  			iVar0 = 0;
  			Global_2821607 = 1;
  		}
  	}
  	return iVar0;
  }
  
  void func_92(int iParam0)
  {
  	func_98(93, iParam0);
  	func_98(29, iParam0);
  	func_98(30, iParam0);
  }
  
  bool func_93(int iParam0)
  {
  	int iVar0;
  	int iVar1;
  	int iVar2;
  	int iVar3;
  	int iVar4;
  	int iVar5;
  	int iVar6;
  	int iVar7;
  	int iVar8;
  	int iVar9;
  	int iVar10;
  	int iVar11;
  	
  	if (iParam0 == 8)
  	{
  		return func_95(129, -1);
  	}
  	if (iParam0 == 9)
  	{
  		return func_95(135, -1);
  	}
  	if (iParam0 == 10)
  	{
  		return func_95(136, -1);
  	}
  	if (iParam0 == 11)
  	{
  		return func_95(137, -1);
  	}
  	if (iParam0 == 12)
  	{
  		iVar0 = NETWORK::GET_CLOUD_TIME_AS_INT();
  		iVar1 = func_94(8271, -1, 0);
  		if (iVar1 == 0 || iVar0 >= iVar1)
  		{
  			return 0;
  		}
  		return 1;
  	}
  	if (iParam0 == 13)
  	{
  		iVar2 = NETWORK::GET_CLOUD_TIME_AS_INT();
  		iVar3 = func_94(8272, -1, 0);
  		if (iVar3 == 0 || iVar2 >= iVar3)
  		{
  			return 0;
  		}
  		return 1;
  	}
  	if (iParam0 == 14)
  	{
  		iVar4 = NETWORK::GET_CLOUD_TIME_AS_INT();
  		iVar5 = func_94(8273, -1, 0);
  		if (iVar5 == 0 || iVar4 >= iVar5)
  		{
  			return 0;
  		}
  		return 1;
  	}
  	if (iParam0 == 15)
  	{
  		iVar6 = NETWORK::GET_CLOUD_TIME_AS_INT();
  		iVar7 = func_94(8274, -1, 0);
  		if (iVar7 == 0 || iVar6 >= iVar7)
  		{
  			return 0;
  		}
  		return 1;
  	}
  	if (iParam0 == 16)
  	{
  		iVar8 = NETWORK::GET_CLOUD_TIME_AS_INT();
  		iVar9 = func_94(8275, -1, 0);
  		if (iVar9 == 0 || iVar8 >= iVar9)
  		{
  			return 0;
  		}
  		return 1;
  	}
  	if (iParam0 == 17)
  	{
  		iVar10 = NETWORK::GET_CLOUD_TIME_AS_INT();
  		iVar11 = func_94(8276, -1, 0);
  		if (iVar11 == 0 || iVar10 >= iVar11)
  		{
  			return 0;
  		}
  		return 1;
  	}
  	if (!NETWORK::NETWORK_IS_GAME_IN_PROGRESS())
  	{
  		return MISC::IS_BIT_SET(Global_112915.f_20564.f_471, iParam0);
  	}
  	return MISC::IS_BIT_SET(Global_2359296[func_89() /*5559*/].f_675.f_10, iParam0);
  }
  
  int func_94(int iParam0, int iParam1, int iParam2)
  {
  	int iVar0;
  	var uVar1;
  	
  	if (iParam0 != 12597)
  	{
  		if (iParam2 == 0)
  		{
  		}
  		iVar0 = Global_2821895[iParam0 /*3*/][func_91(iParam1)];
  		if (STATS::STAT_GET_INT(iVar0, &uVar1, -1))
  		{
  			return uVar1;
  		}
  	}
  	return 0;
  }
  
  bool func_95(int iParam0, int iParam1)
  {
  	if (iParam1 == -1)
  	{
  		iParam1 = func_29();
  	}
  	return STATS::_GET_PACKED_STAT_BOOL(iParam0, iParam1);
  }
  
  int func_96(bool bParam0)
  {
  	int iVar0;
  	int iVar1;
  	int iVar2;
  	
  	iVar1 = 0;
  	if (PLAYER::HAS_ACHIEVEMENT_BEEN_PASSED(27))
  	{
  		return 0;
  	}
  	if (STATS::STAT_GET_INT(joaat("sp0_money_total_spent"), &iVar0, -1))
  	{
  		iVar1 = (iVar1 + iVar0);
  	}
  	if (STATS::STAT_GET_INT(joaat("sp1_money_total_spent"), &iVar0, -1))
  	{
  		iVar1 = (iVar1 + iVar0);
  	}
  	if (STATS::STAT_GET_INT(joaat("sp2_money_total_spent"), &iVar0, -1))
  	{
  		iVar1 = (iVar1 + iVar0);
  	}
  	if (bParam0)
  	{
  	}
  	iVar2 = 0;
  	STATS::STAT_GET_INT(joaat("num_cash_spent"), &iVar2, -1);
  	if (iVar1 > 0 && (iVar2 / 2000000) != (iVar1 / 2000000))
  	{
  		STATS::STAT_SET_INT(joaat("num_cash_spent"), iVar1, true);
  		func_61(27, iVar1);
  	}
  	if (iVar1 < 200000000)
  	{
  		return 0;
  	}
  	func_67(27, 1);
  	return 1;
  }
  
  void func_97(int iParam0, int iParam1)
  {
  	int iVar0;
  	
  	STATS::STAT_GET_INT(iParam0, &iVar0, -1);
  	iVar0 = (iVar0 + iParam1);
  	STATS::STAT_SET_INT(iParam0, iVar0, true);
  }
  
  void func_98(int iParam0, int iParam1)
  {
  	int iVar0;
  	
  	if (iParam1 < 1)
  	{
  		return;
  	}
  	if (Global_58432[iParam0 /*7*/].f_2)
  	{
  		return;
  	}
  	if (NETWORK::NETWORK_IS_GAME_IN_PROGRESS())
  	{
  		return;
  	}
  	if (Global_58432[iParam0 /*7*/])
  	{
  		STATS::STAT_GET_INT(Global_58432[iParam0 /*7*/].f_1, &iVar0, -1);
  		iVar0 = (iVar0 + iParam1);
  		STATS::STAT_SET_INT(Global_58432[iParam0 /*7*/].f_1, iVar0, true);
  	}
  }
  
  void func_99()
  {
  	int iVar0;
  	
  	if (NETWORK::NETWORK_IS_SIGNED_IN())
  	{
  		STATS::STAT_GET_INT(joaat("sp0_total_cash"), &iVar0, -1);
  		if (!Global_59864[0] == iVar0)
  		{
  			Global_59864[0] = iVar0;
  		}
  		STATS::STAT_GET_INT(joaat("sp1_total_cash"), &iVar0, -1);
  		if (!Global_59864[1] == iVar0)
  		{
  			Global_59864[1] = iVar0;
  		}
  		STATS::STAT_GET_INT(joaat("sp2_total_cash"), &iVar0, -1);
  		if (!Global_59864[2] == iVar0)
  		{
  			Global_59864[2] = iVar0;
  		}
  	}
  }
  
  int func_100(int iParam0)
  {
  	return Global_1918[iParam0 /*29*/].f_17;
  }
  
  int func_101()
  {
  	func_102();
  	return Global_112915.f_2363.f_539.f_4321;
  }
  
  void func_102()
  {
  	int iVar0;
  	
  	if (ENTITY::DOES_ENTITY_EXIST(PLAYER::PLAYER_PED_ID()))
  	{
  		if (func_4(Global_112915.f_2363.f_539.f_4321) != ENTITY::GET_ENTITY_MODEL(PLAYER::PLAYER_PED_ID()))
  		{
  			iVar0 = func_3(PLAYER::PLAYER_PED_ID());
  			if (func_6(iVar0) && (!func_80(14) || Global_111866))
  			{
  				if (Global_112915.f_2363.f_539.f_4321 != iVar0 && func_6(Global_112915.f_2363.f_539.f_4321))
  				{
  					Global_112915.f_2363.f_539.f_4322 = Global_112915.f_2363.f_539.f_4321;
  				}
  				Global_112915.f_2363.f_539.f_4323 = iVar0;
  				Global_112915.f_2363.f_539.f_4321 = iVar0;
  				return;
  			}
  		}
  		else
  		{
  			if (Global_112915.f_2363.f_539.f_4321 != 145)
  			{
  				Global_112915.f_2363.f_539.f_4323 = Global_112915.f_2363.f_539.f_4321;
  			}
  			return;
  		}
  	}
  	Global_112915.f_2363.f_539.f_4321 = 145;
  }
  
  int func_103(var uParam0, int iParam1)
  {
  	if (!func_16(&(uParam0->f_2)))
  	{
  		func_107(&(uParam0->f_2));
  	}
  	HUD::HIDE_HUD_COMPONENT_THIS_FRAME(14);
  	GRAPHICS::DRAW_SCALEFORM_MOVIE_FULLSCREEN(*uParam0, 255, 255, 255, 255, 0);
  	if (iParam1 || uParam0->f_8)
  	{
  		if (PAD::IS_CONTROL_JUST_PRESSED(2, 201) || uParam0->f_8)
  		{
  			if (!func_16(&(uParam0->f_5)))
  			{
  				func_107(&(uParam0->f_5));
  				func_106(uParam0, 1051260355);
  			}
  		}
  		if (func_16(&(uParam0->f_5)))
  		{
  			if (func_105(&(uParam0->f_5)) > 0.33f)
  			{
  				func_104(&(uParam0->f_5));
  				return 0;
  			}
  		}
  	}
  	if (uParam0->f_1 == -1)
  	{
  		return 1;
  	}
  	if (func_105(&(uParam0->f_2)) * 1000f) > SYSTEM::TO_FLOAT(uParam0->f_1)
  	{
  		if (!func_16(&(uParam0->f_5)))
  		{
  			func_107(&(uParam0->f_5));
  			func_106(uParam0, 1051260355);
  		}
  		else if (func_105(&(uParam0->f_5)) > 0.33f)
  		{
  			func_104(&(uParam0->f_2));
  			return 0;
  		}
  	}
  	return 1;
  }
  
  void func_104(var uParam0)
  {
  	uParam0->f_1 = 0f;
  	uParam0->f_2 = 0f;
  	*uParam0 = 0;
  }
  
  float func_105(var uParam0)
  {
  	if (func_16(uParam0))
  	{
  		if (func_15(uParam0))
  		{
  			return uParam0->f_2;
  		}
  		else
  		{
  			return (func_14(MISC::IS_BIT_SET(*uParam0, 4)) - uParam0->f_1);
  		}
  	}
  	return uParam0->f_1;
  }
  
  void func_106(var uParam0, float fParam1)
  {
  	GRAPHICS::BEGIN_SCALEFORM_MOVIE_METHOD(*uParam0, "SHARD_ANIM_OUT");
  	GRAPHICS::SCALEFORM_MOVIE_METHOD_ADD_PARAM_INT(uParam0->f_9);
  	GRAPHICS::SCALEFORM_MOVIE_METHOD_ADD_PARAM_FLOAT(fParam1);
  	GRAPHICS::END_SCALEFORM_MOVIE_METHOD();
  }
  
  void func_107(int* iParam0)
  {
  	func_108(iParam0, 0f);
  }
  
  void func_108(int* iParam0, float fParam1)
  {
  	iParam0->f_1 = (func_14(MISC::IS_BIT_SET(*iParam0, 4)) - fParam1);
  	MISC::SET_BIT(iParam0, 1);
  	MISC::CLEAR_BIT(iParam0, 2);
  	iParam0->f_2 = 0f;
  }
  
  void func_109(int iParam0)
  {
  	Global_78112 = iParam0;
  	Global_78113 = iParam0;
  }
  
  void func_110(var uParam0, char* sParam1, int iParam2, int iParam3, int iParam4, int iParam5, char* sParam6, char* sParam7, int iParam8, int iParam9)
  {
  	GRAPHICS::BEGIN_SCALEFORM_MOVIE_METHOD(*uParam0, func_111());
  	GRAPHICS::BEGIN_TEXT_COMMAND_SCALEFORM_STRING("STRING");
  	HUD::SET_COLOUR_OF_NEXT_TEXT_COMPONENT(iParam9);
  	HUD::ADD_TEXT_COMPONENT_SUBSTRING_TEXT_LABEL(sParam1);
  	GRAPHICS::END_TEXT_COMMAND_SCALEFORM_STRING();
  	GRAPHICS::BEGIN_TEXT_COMMAND_SCALEFORM_STRING(sParam7);
  	HUD::ADD_TEXT_COMPONENT_INTEGER(iParam2);
  	HUD::ADD_TEXT_COMPONENT_INTEGER(iParam3);
  	HUD::ADD_TEXT_COMPONENT_SUBSTRING_TEXT_LABEL(sParam6);
  	HUD::ADD_TEXT_COMPONENT_INTEGER(iParam5);
  	HUD::ADD_TEXT_COMPONENT_INTEGER(iParam4);
  	GRAPHICS::END_TEXT_COMMAND_SCALEFORM_STRING();
  	GRAPHICS::END_SCALEFORM_MOVIE_METHOD();
  	func_107(&(uParam0->f_2));
  	uParam0->f_1 = iParam8;
  	uParam0->f_9 = 1;
  }
  
  char* func_111()
  {
  	if (NETWORK::NETWORK_IS_GAME_IN_PROGRESS())
  	{
  		return "SHOW_COND_SHARD_MESSAGE";
  	}
  	return "SHOW_SHARD_MIDSIZED_MESSAGE";
  }
  
  char* func_112(var uParam0)
  {
  	char* sVar0;
  	
  	switch (uParam0->f_411)
  	{
  		case 0:
  			sVar0 = "TAXI_SC_BN_02";
  			break;
  		
  		case 1:
  			sVar0 = "TAXI_SC_BN_01";
  			break;
  		
  		case 2:
  			sVar0 = "TAXI_SC_BN_03";
  			break;
  		
  		case 3:
  			sVar0 = "TAXI_SC_BN_12";
  			break;
  		
  		case 4:
  			sVar0 = "TAXI_SC_BN_08";
  			break;
  		
  		case 5:
  			sVar0 = "TAXI_SC_BN_07";
  			break;
  		
  		case 6:
  			sVar0 = "TAXI_SC_KO";
  			break;
  		
  		case 7:
  			sVar0 = "TAXI_SC_BN_10";
  			break;
  		
  		case 8:
  			sVar0 = "TAXI_SC_BN_04";
  			break;
  	}
  	return sVar0;
  }
  
  void func_113(var uParam0)
  {
  	int iVar0;
  	
  	Local_169.f_1 = SYSTEM::TO_FLOAT(uParam0->f_50);
  	Local_169.f_2 = SYSTEM::TO_FLOAT(uParam0->f_56);
  	func_53(11, uParam0->f_56);
  	func_53(12, uParam0->f_56);
  	iLocal_57[1] = uParam0->f_56;
  	iLocal_57[2] = uParam0->f_56;
  	iVar0 = 0;
  	iVar0 = 0;
  	while (iVar0 < uParam0->f_60)
  	{
  		Local_169.f_4[iVar0 /*3*/] = { uParam0->f_60[iVar0 /*3*/] };
  		if (MISC::IS_BIT_SET(Local_169.f_4[iVar0 /*3*/], 2))
  		{
  			Local_169.f_3 = (Local_169.f_3 + IntToFloat(uParam0->f_60[iVar0 /*3*/].f_1));
  		}
  		iVar0++;
  	}
  	Local_169.f_0 = uParam0->f_411;
  	Local_169.f_20 = ((Local_169.f_1 + Local_169.f_2) + Local_169.f_3);
  }
  
  int func_114(var uParam0, var uParam1, int* iParam2, var uParam3, bool bParam4)
  {
  	int iVar0;
  	
  	switch (*uParam0)
  	{
  		case 0:
  			if (!ENTITY::IS_ENTITY_DEAD(*iParam2, false))
  			{
  				func_152(uParam1, 320, bParam4);
  				PED::SET_PED_MONEY(*iParam2, MISC::GET_RANDOM_INT_IN_RANGE(100, 300));
  				func_150(uParam1, iParam2, "TAXI_BLIP_PASS", 1);
  				func_53(13, 0);
  				*uParam0 = 1;
  			}
  			else
  			{
  				*uParam0 = 5;
  			}
  			break;
  		
  		case 1:
  			if (!ENTITY::IS_ENTITY_DEAD(*iParam2, false))
  			{
  				if (!PED::IS_PED_IN_ANY_VEHICLE(*iParam2, false))
  				{
  					PLAYER::SET_PLAYER_CONTROL(PLAYER::GET_PLAYER_INDEX(), true, 0);
  					*uParam0 = 2;
  				}
  			}
  			else
  			{
  				*uParam0 = 2;
  			}
  			break;
  		
  		case 2:
  			if (!ENTITY::IS_ENTITY_DEAD(*iParam2, false))
  			{
  				func_121(&uLocal_45, *iParam2, 0, 0, 1, 1, 1);
  				if (!func_120(uParam1->f_2, *iParam2))
  				{
  					if (VEHICLE::IS_VEHICLE_DRIVEABLE(uParam1->f_4, false))
  					{
  						if (ENTITY::HAS_ENTITY_BEEN_DAMAGED_BY_ENTITY(*iParam2, uParam1->f_4, true))
  						{
  							*uParam0 = 3;
  						}
  					}
  					if (ENTITY::HAS_ENTITY_BEEN_DAMAGED_BY_ENTITY(*iParam2, uParam1->f_2, true))
  					{
  						*uParam0 = 3;
  					}
  					if (*uParam0 != 3)
  					{
  						if (!PED::IS_PED_IN_ANY_VEHICLE(uParam1->f_2, false))
  						{
  							if (ENTITY::IS_ENTITY_AT_ENTITY(uParam1->f_2, *iParam2, 20f, 20f, 10f, false, true, 0))
  							{
  								if (PED::IS_PED_SHOOTING(uParam1->f_2))
  								{
  									*uParam0 = 3;
  								}
  								else
  								{
  									if (ENTITY::IS_ENTITY_AT_ENTITY(uParam1->f_2, *iParam2, 2f, 2f, 10f, false, true, 0))
  									{
  										*uParam0 = 3;
  									}
  									if (WEAPON::IS_PED_ARMED(uParam1->f_2, 6))
  									{
  										if (CAM::IS_AIM_CAM_ACTIVE())
  										{
  											*uParam0 = 3;
  										}
  									}
  								}
  							}
  							else if (ENTITY::IS_ENTITY_AT_ENTITY(uParam1->f_2, *iParam2, 50f, 50f, 10f, false, true, 0))
  							{
  								if (PED::IS_PED_SHOOTING(uParam1->f_2))
  								{
  									*uParam0 = 3;
  								}
  							}
  						}
  						else if (ENTITY::IS_ENTITY_AT_ENTITY(uParam1->f_2, *iParam2, 50f, 50f, 25f, false, true, 0))
  						{
  							if (PED::IS_PED_SHOOTING(uParam1->f_2))
  							{
  								*uParam0 = 3;
  							}
  						}
  					}
  				}
  				else
  				{
  					func_118(&uLocal_45, 0, 0);
  					uParam1->f_109 = 1;
  					*uParam0 = 5;
  				}
  			}
  			else
  			{
  				func_118(&uLocal_45, 0, 0);
  				*uParam0 = 5;
  			}
  			break;
  		
  		case 3:
  			func_118(&uLocal_45, 0, 0);
  			if (!ENTITY::IS_ENTITY_DEAD(*iParam2, false))
  			{
  				if (HUD::DOES_BLIP_EXIST(uParam1->f_8))
  				{
  					HUD::REMOVE_BLIP(&(uParam1->f_8));
  				}
  				PED::SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(*iParam2, true);
  				TASK::OPEN_SEQUENCE_TASK(&iVar0);
  				TASK::TASK_COWER(0, 5000);
  				TASK::TASK_SMART_FLEE_PED(0, uParam1->f_2, 1000f, -1, false, false);
  				TASK::TASK_SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(0, false);
  				TASK::CLOSE_SEQUENCE_TASK(iVar0);
  				TASK::TASK_PERFORM_SEQUENCE(*iParam2, iVar0);
  				TASK::CLEAR_SEQUENCE_TASK(&iVar0);
  				PED::SET_PED_KEEP_TASK(*iParam2, true);
  				func_239(uParam1, 109, 1, 0, 0);
  				*uParam0 = 4;
  				HUD::CLEAR_PRINTS();
  			}
  			else
  			{
  				*uParam0 = 4;
  				HUD::CLEAR_PRINTS();
  			}
  			if (HUD::DOES_BLIP_EXIST(uParam1->f_8))
  			{
  				HUD::REMOVE_BLIP(&(uParam1->f_8));
  			}
  			func_115(*iParam2, uParam3, 1, -1);
  			break;
  		
  		case 4:
  			if (OBJECT::HAS_PICKUP_BEEN_COLLECTED(uParam3->f_6))
  			{
  				if (HUD::DOES_BLIP_EXIST(uParam3->f_5))
  				{
  					HUD::REMOVE_BLIP(&(uParam3->f_5));
  				}
  				func_206(uParam1);
  				func_53(14, 0);
  				uParam1->f_56 = 0;
  				*uParam0 = 5;
  			}
  			break;
  		
  		case 5:
  			if (!ENTITY::IS_ENTITY_DEAD(*iParam2, false))
  			{
  				ENTITY::SET_PED_AS_NO_LONGER_NEEDED(iParam2);
  				if (HUD::DOES_BLIP_EXIST(uParam1->f_8))
  				{
  					HUD::REMOVE_BLIP(&(uParam1->f_8));
  				}
  			}
  			else
  			{
  				PLAYER::SET_PLAYER_WANTED_LEVEL_NO_DROP(PLAYER::GET_PLAYER_INDEX(), 2, false);
  				PLAYER::SET_PLAYER_WANTED_LEVEL_NOW(PLAYER::GET_PLAYER_INDEX(), false);
  			}
  			return 1;
  			break;
  	}
  	return 0;
  }
  
  void func_115(int iParam0, var uParam1, bool bParam2, int iParam3)
  {
  	struct<3> Var0;
  	
  	uParam1->f_1 = 0;
  	if (!PED::IS_PED_INJURED(iParam0))
  	{
  		uParam1->f_2 = { ENTITY::GET_ENTITY_COORDS(iParam0, true) };
  		PED::SET_PED_MONEY(iParam0, 0);
  		*uParam1 = 0;
  	}
  	else
  	{
  		if (iParam3 <= 0)
  		{
  			*uParam1 = MISC::GET_RANDOM_INT_IN_RANGE(80, 200);
  		}
  		else
  		{
  			*uParam1 = iParam3;
  		}
  		uParam1->f_2 = { PED::GET_DEAD_PED_PICKUP_COORDS(iParam0, 1.2f, 1.5f) };
  	}
  	MISC::SET_BIT(&(uParam1->f_1), 3);
  	MISC::SET_BIT(&(uParam1->f_1), 4);
  	Var0 = { OBJECT::GET_SAFE_PICKUP_COORDS(uParam1->f_2, 1.2f, 1.5f) };
  	uParam1->f_6 = OBJECT::CREATE_PICKUP(joaat("pickup_money_variable"), Var0, uParam1->f_1, *uParam1, true, 0);
  	if (bParam2)
  	{
  		if (!HUD::DOES_BLIP_EXIST(uParam1->f_5))
  		{
  			uParam1->f_5 = func_116(uParam1->f_6);
  			HUD::SET_BLIP_NAME_FROM_TEXT_FILE(uParam1->f_5, "TAXI_BLIP_MONE");
  		}
  		else
  		{
  			HUD::SET_BLIP_NAME_FROM_TEXT_FILE(uParam1->f_5, "TAXI_BLIP_MONE");
  		}
  	}
  }
  
  int func_116(int iParam0)
  {
  	int iVar0;
  	
  	if (!OBJECT::DOES_PICKUP_EXIST(iParam0))
  	{
  		return 0;
  	}
  	iVar0 = HUD::ADD_BLIP_FOR_PICKUP(iParam0);
  	HUD::SET_BLIP_SCALE(iVar0, func_117(NETWORK::NETWORK_IS_GAME_IN_PROGRESS(), 0.7f, 0.7f));
  	return iVar0;
  }
  
  float func_117(bool bParam0, float fParam1, float fParam2)
  {
  	if (bParam0)
  	{
  		return fParam1;
  	}
  	return fParam2;
  }
  
  void func_118(var uParam0, int iParam1, bool bParam2)
  {
  	char* sVar0;
  	
  	if (NETWORK::NETWORK_IS_GAME_IN_PROGRESS())
  	{
  		if (MISC::IS_BIT_SET(Global_2810287.f_4659, 26))
  		{
  			return;
  		}
  	}
  	if (CAM::IS_GAMEPLAY_HINT_ACTIVE())
  	{
  		CAM::STOP_GAMEPLAY_HINT(bParam2);
  		GRAPHICS::ANIMPOSTFX_STOP("FocusIn");
  		AUDIO::STOP_AUDIO_SCENE("HINT_CAM_SCENE");
  		if (uParam0->f_11)
  		{
  			GRAPHICS::ANIMPOSTFX_PLAY("FocusOut", 0, false);
  			AUDIO::PLAY_SOUND_FRONTEND(-1, "FocusOut", "HintCamSounds", true);
  			uParam0->f_11 = 0;
  		}
  	}
  	CAM::SET_CINEMATIC_BUTTON_ACTIVE(true);
  	uParam0->f_1 = 0;
  	*uParam0 = 0;
  	uParam0->f_2 = -1;
  	uParam0->f_8 = 0;
  	uParam0->f_5 = 0;
  	uParam0->f_6 = 0;
  	sVar0 = iParam1;
  	if (MISC::IS_STRING_NULL(sVar0))
  	{
  		if (!NETWORK::NETWORK_IS_GAME_IN_PROGRESS())
  		{
  			sVar0 = "CMN_HINT";
  		}
  		else
  		{
  			sVar0 = "FM_IHELP_HNT";
  		}
  	}
  	if (!MISC::IS_STRING_NULL(uParam0->f_3))
  	{
  		if (func_119(uParam0->f_3))
  		{
  			HUD::CLEAR_HELP(true);
  		}
  	}
  	if (!MISC::IS_STRING_NULL(sVar0))
  	{
  		if (func_119(sVar0))
  		{
  			HUD::CLEAR_HELP(true);
  		}
  	}
  }
  
  bool func_119(char* sParam0)
  {
  	HUD::BEGIN_TEXT_COMMAND_IS_THIS_HELP_MESSAGE_BEING_DISPLAYED(sParam0);
  	return HUD::END_TEXT_COMMAND_IS_THIS_HELP_MESSAGE_BEING_DISPLAYED(0);
  }
  
  int func_120(int iParam0, int iParam1)
  {
  	if (!PED::IS_PED_INJURED(iParam1))
  	{
  		if (!ENTITY::IS_ENTITY_AT_ENTITY(iParam0, iParam1, 100f, 100f, 50f, false, true, 0))
  		{
  			if (!CAM::IS_SPHERE_VISIBLE(ENTITY::GET_ENTITY_COORDS(iParam1, true), 15f))
  			{
  				return 1;
  			}
  		}
  	}
  	return 0;
  }
  
  void func_121(var uParam0, int iParam1, char* sParam2, int iParam3, bool bParam4, int iParam5, bool bParam6)
  {
  	func_122(uParam0, iParam1, sParam2, iParam3, bParam4, iParam5, bParam6);
  }
  
  void func_122(var uParam0, int iParam1, char* sParam2, int iParam3, bool bParam4, var uParam5, bool bParam6)
  {
  	func_123(uParam0, iParam1, 0f, 0f, 0f, sParam2, iParam3, bParam4, uParam5, bParam6);
  }
  
  void func_123(var uParam0, int iParam1, struct<3> Param2, char* sParam5, int iParam6, bool bParam7, var uParam8, bool bParam9)
  {
  	if (!PED::IS_PED_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID(), true))
  	{
  		func_118(uParam0, 0, 0);
  	}
  	uParam0->f_6 = 2;
  	func_124(uParam0, iParam1, Param2, sParam5, iParam6, bParam7, uParam8, bParam9);
  }
  
  void func_124(var uParam0, int iParam1, struct<3> Param2, char* sParam5, int iParam6, bool bParam7, var uParam8, bool bParam9)
  {
  	int iVar0;
  	int iVar1;
  	
  	if (uParam0->f_1 && CAM::IS_GAMEPLAY_HINT_ACTIVE())
  	{
  		if (MISC::GET_GAME_TIMER() >= (uParam0->f_8 + uParam0->f_9))
  		{
  			uParam0->f_1 = 0;
  		}
  	}
  	iVar0 = sParam5;
  	if (MISC::IS_STRING_NULL(iVar0))
  	{
  		if (!NETWORK::NETWORK_IS_GAME_IN_PROGRESS())
  		{
  			iVar0 = "CMN_HINT";
  		}
  		else
  		{
  			iVar0 = "FM_IHELP_HNT";
  		}
  	}
  	if (func_119(iVar0))
  	{
  		func_149();
  	}
  	if (func_148(iParam1) && ENTITY::IS_ENTITY_VISIBLE(iParam1))
  	{
  		iVar1 = 0;
  		if (ENTITY::IS_ENTITY_A_PED(iParam1))
  		{
  			PED::REQUEST_PED_VISIBILITY_TRACKING(ENTITY::GET_PED_INDEX_FROM_ENTITY_INDEX(iParam1));
  			PED::REQUEST_PED_VEHICLE_VISIBILITY_TRACKING(ENTITY::GET_PED_INDEX_FROM_ENTITY_INDEX(iParam1), true);
  			if (PED::IS_TRACKED_PED_VISIBLE(ENTITY::GET_PED_INDEX_FROM_ENTITY_INDEX(iParam1)))
  			{
  				iVar1 = 1;
  			}
  		}
  		else if (ENTITY::IS_ENTITY_A_VEHICLE(iParam1))
  		{
  			VEHICLE::TRACK_VEHICLE_VISIBILITY(ENTITY::GET_VEHICLE_INDEX_FROM_ENTITY_INDEX(iParam1));
  			if (VEHICLE::IS_VEHICLE_VISIBLE(ENTITY::GET_VEHICLE_INDEX_FROM_ENTITY_INDEX(iParam1)))
  			{
  				iVar1 = 1;
  			}
  		}
  		else if (ENTITY::IS_ENTITY_AN_OBJECT(iParam1))
  		{
  			OBJECT::TRACK_OBJECT_VISIBILITY(ENTITY::GET_OBJECT_INDEX_FROM_ENTITY_INDEX(iParam1));
  			if (OBJECT::IS_OBJECT_VISIBLE(ENTITY::GET_OBJECT_INDEX_FROM_ENTITY_INDEX(iParam1)))
  			{
  				iVar1 = 1;
  			}
  		}
  		if (!CAM::IS_GAMEPLAY_HINT_ACTIVE())
  		{
  			if (func_143(uParam0, bParam7, bParam9, 0))
  			{
  				func_140(uParam0, iParam1, Param2, iParam6);
  			}
  			if (*uParam0)
  			{
  				*uParam0 = 0;
  			}
  			else if (uParam0->f_6 == 2)
  			{
  				if (func_129(iVar0))
  				{
  					if ((MISC::IS_STRING_NULL(uParam0->f_3) && !MISC::IS_STRING_NULL(iVar0)) && PED::IS_PED_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID(), false))
  					{
  						if ((iVar1 && !HUD::IS_HELP_MESSAGE_BEING_DISPLAYED()) && uParam8)
  						{
  							if (!func_119(iVar0))
  							{
  								func_128(iVar0, -1);
  								uParam0->f_3 = iVar0;
  								if (MISC::ARE_STRINGS_EQUAL("CMN_HINT", iVar0))
  								{
  									func_127(1);
  								}
  							}
  						}
  					}
  				}
  			}
  			else if (func_129(iVar0))
  			{
  				if (MISC::IS_STRING_NULL(uParam0->f_3) && !MISC::IS_STRING_NULL(iVar0))
  				{
  					if (((ENTITY::IS_ENTITY_ON_SCREEN(iParam1) && iVar1) && !HUD::IS_HELP_MESSAGE_BEING_DISPLAYED()) && uParam8)
  					{
  						if (!func_119(iVar0))
  						{
  							func_128(iVar0, -1);
  							uParam0->f_3 = iVar0;
  							if (MISC::ARE_STRINGS_EQUAL("CMN_HINT", iVar0))
  							{
  								func_127(1);
  							}
  						}
  					}
  				}
  			}
  		}
  		else
  		{
  			if (!MISC::IS_STRING_NULL(sParam5))
  			{
  				if (func_119(sParam5))
  				{
  					HUD::CLEAR_HELP(true);
  				}
  			}
  			if (PED::IS_PED_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID(), true))
  			{
  				if (PED::IS_PED_IN_ANY_BOAT(PLAYER::PLAYER_PED_ID()))
  				{
  					if (CAM::GET_CAM_VIEW_MODE_FOR_CONTEXT(3) == 3 || CAM::GET_CAM_VIEW_MODE_FOR_CONTEXT(3) == 4)
  					{
  						func_118(uParam0, iVar0, 1);
  					}
  				}
  				else if (PED::IS_PED_IN_ANY_HELI(PLAYER::PLAYER_PED_ID()))
  				{
  					if (CAM::GET_CAM_VIEW_MODE_FOR_CONTEXT(6) == 3 || CAM::GET_CAM_VIEW_MODE_FOR_CONTEXT(6) == 4)
  					{
  						func_118(uParam0, iVar0, 1);
  					}
  				}
  				else if (PED::IS_PED_IN_ANY_PLANE(PLAYER::PLAYER_PED_ID()))
  				{
  					if (CAM::GET_CAM_VIEW_MODE_FOR_CONTEXT(4) == 3 || CAM::GET_CAM_VIEW_MODE_FOR_CONTEXT(4) == 4)
  					{
  						func_118(uParam0, iVar0, 1);
  					}
  				}
  				else if (PED::IS_PED_IN_ANY_SUB(PLAYER::PLAYER_PED_ID()))
  				{
  					if (CAM::GET_CAM_VIEW_MODE_FOR_CONTEXT(5) == 3 || CAM::GET_CAM_VIEW_MODE_FOR_CONTEXT(5) == 4)
  					{
  						func_118(uParam0, iVar0, 1);
  					}
  				}
  				else if (PED::IS_PED_ON_ANY_BIKE(PLAYER::PLAYER_PED_ID()))
  				{
  					if (CAM::GET_CAM_VIEW_MODE_FOR_CONTEXT(2) == 3 || CAM::GET_CAM_VIEW_MODE_FOR_CONTEXT(2) == 4)
  					{
  						func_118(uParam0, iVar0, 1);
  					}
  				}
  				else if (CAM::GET_FOLLOW_VEHICLE_CAM_VIEW_MODE() == 3 || CAM::GET_FOLLOW_VEHICLE_CAM_VIEW_MODE() == 4)
  				{
  					func_118(uParam0, iVar0, 1);
  				}
  			}
  			if (!func_143(uParam0, bParam7, bParam9, 0))
  			{
  				if ((!*uParam0 && !uParam0->f_1) && !func_126(uParam0))
  				{
  					func_125(uParam0);
  				}
  			}
  		}
  	}
  	else
  	{
  		func_118(uParam0, iVar0, 0);
  	}
  }
  
  void func_125(var uParam0)
  {
  	if (func_148(PLAYER::PLAYER_PED_ID()))
  	{
  		TASK::TASK_CLEAR_LOOK_AT(PLAYER::PLAYER_PED_ID());
  	}
  	if (CAM::IS_GAMEPLAY_HINT_ACTIVE())
  	{
  		CAM::SET_CINEMATIC_BUTTON_ACTIVE(true);
  		CAM::STOP_GAMEPLAY_HINT(false);
  		AUDIO::STOP_AUDIO_SCENE("HINT_CAM_SCENE");
  		GRAPHICS::ANIMPOSTFX_STOP("FocusIn");
  		if (uParam0->f_11)
  		{
  			GRAPHICS::ANIMPOSTFX_PLAY("FocusOut", 0, false);
  			AUDIO::PLAY_SOUND_FRONTEND(-1, "FocusOut", "HintCamSounds", true);
  			uParam0->f_11 = 0;
  		}
  	}
  	uParam0->f_2 = -1;
  	*uParam0 = 1;
  }
  
  int func_126(var uParam0)
  {
  	int iVar0;
  	
  	if (uParam0->f_2 > 0)
  	{
  		iVar0 = (uParam0->f_10 / 2);
  		if (uParam0->f_2 + iVar0) > MISC::GET_GAME_TIMER()
  		{
  			return 1;
  		}
  	}
  	return 0;
  }
  
  int func_127(bool bParam0)
  {
  	switch (Global_42596)
  	{
  		case 0:
  		case 3:
  			if (bParam0)
  			{
  				Global_112915.f_10049.f_100++;
  			}
  			return Global_112915.f_10049.f_100;
  			break;
  		
  		case 4:
  			if (bParam0)
  			{
  				Global_112915.f_10049.f_101++;
  			}
  			return Global_112915.f_10049.f_101;
  			break;
  		
  		case 5:
  		case 15:
  			if (bParam0)
  			{
  				Global_112915.f_10049.f_102++;
  			}
  			return Global_112915.f_10049.f_102;
  			break;
  		
  		default:
  			break;
  	}
  	return 3;
  }
  
  void func_128(char* sParam0, int iParam1)
  {
  	HUD::BEGIN_TEXT_COMMAND_DISPLAY_HELP(sParam0);
  	HUD::END_TEXT_COMMAND_DISPLAY_HELP(0, false, true, iParam1);
  }
  
  int func_129(char* sParam0)
  {
  	if (!func_130(1, 1, 0))
  	{
  		if ((!MISC::IS_STRING_NULL_OR_EMPTY(sParam0) && func_119(sParam0)) || func_119("CMN_HINT"))
  		{
  			HUD::CLEAR_HELP(true);
  		}
  		return 0;
  	}
  	switch (Global_42596)
  	{
  		case 0:
  		case 3:
  			if (func_127(0) < 3)
  			{
  				return 1;
  			}
  			break;
  		
  		case 4:
  			if (func_127(0) < 1)
  			{
  				return 1;
  			}
  			break;
  		
  		case 5:
  		case 15:
  			if (func_127(0) < 1)
  			{
  				return 1;
  			}
  			break;
  		
  		default:
  			break;
  	}
  	return 0;
  }
  
  int func_130(bool bParam0, bool bParam1, bool bParam2)
  {
  	int iVar0;
  	int iVar1;
  	
  	if (bParam0)
  	{
  		if (!PLAYER::IS_PLAYER_CONTROL_ON(PLAYER::PLAYER_ID()))
  		{
  			return 0;
  		}
  	}
  	if (bParam2)
  	{
  		return 1;
  	}
  	if (STREAMING::IS_PLAYER_SWITCH_IN_PROGRESS())
  	{
  		return 0;
  	}
  	if (func_46(0))
  	{
  		return 0;
  	}
  	if (func_139())
  	{
  		return 0;
  	}
  	if (NETWORK::_NETWORK_IS_TEXT_CHAT_ACTIVE())
  	{
  		return 0;
  	}
  	if (Global_75021)
  	{
  		return 0;
  	}
  	if (SCRIPT::_GET_NUMBER_OF_REFERENCES_OF_SCRIPT_WITH_NAME_HASH(joaat("appinternet")) > 0)
  	{
  		return 0;
  	}
  	if (Global_59871)
  	{
  		return 0;
  	}
  	if (bParam1)
  	{
  		if (PED::IS_PED_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID(), true))
  		{
  			if (PED::IS_PED_IN_ANY_BOAT(PLAYER::PLAYER_PED_ID()))
  			{
  				if (CAM::GET_CAM_VIEW_MODE_FOR_CONTEXT(3) == 3 || CAM::GET_CAM_VIEW_MODE_FOR_CONTEXT(3) == 4)
  				{
  					return 0;
  				}
  			}
  			else if (PED::IS_PED_IN_ANY_HELI(PLAYER::PLAYER_PED_ID()))
  			{
  				if (CAM::GET_CAM_VIEW_MODE_FOR_CONTEXT(6) == 3 || CAM::GET_CAM_VIEW_MODE_FOR_CONTEXT(6) == 4)
  				{
  					return 0;
  				}
  			}
  			else if (PED::IS_PED_IN_ANY_PLANE(PLAYER::PLAYER_PED_ID()))
  			{
  				if (CAM::GET_CAM_VIEW_MODE_FOR_CONTEXT(4) == 3 || CAM::GET_CAM_VIEW_MODE_FOR_CONTEXT(4) == 4)
  				{
  					return 0;
  				}
  			}
  			else if (PED::IS_PED_IN_ANY_SUB(PLAYER::PLAYER_PED_ID()))
  			{
  				if (CAM::GET_CAM_VIEW_MODE_FOR_CONTEXT(5) == 3 || CAM::GET_CAM_VIEW_MODE_FOR_CONTEXT(5) == 4)
  				{
  					return 0;
  				}
  			}
  			else if (PED::IS_PED_ON_ANY_BIKE(PLAYER::PLAYER_PED_ID()))
  			{
  				if (CAM::GET_CAM_VIEW_MODE_FOR_CONTEXT(2) == 3 || CAM::GET_CAM_VIEW_MODE_FOR_CONTEXT(2) == 4)
  				{
  					return 0;
  				}
  			}
  			else if (CAM::GET_FOLLOW_VEHICLE_CAM_VIEW_MODE() == 3 || CAM::GET_FOLLOW_VEHICLE_CAM_VIEW_MODE() == 4)
  			{
  				return 0;
  			}
  			if (CAM::IS_GAMEPLAY_CAM_LOOKING_BEHIND())
  			{
  				return 0;
  			}
  		}
  	}
  	if ((func_138() || func_137(Global_4718592.f_138117)) || func_136())
  	{
  		if (PED::IS_PED_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID(), false))
  		{
  			iVar0 = PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), false);
  			iVar1 = func_135(PLAYER::PLAYER_PED_ID(), 0);
  			if (((VEHICLE::IS_TURRET_SEAT(iVar0, iVar1) || (ENTITY::GET_ENTITY_MODEL(iVar0) == joaat("apc") && iVar1 != -1)) || (ENTITY::GET_ENTITY_MODEL(iVar0) == joaat("akula") && iVar1 != -1)) || (((ENTITY::GET_ENTITY_MODEL(iVar0) == joaat("riot2") && iVar1 == 0) && func_134(iVar0, 10)) && VEHICLE::GET_VEHICLE_MOD(iVar0, 10) != -1))
  			{
  				return 0;
  			}
  		}
  	}
  	if (Global_1957935)
  	{
  		return 0;
  	}
  	if (func_131(PLAYER::PLAYER_ID()))
  	{
  		return 0;
  	}
  	return 1;
  }
  
  int func_131(int iParam0)
  {
  	if (iParam0 != func_133())
  	{
  		if (func_132(iParam0, 1, 1))
  		{
  			return Global_2689156[iParam0 /*453*/].f_319.f_6 != -1;
  		}
  		else if ((Global_1575046 && iParam0 == PLAYER::PLAYER_ID()) && func_132(iParam0, 1, 0))
  		{
  			return Global_2689156[iParam0 /*453*/].f_319.f_6 != -1;
  		}
  	}
  	return 0;
  }
  
  int func_132(int iParam0, bool bParam1, bool bParam2)
  {
  	int iVar0;
  	
  	iVar0 = iParam0;
  	if (iVar0 != -1)
  	{
  		if (NETWORK::NETWORK_IS_PLAYER_ACTIVE(iParam0))
  		{
  			if (bParam1)
  			{
  				if (!PLAYER::IS_PLAYER_PLAYING(iParam0))
  				{
  					return 0;
  				}
  			}
  			if (bParam2)
  			{
  				if (!Global_2703656.f_3[iVar0])
  				{
  					return 0;
  				}
  			}
  			return 1;
  		}
  	}
  	return 0;
  }
  
  int func_133()
  {
  	return -1;
  }
  
  int func_134(int iParam0, int iParam1)
  {
  	if (VEHICLE::IS_VEHICLE_DRIVEABLE(iParam0, false))
  	{
  		if (VEHICLE::GET_NUM_MOD_KITS(iParam0) > 0)
  		{
  			switch (iParam1)
  			{
  				case 17:
  				case 18:
  				case 19:
  				case 20:
  				case 21:
  				case 22:
  					return 1;
  					break;
  				
  				default:
  					if (VEHICLE::GET_NUM_VEHICLE_MODS(iParam0, iParam1) > 0)
  					{
  						return 1;
  					}
  					break;
  				}
  			}
  	}
  	return 0;
  }
  
  int func_135(int iParam0, bool bParam1)
  {
  	int iVar0;
  	int iVar1;
  	int iVar2;
  	int iVar3;
  	
  	if (!PED::IS_PED_INJURED(iParam0))
  	{
  		if (PED::IS_PED_IN_ANY_VEHICLE(iParam0, bParam1))
  		{
  			iVar0 = PED::GET_VEHICLE_PED_IS_IN(iParam0, bParam1);
  			if (ENTITY::DOES_ENTITY_EXIST(iVar0))
  			{
  				iVar1 = VEHICLE::GET_VEHICLE_MODEL_NUMBER_OF_SEATS(ENTITY::GET_ENTITY_MODEL(iVar0));
  				if (iVar1 == 1)
  				{
  					iVar3 = -1;
  					return iVar3;
  				}
  				iVar2 = 0;
  				while (iVar2 < iVar1)
  				{
  					iVar3 = (iVar2 - 1);
  					if (!VEHICLE::IS_VEHICLE_SEAT_FREE(iVar0, iVar3, false))
  					{
  						if (VEHICLE::GET_PED_IN_VEHICLE_SEAT(iVar0, iVar3, false) == iParam0)
  						{
  							return iVar3;
  						}
  					}
  					iVar2++;
  				}
  			}
  		}
  	}
  	return iVar3;
  }
  
  var func_136()
  {
  	return Global_2714627.f_19;
  }
  
  bool func_137(int iParam0)
  {
  	return iParam0 == 51;
  }
  
  var func_138()
  {
  	return Global_2714627.f_18;
  }
  
  bool func_139()
  {
  	return MISC::GET_GAME_TIMER() <= Global_22830.f_6135 + 100;
  }
  
  void func_140(var uParam0, int iParam1, struct<3> Param2, int iParam5)
  {
  	int iVar0;
  	int iVar1;
  	int iVar2;
  	int iVar3;
  	int iVar4;
  	
  	if (Global_1581344 == 1)
  	{
  		return;
  	}
  	if (ENTITY::IS_ENTITY_DEAD(iParam1, false))
  	{
  		func_118(uParam0, 0, 0);
  	}
  	if (func_42(Param2, 0f, 0f, 0f, 0))
  	{
  		if (ENTITY::IS_ENTITY_A_PED(iParam1))
  		{
  			iVar0 = ENTITY::GET_PED_INDEX_FROM_ENTITY_INDEX(iParam1);
  			if (!PED::IS_PED_IN_ANY_VEHICLE(iVar0, false))
  			{
  				if (PED::IS_PED_A_PLAYER(iVar0))
  				{
  					if (!func_141())
  					{
  						Param2 = { 0f, 0f, 1f };
  					}
  				}
  				else if (PED::IS_PED_MALE(iVar0))
  				{
  					Param2 = { 0f, 0f, 1f };
  				}
  			}
  		}
  	}
  	CAM::SET_CINEMATIC_BUTTON_ACTIVE(false);
  	iVar1 = uParam0->f_9;
  	iVar2 = uParam0->f_10;
  	if (iParam5 == 1726668277)
  	{
  		if (iVar1 < 1500)
  		{
  			iVar1 = 1500;
  		}
  		if (iVar2 < 1500)
  		{
  			iVar2 = 1500;
  		}
  	}
  	CAM::SET_GAMEPLAY_ENTITY_HINT(iParam1, Param2, true, -1, iVar1, iVar2, iParam5);
  	iVar3 = 2048;
  	iVar4 = 3;
  	TASK::TASK_LOOK_AT_ENTITY(PLAYER::PLAYER_PED_ID(), iParam1, -1, iVar3, iVar4);
  	GRAPHICS::ANIMPOSTFX_PLAY("FocusIn", 0, false);
  	AUDIO::START_AUDIO_SCENE("HINT_CAM_SCENE");
  	AUDIO::PLAY_SOUND_FRONTEND(-1, "FocusIn", "HintCamSounds", true);
  	uParam0->f_11 = 1;
  	uParam0->f_8 = MISC::GET_GAME_TIMER();
  	uParam0->f_1 = 1;
  	*uParam0 = 0;
  }
  
  bool func_141()
  {
  	return func_142(PLAYER::PLAYER_ID());
  }
  
  int func_142(int iParam0)
  {
  	if (ENTITY::GET_ENTITY_MODEL(PLAYER::GET_PLAYER_PED(iParam0)) == joaat("mp_f_freemode_01"))
  	{
  		return 1;
  	}
  	return 0;
  }
  
  int func_143(var uParam0, bool bParam1, bool bParam2, bool bParam3)
  {
  	if (uParam0->f_1)
  	{
  		if (MISC::GET_GAME_TIMER() >= (uParam0->f_8 + uParam0->f_9))
  		{
  			uParam0->f_1 = 0;
  		}
  	}
  	switch (uParam0->f_5)
  	{
  		case 0:
  			uParam0->f_7 = 0;
  			if (uParam0->f_6 == 0)
  			{
  				if (PED::IS_PED_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID(), true))
  				{
  					if (func_147(bParam1, bParam2, bParam3))
  					{
  						uParam0->f_4 = MISC::GET_GAME_TIMER();
  						uParam0->f_5 = 1;
  						uParam0->f_7 = 1;
  					}
  				}
  				else if (func_146(bParam1, bParam2, bParam3))
  				{
  					uParam0->f_4 = MISC::GET_GAME_TIMER();
  					uParam0->f_5 = 1;
  					uParam0->f_7 = 1;
  				}
  			}
  			else if (uParam0->f_6 == 1)
  			{
  				if (func_146(bParam1, bParam2, bParam3))
  				{
  					uParam0->f_4 = MISC::GET_GAME_TIMER();
  					uParam0->f_5 = 1;
  					uParam0->f_7 = 1;
  				}
  			}
  			else if (uParam0->f_6 == 2)
  			{
  				if (func_147(bParam1, bParam2, bParam3))
  				{
  					uParam0->f_4 = MISC::GET_GAME_TIMER();
  					uParam0->f_5 = 1;
  					uParam0->f_7 = 1;
  				}
  			}
  			if (func_126(uParam0))
  			{
  				uParam0->f_7 = 1;
  				uParam0->f_5 = 4;
  			}
  			break;
  		
  		case 1:
  			if ((MISC::GET_GAME_TIMER() - uParam0->f_4) <= 500)
  			{
  				if (uParam0->f_6 == 0)
  				{
  					if (PED::IS_PED_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID(), true))
  					{
  						if (!func_147(bParam1, bParam2, bParam3))
  						{
  							uParam0->f_4 = MISC::GET_GAME_TIMER();
  							uParam0->f_5 = 3;
  						}
  					}
  					else if (!func_146(bParam1, bParam2, bParam3))
  					{
  						uParam0->f_4 = MISC::GET_GAME_TIMER();
  						uParam0->f_5 = 3;
  					}
  				}
  				else if (uParam0->f_6 == 1)
  				{
  					if (!func_146(bParam1, bParam2, bParam3))
  					{
  						uParam0->f_4 = MISC::GET_GAME_TIMER();
  						uParam0->f_5 = 3;
  					}
  				}
  				else if (uParam0->f_6 == 2)
  				{
  					if (!func_147(bParam1, bParam2, bParam3))
  					{
  						uParam0->f_4 = MISC::GET_GAME_TIMER();
  						uParam0->f_5 = 3;
  					}
  				}
  			}
  			else
  			{
  				uParam0->f_5 = 2;
  			}
  			break;
  		
  		case 2:
  			if (uParam0->f_6 == 0)
  			{
  				if (PED::IS_PED_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID(), true))
  				{
  					if (!func_147(bParam1, bParam2, bParam3))
  					{
  						uParam0->f_5 = 0;
  					}
  				}
  				else if (!func_146(bParam1, bParam2, bParam3))
  				{
  					uParam0->f_5 = 0;
  				}
  			}
  			else if (uParam0->f_6 == 1)
  			{
  				if (!func_146(bParam1, bParam2, bParam3) || PED::IS_PED_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID(), true))
  				{
  					uParam0->f_5 = 0;
  				}
  			}
  			else if (uParam0->f_6 == 2)
  			{
  				if (!PED::IS_PED_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID(), true) || TASK::GET_IS_TASK_ACTIVE(PLAYER::PLAYER_PED_ID(), 2))
  				{
  					uParam0->f_5 = 0;
  				}
  				else if (!func_147(bParam1, bParam2, bParam3))
  				{
  					uParam0->f_5 = 0;
  				}
  			}
  			break;
  		
  		case 3:
  			if ((MISC::GET_GAME_TIMER() - uParam0->f_4) > 500)
  			{
  				if (uParam0->f_6 == 0)
  				{
  					if (PED::IS_PED_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID(), true))
  					{
  						if (func_145(bParam1, bParam2, bParam3))
  						{
  							uParam0->f_5 = 0;
  						}
  					}
  					else if (func_144(bParam1, bParam2, bParam3))
  					{
  						uParam0->f_5 = 0;
  					}
  				}
  				else if (uParam0->f_6 == 1)
  				{
  					if (PED::IS_PED_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID(), true) || func_144(bParam1, bParam2, bParam3))
  					{
  						uParam0->f_5 = 0;
  					}
  				}
  				else if (uParam0->f_6 == 2)
  				{
  					if (!PED::IS_PED_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID(), true) || TASK::GET_IS_TASK_ACTIVE(PLAYER::PLAYER_PED_ID(), 2))
  					{
  						uParam0->f_5 = 0;
  					}
  					else if (func_145(bParam1, bParam2, bParam3))
  					{
  						uParam0->f_5 = 0;
  					}
  				}
  			}
  			break;
  		
  		case 4:
  			if (!func_126(uParam0))
  			{
  				uParam0->f_5 = 0;
  			}
  			break;
  	}
  	if (!func_130(bParam1, bParam2, bParam3))
  	{
  		uParam0->f_5 = 0;
  		uParam0->f_7 = 0;
  	}
  	if (uParam0->f_7)
  	{
  		func_149();
  		return 1;
  	}
  	else
  	{
  		return 0;
  	}
  	return 0;
  }
  
  int func_144(bool bParam0, bool bParam1, bool bParam2)
  {
  	if (!func_130(bParam0, bParam1, bParam2))
  	{
  		return 0;
  	}
  	if (!PED::IS_PED_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID(), false))
  	{
  		if (!PLAYER::IS_PLAYER_TARGETTING_ANYTHING(PLAYER::PLAYER_ID()))
  		{
  			PAD::DISABLE_CONTROL_ACTION(0, 140, true);
  			PAD::DISABLE_CONTROL_ACTION(0, 80, true);
  			if (PAD::IS_DISABLED_CONTROL_JUST_RELEASED(0, 80))
  			{
  				return 1;
  			}
  		}
  	}
  	return 0;
  }
  
  int func_145(bool bParam0, bool bParam1, bool bParam2)
  {
  	if (!func_130(bParam0, bParam1, bParam2))
  	{
  		return 0;
  	}
  	if (PED::IS_PED_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID(), false))
  	{
  		PAD::DISABLE_CONTROL_ACTION(0, 80, true);
  		if (CAM::IS_FOLLOW_VEHICLE_CAM_ACTIVE())
  		{
  			if (PAD::IS_DISABLED_CONTROL_JUST_RELEASED(0, 80))
  			{
  				CAM::SET_CINEMATIC_BUTTON_ACTIVE(false);
  				return 1;
  			}
  		}
  	}
  	return 0;
  }
  
  int func_146(bool bParam0, bool bParam1, bool bParam2)
  {
  	if (!func_130(bParam0, bParam1, bParam2))
  	{
  		return 0;
  	}
  	if (!PED::IS_PED_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID(), false))
  	{
  		if (!PLAYER::IS_PLAYER_TARGETTING_ANYTHING(PLAYER::PLAYER_ID()))
  		{
  			PAD::DISABLE_CONTROL_ACTION(0, 140, true);
  			PAD::DISABLE_CONTROL_ACTION(0, 80, true);
  			if (PAD::IS_DISABLED_CONTROL_PRESSED(0, 80) && MISC::GET_GAME_TIMER() > Global_116)
  			{
  				return 1;
  			}
  		}
  	}
  	return 0;
  }
  
  int func_147(bool bParam0, bool bParam1, bool bParam2)
  {
  	if (!func_130(bParam0, bParam1, bParam2))
  	{
  		return 0;
  	}
  	if (PED::IS_PED_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID(), false))
  	{
  		PAD::DISABLE_CONTROL_ACTION(0, 80, true);
  		if (CAM::IS_FOLLOW_VEHICLE_CAM_ACTIVE())
  		{
  			if (PAD::IS_DISABLED_CONTROL_PRESSED(0, 80) && MISC::GET_GAME_TIMER() > Global_116)
  			{
  				CAM::SET_CINEMATIC_BUTTON_ACTIVE(false);
  				return 1;
  			}
  		}
  	}
  	return 0;
  }
  
  int func_148(int iParam0)
  {
  	if (ENTITY::DOES_ENTITY_EXIST(iParam0))
  	{
  		if (ENTITY::IS_ENTITY_A_VEHICLE(iParam0))
  		{
  			if (VEHICLE::IS_VEHICLE_DRIVEABLE(ENTITY::GET_VEHICLE_INDEX_FROM_ENTITY_INDEX(iParam0), false))
  			{
  				return 1;
  			}
  		}
  		else if (ENTITY::IS_ENTITY_A_PED(iParam0))
  		{
  			if (!PED::IS_PED_INJURED(ENTITY::GET_PED_INDEX_FROM_ENTITY_INDEX(iParam0)))
  			{
  				return 1;
  			}
  		}
  		else if (ENTITY::IS_ENTITY_AN_OBJECT(iParam0))
  		{
  			return 1;
  		}
  	}
  	return 0;
  }
  
  void func_149()
  {
  	MISC::SET_BIT(&Global_7825, 4);
  }
  
  void func_150(var uParam0, var uParam1, char* sParam2, bool bParam3)
  {
  	if (bParam3)
  	{
  		func_422(uParam0);
  	}
  	if (!HUD::DOES_BLIP_EXIST(uParam0->f_8))
  	{
  		uParam0->f_8 = func_151(*uParam1, 0, 0);
  	}
  	if (!MISC::IS_STRING_NULL(sParam2))
  	{
  		HUD::SET_BLIP_NAME_FROM_TEXT_FILE(uParam0->f_8, sParam2);
  	}
  }
  
  int func_151(int iParam0, bool bParam1, bool bParam2)
  {
  	int iVar0;
  	
  	if (!ENTITY::DOES_ENTITY_EXIST(iParam0))
  	{
  		return 0;
  	}
  	iVar0 = HUD::ADD_BLIP_FOR_ENTITY(iParam0);
  	if (ENTITY::IS_ENTITY_A_VEHICLE(iParam0))
  	{
  		HUD::SET_BLIP_SCALE(iVar0, func_117(NETWORK::NETWORK_IS_GAME_IN_PROGRESS(), 1f, 1f));
  		if (!bParam2)
  		{
  			HUD::SET_BLIP_AS_FRIENDLY(iVar0, bParam1);
  		}
  		else
  		{
  			HUD::SET_BLIP_COLOUR(iVar0, 2);
  		}
  	}
  	else if (ENTITY::IS_ENTITY_A_PED(iParam0))
  	{
  		HUD::SET_BLIP_SCALE(iVar0, func_117(NETWORK::NETWORK_IS_GAME_IN_PROGRESS(), 0.7f, 0.7f));
  		HUD::SET_BLIP_AS_FRIENDLY(iVar0, bParam1);
  	}
  	else if (ENTITY::IS_ENTITY_AN_OBJECT(iParam0))
  	{
  		HUD::SET_BLIP_SCALE(iVar0, func_117(NETWORK::NETWORK_IS_GAME_IN_PROGRESS(), 0.7f, 0.7f));
  	}
  	return iVar0;
  }
  
  void func_152(var uParam0, int iParam1, bool bParam2)
  {
  	int iVar0;
  	
  	if (!ENTITY::IS_ENTITY_DEAD(uParam0->f_3, false))
  	{
  		PED::SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(uParam0->f_3, false);
  		ENTITY::CLEAR_ENTITY_LAST_DAMAGE_ENTITY(uParam0->f_3);
  		PED::SET_PED_FLEE_ATTRIBUTES(uParam0->f_3, 3, false);
  		PED::SET_PED_COMBAT_ATTRIBUTES(uParam0->f_3, 17, true);
  		TASK::CLEAR_PED_TASKS(uParam0->f_3);
  		if ((func_10(uParam0->f_3, uParam0->f_29, 1) <= 200f && !func_153(uParam0->f_29)) && !bParam2)
  		{
  			func_154(uParam0);
  		}
  		else
  		{
  			PED::SET_PED_FLEE_ATTRIBUTES(uParam0->f_3, 1024, true);
  			PED::SET_PED_FLEE_ATTRIBUTES(uParam0->f_3, 131072, true);
  			TASK::OPEN_SEQUENCE_TASK(&iVar0);
  			TASK::TASK_LEAVE_ANY_VEHICLE(0, 0, iParam1);
  			if (uParam0->f_415 == 8)
  			{
  				TASK::TASK_WANDER_STANDARD(0, 40000f, 0);
  			}
  			else
  			{
  				TASK::TASK_SMART_FLEE_PED(0, PLAYER::PLAYER_PED_ID(), 1000f, -1, false, false);
  			}
  			TASK::TASK_SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(0, false);
  			TASK::CLOSE_SEQUENCE_TASK(iVar0);
  			TASK::TASK_PERFORM_SEQUENCE(uParam0->f_3, iVar0);
  			TASK::CLEAR_SEQUENCE_TASK(&iVar0);
  		}
  		PED::SET_PED_KEEP_TASK(uParam0->f_3, true);
  	}
  }
  
  int func_153(struct<3> Param0)
  {
  	if ((Param0.f_0 == 0f && Param0.f_1 == 0f) && Param0.f_2 == 0f)
  	{
  		return 1;
  	}
  	return 0;
  }
  
  void func_154(var uParam0)
  {
  	int iVar0;
  	
  	if (!ENTITY::IS_ENTITY_DEAD(uParam0->f_3, false))
  	{
  		if (func_42(func_43(), uParam0->f_29, 0))
  		{
  			if (uParam0->f_411 == 2)
  			{
  				ENTITY::SET_ENTITY_HEADING(uParam0->f_3, 84.9058f);
  				PED::SET_PED_KEEP_TASK(uParam0->f_3, true);
  			}
  			else if (uParam0->f_411 == 4)
  			{
  				ENTITY::SET_ENTITY_HEADING(uParam0->f_3, 68.3138f);
  				PED::SET_PED_KEEP_TASK(uParam0->f_3, true);
  			}
  			else
  			{
  				TASK::TASK_WANDER_STANDARD(uParam0->f_3, 40000f, 0);
  			}
  		}
  		else
  		{
  			TASK::CLEAR_PED_TASKS(uParam0->f_3);
  			TASK::CLEAR_SEQUENCE_TASK(&iVar0);
  			TASK::OPEN_SEQUENCE_TASK(&iVar0);
  			TASK::TASK_LEAVE_ANY_VEHICLE(0, 0, 0);
  			TASK::TASK_SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(0, false);
  			TASK::TASK_FOLLOW_NAV_MESH_TO_COORD(0, uParam0->f_29, 1f, -1, 0.25f, false, 40000f);
  			if (uParam0->f_411 == 2)
  			{
  				TASK::TASK_START_SCENARIO_IN_PLACE(0, "WORLD_HUMAN_AA_SMOKE", 0, false);
  			}
  			else if (uParam0->f_411 == 0)
  			{
  				TASK::TASK_CLIMB_LADDER(0, 1);
  				TASK::TASK_FOLLOW_NAV_MESH_TO_COORD(0, 813.9421f, 1172.681f, 329.7988f, 1f, -1, 0.25f, false, 40000f);
  				TASK::TASK_ACHIEVE_HEADING(0, 151.7794f, 0);
  				TASK::TASK_START_SCENARIO_IN_PLACE(0, "WORLD_HUMAN_SMOKING_POT", 0, false);
  			}
  			else if (uParam0->f_411 == 4)
  			{
  				TASK::TASK_USE_NEAREST_SCENARIO_TO_COORD(0, uParam0->f_29, 15f, 0);
  			}
  			else if (uParam0->f_411 == 1)
  			{
  				TASK::TASK_USE_NEAREST_SCENARIO_TO_COORD(0, uParam0->f_29, 15f, 20000);
  				TASK::TASK_WANDER_STANDARD(0, 40000f, 0);
  			}
  			else
  			{
  				TASK::TASK_PLAY_ANIM(0, "oddjobs@taxi@", "base", 8f, -8f, -1, 0, 0f, false, false, false);
  				TASK::TASK_PLAY_ANIM(0, "gestures@m@standing@casual", "gesture_pleased", 8f, -8f, -1, 0, 0f, false, false, false);
  			}
  			if (TASK::DOES_SCENARIO_EXIST_IN_AREA(uParam0->f_29, 15f, true))
  			{
  				TASK::TASK_USE_NEAREST_SCENARIO_TO_COORD(0, uParam0->f_29, 15f, 0);
  			}
  			else
  			{
  				TASK::TASK_WANDER_STANDARD(0, 40000f, 0);
  			}
  			TASK::CLOSE_SEQUENCE_TASK(iVar0);
  			TASK::TASK_PERFORM_SEQUENCE(uParam0->f_3, iVar0);
  			TASK::CLEAR_SEQUENCE_TASK(&iVar0);
  		}
  		PED::SET_PED_KEEP_TASK(uParam0->f_3, true);
  	}
  }
  
  int func_155(var uParam0, bool bParam1)
  {
  	if (!ENTITY::IS_ENTITY_DEAD(uParam0->f_3, false))
  	{
  		if (func_164(uParam0) && func_160(uParam0, 1, 1084227584))
  		{
  			if (bParam1)
  			{
  				if (func_159(uParam0, 2097152))
  				{
  					func_156(uParam0);
  				}
  			}
  			else
  			{
  				func_156(uParam0);
  			}
  		}
  		else if (!func_164(uParam0))
  		{
  			if (bParam1)
  			{
  				if (func_159(uParam0, 2097152))
  				{
  					if (TASK::GET_SCRIPT_TASK_STATUS(uParam0->f_3, 451360105) == 7)
  					{
  						return 1;
  					}
  				}
  			}
  			else if (TASK::GET_SCRIPT_TASK_STATUS(uParam0->f_3, 451360105) == 7)
  			{
  				return 1;
  			}
  		}
  	}
  	return 0;
  }
  
  void func_156(var uParam0)
  {
  	struct<3> Var0;
  	
  	if (func_153(uParam0->f_29))
  	{
  		Var0 = { uParam0->f_17 };
  	}
  	else
  	{
  		Var0 = { uParam0->f_29 };
  	}
  	func_157(uParam0, Var0);
  }
  
  void func_157(var uParam0, struct<3> Param1)
  {
  	struct<3> Var0;
  	struct<3> Var3;
  	
  	if (VEHICLE::IS_VEHICLE_DRIVEABLE(uParam0->f_4, false))
  	{
  		if (!ENTITY::IS_ENTITY_DEAD(uParam0->f_3, false) && PED::IS_PED_SITTING_IN_VEHICLE(uParam0->f_3, uParam0->f_4))
  		{
  			Var0 = { ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(uParam0->f_4, -1.78774f, -1.62399f, -0.6206f) };
  			Var3 = { ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(uParam0->f_4, 1.78498f, -1.24105f, -0.6422f) };
  			if (func_158(uParam0->f_3, uParam0->f_4) == 0)
  			{
  				TASK::TASK_LEAVE_VEHICLE(uParam0->f_3, uParam0->f_4, 512);
  			}
  			else if (MISC::GET_DISTANCE_BETWEEN_COORDS(Var0, Param1, false) < MISC::GET_DISTANCE_BETWEEN_COORDS(Var3, Param1, false) && VEHICLE::IS_ENTRY_POINT_FOR_SEAT_CLEAR(uParam0->f_3, uParam0->f_4, 1, false, false))
  			{
  				TASK::TASK_LEAVE_VEHICLE(uParam0->f_3, uParam0->f_4, 131072);
  			}
  			else if (MISC::GET_DISTANCE_BETWEEN_COORDS(Var0, Param1, false) >= MISC::GET_DISTANCE_BETWEEN_COORDS(Var3, Param1, false) && VEHICLE::IS_ENTRY_POINT_FOR_SEAT_CLEAR(uParam0->f_3, uParam0->f_4, 2, false, false))
  			{
  				TASK::TASK_LEAVE_VEHICLE(uParam0->f_3, uParam0->f_4, 262144);
  			}
  			else
  			{
  				TASK::TASK_LEAVE_VEHICLE(uParam0->f_3, uParam0->f_4, 0);
  			}
  		}
  	}
  }
  
  int func_158(int iParam0, int iParam1)
  {
  	if (!ENTITY::IS_ENTITY_DEAD(iParam0, false) && !ENTITY::IS_ENTITY_DEAD(iParam1, false))
  	{
  		if (PED::IS_PED_SITTING_IN_VEHICLE(iParam0, iParam1))
  		{
  			if (VEHICLE::GET_PED_IN_VEHICLE_SEAT(iParam1, -1, false) == iParam0)
  			{
  				return -1;
  			}
  			if (VEHICLE::GET_PED_IN_VEHICLE_SEAT(iParam1, 0, false) == iParam0)
  			{
  				return 0;
  			}
  			if (VEHICLE::GET_PED_IN_VEHICLE_SEAT(iParam1, 1, false) == iParam0)
  			{
  				return 1;
  			}
  			if (VEHICLE::GET_PED_IN_VEHICLE_SEAT(iParam1, 2, false) == iParam0)
  			{
  				return 2;
  			}
  		}
  	}
  	return -2;
  }
  
  bool func_159(var uParam0, int iParam1)
  {
  	if (iParam1 != 1073741824)
  	{
  		return (func_24(uParam0->f_81, iParam1) && !func_191());
  	}
  	return func_191();
  }
  
  int func_160(var uParam0, bool bParam1, float fParam2)
  {
  	if (VEHICLE::IS_VEHICLE_DRIVEABLE(uParam0->f_4, false))
  	{
  		if (PED::IS_PED_IN_VEHICLE(uParam0->f_2, uParam0->f_4, false))
  		{
  			if (func_46(1))
  			{
  				func_44(0);
  			}
  			if (func_35())
  			{
  				func_163();
  				return 1;
  			}
  			else if (func_161(uParam0->f_4, fParam2, 1, 1056964608, 0, 1, 0))
  			{
  				if (bParam1)
  				{
  					PLAYER::SET_PLAYER_CONTROL(PLAYER::GET_PLAYER_INDEX(), false, 256);
  				}
  				else
  				{
  					PLAYER::SET_PLAYER_CONTROL(PLAYER::GET_PLAYER_INDEX(), false, 0);
  				}
  			}
  			VEHICLE::SET_VEHICLE_BRAKE_LIGHTS(uParam0->f_4, true);
  		}
  	}
  	return 0;
  }
  
  int func_161(int iParam0, float fParam1, int iParam2, float fParam3, bool bParam4, bool bParam5, bool bParam6)
  {
  	PAD::DISABLE_CONTROL_ACTION(0, 71, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 72, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 76, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 73, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 59, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 60, true);
  	if (bParam5)
  	{
  		PAD::DISABLE_CONTROL_ACTION(0, 75, true);
  	}
  	PAD::DISABLE_CONTROL_ACTION(0, 80, true);
  	if (!bParam6)
  	{
  		PAD::DISABLE_CONTROL_ACTION(0, 69, true);
  		PAD::DISABLE_CONTROL_ACTION(0, 70, true);
  		PAD::DISABLE_CONTROL_ACTION(0, 68, true);
  	}
  	PAD::DISABLE_CONTROL_ACTION(0, 74, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 86, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 81, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 82, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 138, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 136, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 114, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 107, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 110, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 89, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 89, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 87, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 88, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 113, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 115, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 116, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 117, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 118, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 119, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 352, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 131, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 132, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 123, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 126, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 129, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 130, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 133, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 134, true);
  	CAM::_0x17FCA7199A530203();
  	func_162(iParam0);
  	if ((MISC::GET_GAME_TIMER() - Global_29) > 500)
  	{
  		VEHICLE::BRING_VEHICLE_TO_HALT(iParam0, fParam1, iParam2, bParam4);
  	}
  	Global_29 = MISC::GET_GAME_TIMER();
  	if (!ENTITY::IS_ENTITY_DEAD(iParam0, false))
  	{
  		if (MISC::ABSF(ENTITY::GET_ENTITY_SPEED(iParam0)) <= fParam3)
  		{
  			return 1;
  		}
  	}
  	return 0;
  }
  
  void func_162(int iParam0)
  {
  	if (!ENTITY::IS_ENTITY_DEAD(iParam0, false))
  	{
  		if (VEHICLE::_GET_HAS_ROCKET_BOOST(iParam0))
  		{
  			if (VEHICLE::_IS_VEHICLE_ROCKET_BOOST_ACTIVE(iParam0))
  			{
  				VEHICLE::_SET_VEHICLE_ROCKET_BOOST_ACTIVE(iParam0, false);
  			}
  		}
  	}
  }
  
  void func_163()
  {
  	if (PLAYER::IS_SPECIAL_ABILITY_ACTIVE(PLAYER::PLAYER_ID(), 0))
  	{
  		PLAYER::SPECIAL_ABILITY_DEACTIVATE(PLAYER::PLAYER_ID(), 0);
  	}
  }
  
  int func_164(var uParam0)
  {
  	if (VEHICLE::IS_VEHICLE_DRIVEABLE(uParam0->f_4, false))
  	{
  		if (!PED::IS_PED_INJURED(uParam0->f_3))
  		{
  			if (PED::IS_PED_IN_VEHICLE(uParam0->f_3, uParam0->f_4, true))
  			{
  				return 1;
  			}
  		}
  	}
  	return 0;
  }
  
  void func_165(var uParam0, int iParam1)
  {
  	if (iParam1 < 5)
  	{
  		MISC::SET_BIT(&(uParam0->f_60[iParam1 /*3*/]), 2);
  		uParam0->f_105 = (uParam0->f_105 + uParam0->f_60[iParam1 /*3*/].f_1);
  	}
  }
  
  void func_166(bool bParam0)
  {
  	if (Local_410.f_56 < Local_410.f_58)
  	{
  		func_239(&Local_410, 103, 1, 0, 0);
  	}
  	else if (Local_410.f_56 >= Local_410.f_59)
  	{
  		if (!bParam0)
  		{
  			func_239(&Local_410, 101, 1, 0, 0);
  		}
  		else
  		{
  			func_65(&(Local_410.f_82), 4194304);
  			func_239(&Local_410, 22, 1, 0, 0);
  		}
  	}
  	else if (!bParam0)
  	{
  		func_239(&Local_410, 102, 1, 0, 0);
  	}
  	else
  	{
  		func_65(&(Local_410.f_82), 2097152);
  		func_239(&Local_410, 22, 1, 0, 0);
  	}
  }
  
  void func_167(var uParam0, bool bParam1)
  {
  	func_178(uParam0, uParam0->f_3);
  	if (VEHICLE::IS_VEHICLE_DRIVEABLE(uParam0->f_4, false))
  	{
  		if (!PED::IS_PED_IN_VEHICLE(uParam0->f_2, uParam0->f_4, false))
  		{
  			if (!func_177(uParam0, 14))
  			{
  				if (func_191())
  				{
  					func_176(1);
  				}
  				func_175(uParam0, 11, 1);
  				func_170(uParam0, 1);
  				func_308(uParam0, 14, 0f, 1);
  				if (uParam0->f_410 < 15)
  				{
  				}
  			}
  			else if (bParam1)
  			{
  				if (!func_164(uParam0))
  				{
  					if ((MISC::GET_GAME_TIMER() % 1000) < 50)
  					{
  					}
  					if (PED::IS_PED_IN_ANY_VEHICLE(uParam0->f_2, false))
  					{
  						if (func_418(uParam0, 15) > 5f)
  						{
  							func_308(uParam0, 15, 0f, 1);
  						}
  					}
  					if (func_418(uParam0, 14) > 20f)
  					{
  						func_341(uParam0, "Player not in taxi. - YELL RETURN", 8);
  					}
  				}
  				else if (func_418(uParam0, 14) > 20f)
  				{
  					if (func_168(uParam0->f_4, 1) > 40f)
  					{
  						func_341(uParam0, "Player not in taxi.", 21);
  					}
  					else
  					{
  						func_341(uParam0, "Player not in taxi. - YELL RETURN 2", 8);
  					}
  				}
  			}
  		}
  	}
  }
  
  float func_168(int iParam0, bool bParam1)
  {
  	return func_169(PLAYER::GET_PLAYER_PED(PLAYER::GET_PLAYER_INDEX()), iParam0, bParam1);
  }
  
  float func_169(int iParam0, int iParam1, bool bParam2)
  {
  	struct<3> Var0;
  	struct<3> Var3;
  	
  	if (!ENTITY::IS_ENTITY_DEAD(iParam0, false))
  	{
  		Var0 = { ENTITY::GET_ENTITY_COORDS(iParam0, true) };
  	}
  	else
  	{
  		Var0 = { ENTITY::GET_ENTITY_COORDS(iParam0, false) };
  	}
  	if (!ENTITY::IS_ENTITY_DEAD(iParam1, false))
  	{
  		Var3 = { ENTITY::GET_ENTITY_COORDS(iParam1, true) };
  	}
  	else
  	{
  		Var3 = { ENTITY::GET_ENTITY_COORDS(iParam1, false) };
  	}
  	return MISC::GET_DISTANCE_BETWEEN_COORDS(Var0, Var3, bParam2);
  }
  
  void func_170(var uParam0, bool bParam1)
  {
  	if (VEHICLE::IS_VEHICLE_DRIVEABLE(uParam0->f_4, false))
  	{
  		if (bParam1)
  		{
  			if (HUD::DOES_BLIP_EXIST(uParam0->f_8))
  			{
  				HUD::SET_BLIP_ALPHA(uParam0->f_8, 0);
  				HUD::SET_BLIP_ROUTE(uParam0->f_8, false);
  				func_174(uParam0, &(uParam0->f_98), 4, 3);
  			}
  			else if (HUD::DOES_BLIP_EXIST(uParam0->f_9))
  			{
  				HUD::SET_BLIP_ALPHA(uParam0->f_9, 0);
  				HUD::SET_BLIP_ROUTE(uParam0->f_9, false);
  				HUD::CLEAR_PRINTS();
  				if (func_164(uParam0))
  				{
  					func_239(uParam0, 2, 1, 0, 0);
  				}
  				else
  				{
  					func_174(uParam0, &(uParam0->f_98), 4, 3);
  				}
  			}
  			func_171(uParam0, 0, 0);
  		}
  		else if (HUD::DOES_BLIP_EXIST(uParam0->f_10))
  		{
  			HUD::REMOVE_BLIP(&(uParam0->f_10));
  			if (HUD::DOES_BLIP_EXIST(uParam0->f_8))
  			{
  				HUD::SET_BLIP_ALPHA(uParam0->f_8, 255);
  				HUD::SET_BLIP_ROUTE(uParam0->f_8, true);
  			}
  			else if (HUD::DOES_BLIP_EXIST(uParam0->f_9))
  			{
  				if (uParam0->f_411 == 5 && uParam0->f_410 == 17)
  				{
  					HUD::SET_BLIP_ALPHA(uParam0->f_9, 0);
  					HUD::SET_BLIP_ROUTE(uParam0->f_9, false);
  				}
  				else if (uParam0->f_411 != 4)
  				{
  					HUD::SET_BLIP_ALPHA(uParam0->f_9, 255);
  					HUD::SET_BLIP_ROUTE(uParam0->f_9, true);
  				}
  			}
  			HUD::CLEAR_PRINTS();
  		}
  	}
  }
  
  void func_171(var uParam0, bool bParam1, bool bParam2)
  {
  	if (bParam1)
  	{
  		func_422(uParam0);
  	}
  	if (!HUD::DOES_BLIP_EXIST(uParam0->f_10))
  	{
  		uParam0->f_10 = func_151(uParam0->f_4, 1, 0);
  		HUD::SET_BLIP_NAME_FROM_TEXT_FILE(uParam0->f_10, "TAXI_BLIP_CAR");
  		HUD::SET_BLIP_ROUTE(uParam0->f_10, true);
  		func_172(uParam0);
  		if (bParam2)
  		{
  			HUD::CLEAR_PRINTS();
  			func_239(uParam0, 3, 1, 0, 0);
  		}
  	}
  }
  
  void func_172(var uParam0)
  {
  	func_308(uParam0, 14, 0, 0);
  	func_173();
  }
  
  void func_173()
  {
  	int iVar0;
  	
  	iVar0 = PLAYER::GET_PLAYERS_LAST_VEHICLE();
  	if (VEHICLE::IS_VEHICLE_DRIVEABLE(iVar0, false))
  	{
  		AUDIO::PLAY_SOUND_FROM_ENTITY(-1, "Radio_Off", iVar0, "TAXI_SOUNDS", false, 0);
  	}
  }
  
  void func_174(var uParam0, var uParam1, int iParam2, int iParam3)
  {
  	if (!func_24(*uParam1, iParam2))
  	{
  		HUD::CLEAR_PRINTS();
  		func_239(uParam0, iParam3, 1, 0, 0);
  		func_65(uParam1, iParam2);
  	}
  }
  
  void func_175(var uParam0, int iParam1, bool bParam2)
  {
  	uParam0->f_414 = iParam1;
  	if (bParam2)
  	{
  	}
  }
  
  void func_176(int iParam0)
  {
  	Global_22296 = iParam0;
  }
  
  bool func_177(var uParam0, int iParam1)
  {
  	return func_16(&(uParam0->f_146[iParam1 /*3*/]));
  }
  
  void func_178(var uParam0, int iParam1)
  {
  	if (ENTITY::DOES_ENTITY_EXIST(iParam1))
  	{
  		if (!PED::IS_PED_INJURED(iParam1))
  		{
  			if (PLAYER::HAS_PLAYER_DAMAGED_AT_LEAST_ONE_PED(PLAYER::PLAYER_ID()))
  			{
  				if ((WEAPON::HAS_PED_BEEN_DAMAGED_BY_WEAPON(iParam1, joaat("weapon_stungun"), 0) || WEAPON::HAS_PED_BEEN_DAMAGED_BY_WEAPON(iParam1, 0, 2)) || WEAPON::HAS_PED_BEEN_DAMAGED_BY_WEAPON(iParam1, 0, 1))
  				{
  					func_341(uParam0, "Passenger injured by player with weapon.", 14);
  				}
  				PLAYER::CLEAR_PLAYER_HAS_DAMAGED_AT_LEAST_ONE_PED(PLAYER::PLAYER_ID());
  			}
  		}
  	}
  }
  
  int func_179(var uParam0)
  {
  	if (VEHICLE::IS_VEHICLE_DRIVEABLE(uParam0->f_4, false))
  	{
  		if (VEHICLE::GET_PED_IN_VEHICLE_SEAT(uParam0->f_4, -1, false) == uParam0->f_2)
  		{
  			if (func_177(uParam0, 14))
  			{
  				func_180(uParam0);
  			}
  			func_170(uParam0, 0);
  			return 1;
  		}
  	}
  	return 0;
  }
  
  void func_180(var uParam0)
  {
  	func_183(uParam0, 14, 0);
  	func_183(uParam0, 15, 0);
  	func_182();
  	if (func_181())
  	{
  		func_176(0);
  	}
  }
  
  int func_181()
  {
  	if (Global_22296 == 1)
  	{
  		return 1;
  	}
  	return 0;
  }
  
  void func_182()
  {
  	int iVar0;
  	
  	iVar0 = PLAYER::GET_PLAYERS_LAST_VEHICLE();
  	if (VEHICLE::IS_VEHICLE_DRIVEABLE(iVar0, false))
  	{
  		AUDIO::PLAY_SOUND_FROM_ENTITY(-1, "Radio_On", iVar0, "TAXI_SOUNDS", false, 0);
  	}
  }
  
  void func_183(var uParam0, int iParam1, bool bParam2)
  {
  	int iVar0;
  	
  	if (iParam1 == 14)
  	{
  	}
  	if (iParam1 == 32)
  	{
  		iVar0 = 0;
  		while (iVar0 < 32)
  		{
  			func_104(&(uParam0->f_146[iVar0 /*3*/]));
  			iVar0++;
  		}
  	}
  	else
  	{
  		func_104(&(uParam0->f_146[iParam1 /*3*/]));
  	}
  	if (bParam2)
  	{
  	}
  }
  
  int func_184()
  {
  	if (VEHICLE::IS_VEHICLE_DRIVEABLE(Local_410.f_4, false))
  	{
  		if (iLocal_876 && ENTITY::GET_ENTITY_SPEED(Local_410.f_4) < 5f)
  		{
  			if (!func_177(&Local_410, 21))
  			{
  				func_308(&Local_410, 21, 0, 0);
  			}
  		}
  		if (ENTITY::GET_ENTITY_SPEED(Local_410.f_4) >= 5f && func_177(&Local_410, 21))
  		{
  			func_183(&Local_410, 21, 0);
  		}
  	}
  	if (bLocal_879)
  	{
  		func_185(&Local_410, 21);
  		fLocal_875 = func_418(&Local_410, 21);
  		if (fLocal_875 >= fLocal_874)
  		{
  			bLocal_880 = true;
  			return 1;
  		}
  		else
  		{
  			bLocal_880 = false;
  			return 1;
  		}
  	}
  	return 0;
  }
  
  void func_185(var uParam0, int iParam1)
  {
  	int iVar0;
  	
  	if (iParam1 == 32)
  	{
  		iVar0 = 0;
  		while (iVar0 < 32)
  		{
  			if (!func_15(&(uParam0->f_146[iVar0 /*3*/])))
  			{
  				func_186(&(uParam0->f_146[iVar0 /*3*/]));
  			}
  			iVar0++;
  		}
  	}
  	else if (func_16(&(uParam0->f_146[iParam1 /*3*/])))
  	{
  		if (!func_15(&(uParam0->f_146[iParam1 /*3*/])))
  		{
  			func_186(&(uParam0->f_146[iParam1 /*3*/]));
  		}
  	}
  }
  
  void func_186(int* iParam0)
  {
  	if (func_16(iParam0))
  	{
  		if (!func_15(iParam0))
  		{
  			iParam0->f_2 = (func_14(MISC::IS_BIT_SET(*iParam0, 4)) - iParam0->f_1);
  			MISC::SET_BIT(iParam0, 2);
  		}
  	}
  }
  
  int func_187(var uParam0)
  {
  	float fVar0;
  	struct<3> Var1;
  	
  	if (!PED::IS_PED_INJURED(*uParam0))
  	{
  		switch (iLocal_870)
  		{
  			case 0:
  				if (!func_191())
  				{
  					if (func_193(&(Local_410.f_244), "txm1aud", "txm1_Puke1", 8, 0, 0, 0))
  					{
  						TASK::TASK_PLAY_ANIM(*uParam0, sLocal_884, sLocal_883, 8f, -4f, -1, 0, 0f, false, false, false);
  						if (!ENTITY::IS_ENTITY_DEAD(PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), false), false))
  						{
  							switch (func_135(*uParam0, 0))
  							{
  								case 0:
  									VEHICLE::REMOVE_VEHICLE_WINDOW(PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), false), 1);
  									break;
  								
  								case 2:
  									VEHICLE::REMOVE_VEHICLE_WINDOW(PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), false), 3);
  									break;
  								
  								default:
  									VEHICLE::REMOVE_VEHICLE_WINDOW(PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), false), 3);
  									break;
  								}
  						}
  						if (func_177(&Local_410, 10))
  						{
  							func_183(&Local_410, 10, 0);
  						}
  						iLocal_870++;
  					}
  				}
  				else if ((MISC::GET_GAME_TIMER() % 1000) < 50)
  				{
  				}
  				break;
  			
  			case 1:
  				if (ENTITY::IS_ENTITY_PLAYING_ANIM(*uParam0, sLocal_884, sLocal_883, 3))
  				{
  					fVar0 = ENTITY::GET_ENTITY_ANIM_CURRENT_TIME(*uParam0, sLocal_884, sLocal_883);
  					if (bLocal_885)
  					{
  					}
  					if (fVar0 > 0.243f && fVar0 < 0.28f)
  					{
  						if (!iLocal_876)
  						{
  							GRAPHICS::START_PARTICLE_FX_NON_LOOPED_ON_PED_BONE("scr_puke_in_car", *uParam0, Local_863, Local_866, 31086, 1f, false, false, false);
  							iLocal_876 = 1;
  						}
  					}
  					else if (fVar0 > 0.295f && fVar0 < 0.37f)
  					{
  						if (!iLocal_877)
  						{
  							GRAPHICS::START_PARTICLE_FX_NON_LOOPED_ON_PED_BONE("scr_puke_in_car", *uParam0, Local_863, Local_866, 31086, 1f, false, false, false);
  							iLocal_877 = 1;
  						}
  					}
  					else if (fVar0 > 0.487857f && fVar0 < 0.55f)
  					{
  						if (!iLocal_878)
  						{
  							GRAPHICS::START_PARTICLE_FX_NON_LOOPED_ON_PED_BONE("scr_puke_in_car", *uParam0, Local_863, Local_866, 31086, 1f, false, false, false);
  							iLocal_878 = 1;
  							if (!iLocal_881)
  							{
  								StringCopy(&Var1, "txm1_pukeR1", 24);
  								func_188(&Var1);
  								func_193(&(Local_410.f_244), "txm1aud", &Var1, 8, 0, 0, 0);
  								iLocal_881 = 1;
  							}
  						}
  					}
  					if (ENTITY::GET_ENTITY_ANIM_CURRENT_TIME(*uParam0, sLocal_884, sLocal_883) > 0.9f)
  					{
  						iLocal_870++;
  					}
  				}
  				break;
  			
  			case 2:
  				if (!ENTITY::IS_ENTITY_PLAYING_ANIM(*uParam0, sLocal_884, sLocal_883, 3))
  				{
  				}
  				TASK::TASK_PLAY_ANIM(*uParam0, sLocal_884, "drunk_idle", 8f, -8f, -1, 1, 0f, false, false, false);
  				iLocal_876 = 0;
  				iLocal_870++;
  				break;
  			
  			case 3:
  				bLocal_879 = true;
  				if (!func_177(&Local_410, 10))
  				{
  					func_308(&Local_410, 10, 0, 0);
  				}
  				return 1;
  				break;
  			}
  	}
  	return 0;
  }
  
  void func_188(char* sParam0)
  {
  	StringConCat(sParam0, "F", 24);
  }
  
  void func_189()
  {
  	Global_20151 = 0;
  	func_190();
  }
  
  void func_190()
  {
  	AUDIO::RESTART_SCRIPTED_CONVERSATION();
  	Global_22296 = 0;
  	if ((AUDIO::IS_MOBILE_PHONE_CALL_ONGOING() || Global_19954.f_1 == 9) || Global_19953 == 1)
  	{
  		AUDIO::STOP_SCRIPTED_CONVERSATION(false);
  		Global_21285 = 6;
  		Global_19954.f_1 = 3;
  		return;
  	}
  	if (AUDIO::IS_SCRIPTED_CONVERSATION_ONGOING())
  	{
  		AUDIO::STOP_SCRIPTED_CONVERSATION(true);
  		Global_21285 = 6;
  		return;
  	}
  }
  
  int func_191()
  {
  	if (Global_21285 != 0 || AUDIO::IS_SCRIPTED_CONVERSATION_ONGOING())
  	{
  		return 1;
  	}
  	return 0;
  }
  
  int func_192(var uParam0)
  {
  	return uParam0->f_104;
  }
  
  bool func_193(var uParam0, char* sParam1, char* sParam2, int iParam3, int iParam4, int iParam5, int iParam6)
  {
  	func_205(uParam0, 145, sParam1, iParam4, iParam5, iParam6);
  	if (iParam3 > 7)
  	{
  		if (iParam3 < 12)
  		{
  			iParam3 = 7;
  		}
  	}
  	Global_21292 = 0;
  	Global_21294 = 0;
  	Global_21299 = 0;
  	Global_22276 = 0;
  	Global_22278 = 0;
  	Global_22282 = 0;
  	Global_2883585 = 0;
  	return func_194(sParam2, iParam3, 0);
  }
  
  int func_194(char* sParam0, int iParam1, bool bParam2)
  {
  	Global_21286 = 0;
  	if (Global_21285 == 0 || Global_21287 == 2)
  	{
  		if (Global_21285 != 0)
  		{
  			if (iParam1 > Global_21287)
  			{
  				if (Global_21292 == 0)
  				{
  					AUDIO::STOP_SCRIPTED_CONVERSATION(false);
  					Global_19954.f_1 = 3;
  					Global_21285 = 0;
  					Global_21286 = 1;
  					Global_21338 = 0;
  					Global_21281 = 0;
  					Global_21282 = 0;
  					Global_21296 = 0;
  					Global_21295 = 0;
  					Global_19953 = 0;
  				}
  				else
  				{
  					func_190();
  					return 0;
  				}
  			}
  			else
  			{
  				return 0;
  			}
  		}
  		if (AUDIO::IS_SCRIPTED_CONVERSATION_ONGOING())
  		{
  			return 0;
  		}
  		if (func_204(8, -1))
  		{
  			return 0;
  		}
  		Global_21361 = { Global_21355 };
  		func_203();
  		Global_20574 = { Global_20739 };
  		Global_21291 = Global_21292;
  		Global_21298 = Global_21299;
  		Global_2883586 = Global_2883585;
  		Global_21300 = { Global_21316 };
  		Global_21293 = Global_21294;
  		Global_22275 = Global_22276;
  		Global_22283 = { Global_22289 };
  		Global_22277 = Global_22278;
  		Global_22279 = Global_22280;
  		Global_22281 = Global_22282;
  		Global_20904.f_370 = Global_22274;
  		Global_20904.f_368 = Global_22272;
  		Global_20904.f_369 = Global_22273;
  		Global_21281 = Global_21282;
  		if (Global_21291)
  		{
  			MISC::CLEAR_BIT(&Global_7824, 20);
  			MISC::CLEAR_BIT(&Global_7825, 17);
  			MISC::CLEAR_BIT(&Global_7826, 0);
  			if (bParam2)
  			{
  				func_202();
  				if (Global_8629[Global_19954 /*2811*/][0 /*281*/].f_259 == 2)
  				{
  					if (iParam1 == 13)
  					{
  					}
  					else
  					{
  						return 0;
  					}
  				}
  				if (Global_19954.f_1 > 3)
  				{
  					return 0;
  				}
  			}
  			if (Global_19920 == 1)
  			{
  				return 0;
  			}
  			if (PLAYER::IS_PLAYER_PLAYING(PLAYER::PLAYER_ID()))
  			{
  				if (PED::IS_PED_IN_MELEE_COMBAT(PLAYER::PLAYER_PED_ID()))
  				{
  					return 0;
  				}
  				if (func_201())
  				{
  					return 0;
  				}
  				if (TASK::IS_PED_SPRINTING(PLAYER::PLAYER_PED_ID()))
  				{
  					return 0;
  				}
  				if (PED::IS_PED_RAGDOLL(PLAYER::PLAYER_PED_ID()))
  				{
  					return 0;
  				}
  				if (PED::IS_PED_IN_PARACHUTE_FREE_FALL(PLAYER::PLAYER_PED_ID()))
  				{
  					return 0;
  				}
  				if (WEAPON::GET_IS_PED_GADGET_EQUIPPED(PLAYER::PLAYER_PED_ID(), joaat("gadget_parachute")))
  				{
  					return 0;
  				}
  				if (!Global_77852)
  				{
  					if (ENTITY::IS_ENTITY_IN_WATER(PLAYER::PLAYER_PED_ID()))
  					{
  						return 0;
  					}
  					if (PLAYER::IS_PLAYER_CLIMBING(PLAYER::PLAYER_ID()))
  					{
  						return 0;
  					}
  					if (PED::IS_PED_PLANTING_BOMB(PLAYER::PLAYER_PED_ID()))
  					{
  						return 0;
  					}
  					if (PLAYER::IS_SPECIAL_ABILITY_ACTIVE(PLAYER::PLAYER_ID(), 0))
  					{
  						return 0;
  					}
  				}
  			}
  			if (func_33())
  			{
  				return 0;
  			}
  			else
  			{
  				switch (Global_19954.f_1)
  				{
  					case 7:
  						return 0;
  						break;
  					
  					case 8:
  						return 0;
  						break;
  					
  					case 9:
  						break;
  					
  					case 10:
  						break;
  					
  					default:
  						break;
  				}
  				if (MISC::IS_BIT_SET(Global_7824, 9))
  				{
  					return 0;
  				}
  			}
  			func_200();
  			Global_21295 = bParam2;
  		}
  		Global_21287 = iParam1;
  		StringCopy(&Global_20904, sParam0, 24);
  		Global_20151 = 0;
  		func_199();
  		func_195();
  		return 1;
  	}
  	if (Global_21285 == 5)
  	{
  		return 0;
  	}
  	if (iParam1 < Global_21287 || iParam1 == Global_21287)
  	{
  		return 0;
  	}
  	if (iParam1 == 2)
  	{
  	}
  	else
  	{
  		func_190();
  	}
  	return 0;
  }
  
  void func_195()
  {
  	if (!func_196())
  	{
  		return;
  	}
  	if (Global_21291)
  	{
  		MemCopy(&(Global_1973333.f_1), {Global_20904}, 4);
  		Global_1973333 = Global_7139;
  		Global_1973333.f_6 = Global_21295;
  	}
  }
  
  int func_196()
  {
  	if (!Global_262145.f_28526)
  	{
  		return 0;
  	}
  	if (!Global_77852)
  	{
  		return 0;
  	}
  	if (PLAYER::PLAYER_ID() == func_133())
  	{
  		return 0;
  	}
  	if (func_197(PLAYER::PLAYER_ID()))
  	{
  		return 0;
  	}
  	if (MISC::IS_BIT_SET(Global_1893548[PLAYER::PLAYER_ID() /*600*/].f_1, 7))
  	{
  		return 0;
  	}
  	if (NETWORK::NETWORK_IS_ACTIVITY_SESSION())
  	{
  		return 0;
  	}
  	return 1;
  }
  
  bool func_197(int iParam0)
  {
  	return func_198(iParam0, 20);
  }
  
  bool func_198(int iParam0, int iParam1)
  {
  	return MISC::IS_BIT_SET(Global_1893548[iParam0 /*600*/].f_11.f_4, iParam1);
  }
  
  void func_199()
  {
  	int iVar0;
  	
  	iVar0 = 0;
  	while (iVar0 <= 69)
  	{
  		StringCopy(&(Global_20153[iVar0 /*6*/]), "", 24);
  		iVar0++;
  	}
  	AUDIO::STOP_SCRIPTED_CONVERSATION(false);
  	Global_21285 = 1;
  }
  
  void func_200()
  {
  	Global_21338 = Global_21337;
  	Global_21332 = Global_21333;
  	Global_21379 = { Global_21367 };
  	Global_21385 = { Global_21373 };
  	Global_21340 = Global_21339;
  	Global_21409 = { Global_21391 };
  	Global_21415 = { Global_21397 };
  	Global_21421 = { Global_21403 };
  	Global_21427 = { Global_21433 };
  	Global_7139 = Global_7140;
  	Global_7141 = Global_7142;
  	Global_21296 = Global_21297;
  	Global_21298 = Global_21299;
  	Global_21300 = { Global_21316 };
  	Global_21289 = Global_21290;
  	Global_22301 = 0;
  	Global_21334 = 0;
  	Global_21335 = 0;
  	MISC::CLEAR_BIT(&Global_7825, 16);
  }
  
  int func_201()
  {
  	int iVar0;
  	int iVar1;
  	
  	if (Global_77852)
  	{
  		iVar0 = 0;
  		WEAPON::GET_CURRENT_PED_WEAPON(PLAYER::PLAYER_PED_ID(), &iVar1, true);
  		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 1;
  		}
  		else
  		{
  			return 0;
  		}
  	}
  	if (PLAYER::IS_PLAYER_PLAYING(PLAYER::PLAYER_ID()))
  	{
  		if (PED::GET_PED_CONFIG_FLAG(PLAYER::PLAYER_PED_ID(), 78, true))
  		{
  			return 1;
  		}
  		else
  		{
  			return 0;
  		}
  	}
  	return 1;
  }
  
  void func_202()
  {
  	if (func_80(14))
  	{
  		if (!ENTITY::IS_ENTITY_DEAD(PLAYER::PLAYER_PED_ID(), false))
  		{
  			if (ENTITY::GET_ENTITY_MODEL(PLAYER::PLAYER_PED_ID()) == Global_112915.f_28050[0 /*29*/])
  			{
  				Global_19954 = 0;
  			}
  			else if (ENTITY::GET_ENTITY_MODEL(PLAYER::PLAYER_PED_ID()) == Global_112915.f_28050[1 /*29*/])
  			{
  				Global_19954 = 1;
  			}
  			else if (ENTITY::GET_ENTITY_MODEL(PLAYER::PLAYER_PED_ID()) == Global_112915.f_28050[2 /*29*/])
  			{
  				Global_19954 = 2;
  			}
  			else
  			{
  				Global_19954 = 0;
  			}
  		}
  	}
  	else
  	{
  		Global_19954 = func_101();
  		if (Global_19954 == 145)
  		{
  			Global_19954 = 3;
  		}
  		if (Global_77852)
  		{
  			Global_19954 = 3;
  		}
  		if (Global_19954 > 3)
  		{
  			Global_19954 = 3;
  		}
  	}
  }
  
  void func_203()
  {
  	int iVar0;
  	
  	iVar0 = 0;
  	while (iVar0 <= 15)
  	{
  		Global_20574[iVar0 /*10*/] = 0;
  		StringCopy(&(Global_20574[iVar0 /*10*/].f_1), "", 24);
  		Global_20574[iVar0 /*10*/].f_7 = 0;
  		Global_20574[iVar0 /*10*/].f_8 = 0;
  		iVar0++;
  	}
  	Global_20574.f_161 = -99;
  	Global_20574.f_162 = { 0f, 0f, 0f };
  }
  
  bool func_204(int iParam0, int iParam1)
  {
  	switch (iParam0)
  	{
  		case 5:
  			if (iParam1 > -1)
  			{
  				return Global_1644209.f_203[iParam1];
  			}
  			break;
  	}
  	return MISC::IS_BIT_SET(Global_1644209.f_1048, iParam0);
  }
  
  void func_205(var uParam0, int iParam1, char* sParam2, int iParam3, int iParam4, int iParam5)
  {
  	Global_20739 = { *uParam0 };
  	Global_7140 = iParam1;
  	StringCopy(&Global_21355, sParam2, 24);
  	Global_22274 = iParam5;
  	if (iParam3 == 0)
  	{
  		Global_22272 = 1;
  		Global_22270 = 0;
  	}
  	else
  	{
  		Global_22272 = 0;
  		Global_22270 = 1;
  	}
  	if (iParam4 == 0)
  	{
  		Global_22273 = 1;
  		Global_22271 = 0;
  	}
  	else
  	{
  		Global_22273 = 0;
  		Global_22271 = 1;
  	}
  }
  
  void func_206(var uParam0)
  {
  	float fVar0;
  	
  	fVar0 = uParam0->f_41;
  	fVar0 = func_207(fVar0);
  	iLocal_57[4] = SYSTEM::CEIL(fVar0);
  	iLocal_57[5] = SYSTEM::CEIL(fVar0);
  	func_53(4, SYSTEM::CEIL(fVar0));
  	func_53(5, SYSTEM::CEIL(fVar0));
  	uParam0->f_50 = SYSTEM::CEIL((fVar0 * 100f));
  }
  
  float func_207(float fParam0)
  {
  	return (fParam0 * 0.0006213712f);
  }
  
  void func_208(var uParam0, int iParam1, bool bParam2)
  {
  	if (bParam2)
  	{
  		*uParam0 = 0;
  	}
  	else
  	{
  		*uParam0 = -1;
  	}
  	if (iParam1 > -1)
  	{
  		uParam0->f_27 = iParam1;
  	}
  }
  
  void func_209(var uParam0)
  {
  	int iVar0;
  	
  	iVar0 = 0;
  	while (iVar0 < 5)
  	{
  		(uParam0[iVar0 /*8*/])->f_6 = 0;
  		(uParam0[iVar0 /*8*/])->f_7 = 0;
  		StringCopy(uParam0[iVar0 /*8*/], func_210(), 24);
  		iVar0++;
  	}
  	HUD::CLEAR_PRINTS();
  	func_51();
  }
  
  var func_210()
  {
  	var uVar0;
  	
  	return uVar0;
  }
  
  int func_211(var uParam0, float fParam1, float fParam2)
  {
  	if ((((CAM::IS_SCREEN_FADED_IN() && !CAM::IS_SCREEN_FADING_IN()) && !CAM::IS_SCREEN_FADING_OUT()) && !CAM::IS_SCREEN_FADED_OUT()) && !uParam0->f_142)
  	{
  		if (func_228(uParam0))
  		{
  			func_227(uParam0, &(uParam0->f_43));
  			func_224(uParam0);
  			func_219(uParam0);
  			func_215(uParam0, fParam2, 1117782016);
  			func_214(uParam0);
  			func_212(uParam0);
  			if ((SYSTEM::ROUND(func_418(uParam0, 7)) % 5) == 0 && !iLocal_93)
  			{
  				iLocal_93 = 1;
  			}
  			if ((SYSTEM::ROUND(func_418(uParam0, 7)) % 5) == 2 && iLocal_93)
  			{
  				iLocal_93 = 0;
  			}
  			return func_229(uParam0, fParam1);
  		}
  	}
  	return 0;
  }
  
  void func_212(var uParam0)
  {
  	float fVar0;
  	
  	if ((func_164(uParam0) && func_24(uParam0->f_81, 67108864)) && PLAYER::GET_PLAYER_WANTED_LEVEL(PLAYER::PLAYER_ID()) == 0)
  	{
  		if ((MISC::GET_GAME_TIMER() - iLocal_97) >= 10000)
  		{
  			fVar0 = func_213(uParam0->f_17, 1);
  			if (fVar0 > fLocal_95)
  			{
  				iLocal_96++;
  			}
  			else
  			{
  				iLocal_96 = 0;
  			}
  			fLocal_95 = fVar0;
  			iLocal_97 = MISC::GET_GAME_TIMER();
  		}
  		if (iLocal_96 >= 2 && !func_191())
  		{
  			func_239(uParam0, 136, 1, 0, 1);
  			iLocal_96 = 0;
  		}
  		if ((MISC::GET_GAME_TIMER() % 1000) < 50)
  		{
  		}
  	}
  	else
  	{
  		if ((MISC::GET_GAME_TIMER() % 4000) < 50)
  		{
  			if (!func_164(uParam0))
  			{
  			}
  			if (!func_24(uParam0->f_81, 67108864))
  			{
  			}
  		}
  		if (PLAYER::GET_PLAYER_WANTED_LEVEL(PLAYER::PLAYER_ID()) > 0)
  		{
  			if (iLocal_96 > 0)
  			{
  				iLocal_96 = 0;
  			}
  		}
  	}
  }
  
  float func_213(struct<3> Param0, bool bParam3)
  {
  	return func_10(PLAYER::GET_PLAYER_PED(PLAYER::GET_PLAYER_INDEX()), Param0, bParam3);
  }
  
  void func_214(var uParam0)
  {
  	if (PLAYER::IS_PLAYER_PRESSING_HORN(PLAYER::GET_PLAYER_INDEX()) && !func_24(uParam0->f_44, 2))
  	{
  		func_65(&(uParam0->f_44), 2);
  	}
  	else if (!PLAYER::IS_PLAYER_PRESSING_HORN(PLAYER::GET_PLAYER_INDEX()) && func_24(uParam0->f_44, 2))
  	{
  		func_22(&(uParam0->f_44), 2);
  		uParam0->f_47++;
  		func_53(9, 0);
  	}
  	if (uParam0->f_47 > 30)
  	{
  		func_239(uParam0, 47, 1, 0, 0);
  		uParam0->f_47 = 0;
  		uParam0->f_76 = (uParam0->f_76 + SYSTEM::CEIL(5f));
  	}
  }
  
  void func_215(var uParam0, float fParam1, float fParam2)
  {
  	if (func_164(uParam0) && func_24(uParam0->f_44, 4))
  	{
  		if ((VEHICLE::IS_VEHICLE_STOPPED(uParam0->f_4) || ENTITY::GET_ENTITY_SPEED(uParam0->f_4) < 3f) && func_218(uParam0))
  		{
  			if (!func_177(uParam0, 2))
  			{
  				func_216(uParam0, 2);
  			}
  			else if (func_164(uParam0))
  			{
  				if (func_418(uParam0, 2) > fParam1 && !func_177(uParam0, 14))
  				{
  					if (func_37())
  					{
  						func_239(uParam0, 48, 1, 0, 0);
  					}
  					else
  					{
  						func_239(uParam0, 48, 1, 0, 0);
  					}
  					func_308(uParam0, 2, 0, 0);
  					if (func_177(uParam0, 10))
  					{
  						func_308(uParam0, 10, 0, 0);
  					}
  				}
  				if (!func_177(uParam0, 3))
  				{
  					func_308(uParam0, 3, 0, 0);
  				}
  				else if (func_418(uParam0, 3) >= fParam2)
  				{
  					func_183(uParam0, 3, 0);
  					func_341(uParam0, "Car not moving", 20);
  				}
  			}
  		}
  		else
  		{
  			if (func_177(uParam0, 2))
  			{
  				func_183(uParam0, 2, 0);
  			}
  			if (func_177(uParam0, 3))
  			{
  				func_183(uParam0, 3, 0);
  			}
  		}
  	}
  }
  
  void func_216(var uParam0, int iParam1)
  {
  	func_217(&(uParam0->f_146[iParam1 /*3*/]));
  }
  
  void func_217(int* iParam0)
  {
  	if (!func_16(iParam0))
  	{
  		func_107(iParam0);
  	}
  }
  
  int func_218(var uParam0)
  {
  	if (VEHICLE::IS_VEHICLE_DRIVEABLE(uParam0->f_4, false))
  	{
  		if (VEHICLE::GET_PED_IN_VEHICLE_SEAT(uParam0->f_4, -1, false) == PLAYER::PLAYER_PED_ID())
  		{
  			return 1;
  		}
  	}
  	return 0;
  }
  
  void func_219(var uParam0)
  {
  	if (!func_24(uParam0->f_44, 1))
  	{
  		switch (uParam0->f_412)
  		{
  			case 0:
  				if (PLAYER::GET_PLAYER_WANTED_LEVEL(PLAYER::GET_PLAYER_INDEX()) >= 1)
  				{
  					if (func_418(uParam0, 9) > 1f)
  					{
  						func_223(uParam0, PLAYER::GET_PLAYER_WANTED_LEVEL(PLAYER::GET_PLAYER_INDEX()));
  						if (uParam0->f_410 != 22)
  						{
  							func_239(uParam0, 50, 1, 1, 0);
  						}
  						func_308(uParam0, 9, 0, 0);
  						if (HUD::DOES_BLIP_EXIST(uParam0->f_9))
  						{
  							HUD::SET_BLIP_ALPHA(uParam0->f_9, 0);
  							HUD::SET_BLIP_ROUTE(uParam0->f_9, false);
  						}
  						uParam0->f_140 = 1;
  						uParam0->f_412 = 1;
  					}
  				}
  				break;
  			
  			case 1:
  				if (!func_191() && func_418(uParam0, 9) > 4f)
  				{
  					func_239(uParam0, 52, 1, 0, 0);
  					uParam0->f_412 = 2;
  				}
  				break;
  			
  			case 2:
  				if (func_222("TAXI_OBJ_POL", 0, 0))
  				{
  					if (uParam0->f_410 != 22)
  					{
  						func_239(uParam0, 51, 0, 0, 0);
  					}
  					uParam0->f_412 = 3;
  				}
  				else if (PLAYER::GET_PLAYER_WANTED_LEVEL(PLAYER::GET_PLAYER_INDEX()) < 1)
  				{
  					uParam0->f_412 = 3;
  				}
  				break;
  			
  			case 3:
  				if (PLAYER::IS_PLAYER_WANTED_LEVEL_GREATER(PLAYER::GET_PLAYER_INDEX(), func_221(uParam0)))
  				{
  					func_223(uParam0, PLAYER::GET_PLAYER_WANTED_LEVEL(PLAYER::GET_PLAYER_INDEX()));
  					func_53(6, 0);
  				}
  				if (!func_220(uParam0))
  				{
  					if (!AUDIO::IS_SCRIPTED_CONVERSATION_ONGOING())
  					{
  						if (func_418(uParam0, 16) > 10f)
  						{
  							if (uParam0->f_410 != 22)
  							{
  								func_239(uParam0, 51, 1, 0, 0);
  							}
  						}
  					}
  				}
  				if (PLAYER::GET_PLAYER_WANTED_LEVEL(PLAYER::GET_PLAYER_INDEX()) < 1)
  				{
  					if (func_222("TAXI_OBJ_POL", 0, 0))
  					{
  						HUD::CLEAR_PRINTS();
  					}
  					if (HUD::DOES_BLIP_EXIST(uParam0->f_9))
  					{
  						HUD::SET_BLIP_ALPHA(uParam0->f_9, 255);
  						HUD::SET_BLIP_ROUTE(uParam0->f_9, true);
  					}
  					uParam0->f_140 = 0;
  					uParam0->f_412 = 4;
  				}
  				break;
  			
  			case 4:
  				if (!func_191())
  				{
  					if (uParam0->f_410 != 22)
  					{
  						func_239(uParam0, 53, 1, 0, 1);
  					}
  					func_53(7, func_221(uParam0));
  					func_223(uParam0, 0);
  					uParam0->f_412 = 5;
  				}
  				break;
  			
  			case 5:
  				if (!func_191())
  				{
  					func_183(uParam0, 9, 0);
  					func_308(uParam0, 11, 0, 0);
  					uParam0->f_412 = 0;
  				}
  				break;
  			}
  	}
  }
  
  bool func_220(var uParam0)
  {
  	return uParam0->f_110;
  }
  
  int func_221(var uParam0)
  {
  	return uParam0->f_106;
  }
  
  bool func_222(char* sParam0, int iParam1, char* sParam2)
  {
  	HUD::BEGIN_TEXT_COMMAND_IS_MESSAGE_DISPLAYED(sParam0);
  	if (iParam1 == 1)
  	{
  		HUD::ADD_TEXT_COMPONENT_SUBSTRING_TEXT_LABEL(sParam2);
  	}
  	return HUD::END_TEXT_COMMAND_IS_MESSAGE_DISPLAYED();
  }
  
  void func_223(var uParam0, int iParam1)
  {
  	if (uParam0->f_106 != iParam1)
  	{
  		uParam0->f_106 = iParam1;
  	}
  }
  
  void func_224(var uParam0)
  {
  	if (func_226(uParam0))
  	{
  		func_225(uParam0);
  	}
  }
  
  void func_225(var uParam0)
  {
  	if (AUDIO::IS_RADIO_RETUNING() && uParam0->f_418.f_4 != 0)
  	{
  		uParam0->f_418.f_4 = 0;
  	}
  	switch (uParam0->f_418.f_4)
  	{
  		case 0:
  			uParam0->f_418 = AUDIO::GET_PLAYER_RADIO_STATION_INDEX();
  			func_183(uParam0, 20, 0);
  			uParam0->f_418.f_4++;
  			break;
  		
  		case 1:
  			if (uParam0->f_418.f_8 && !uParam0->f_418 == uParam0->f_418.f_2)
  			{
  				if (func_418(uParam0, 20) > 3f)
  				{
  					func_239(uParam0, 87, 1, 0, 0);
  					uParam0->f_418.f_8 = 0;
  					uParam0->f_418.f_4++;
  				}
  			}
  			else if (uParam0->f_418 == uParam0->f_418.f_1)
  			{
  				if (!func_24(uParam0->f_81, 262144) || !func_24(uParam0->f_81, 1048576))
  				{
  					if (func_418(uParam0, 20) > 5f)
  					{
  						uParam0->f_418.f_5 = 1;
  						func_239(uParam0, 84, 1, 0, 0);
  						uParam0->f_418.f_4++;
  					}
  				}
  			}
  			else if (uParam0->f_418 == uParam0->f_418.f_2)
  			{
  				if (!func_24(uParam0->f_82, 67108864))
  				{
  					if (func_418(uParam0, 20) > 5f)
  					{
  						uParam0->f_418.f_6 = 1;
  						uParam0->f_418.f_8 = 0;
  						func_239(uParam0, 85, 1, 0, 0);
  						func_183(uParam0, 22, 0);
  						uParam0->f_418.f_4++;
  					}
  				}
  			}
  			else if (uParam0->f_418.f_7)
  			{
  				if (func_418(uParam0, 20) > 8f)
  				{
  					func_239(uParam0, 86, 1, 0, 0);
  					uParam0->f_418.f_4++;
  				}
  			}
  			break;
  		
  		case 2:
  			if (func_24(uParam0->f_81, 262144) || func_24(uParam0->f_82, 67108864))
  			{
  				if (!func_177(uParam0, 22))
  				{
  					func_216(uParam0, 22);
  				}
  			}
  			if (func_177(uParam0, 22) && func_418(uParam0, 22) > 15f)
  			{
  				if (uParam0->f_418 == uParam0->f_418.f_1)
  				{
  					if (!func_24(uParam0->f_81, 1048576))
  					{
  						func_239(uParam0, 84, 1, 0, 0);
  						func_183(uParam0, 22, 0);
  					}
  				}
  				else if (uParam0->f_418 == uParam0->f_418.f_2)
  				{
  					if (!func_24(uParam0->f_82, 134217728))
  					{
  						func_239(uParam0, 85, 1, 0, 0);
  						func_183(uParam0, 22, 0);
  					}
  				}
  			}
  			break;
  	}
  }
  
  bool func_226(var uParam0)
  {
  	return uParam0->f_120;
  }
  
  void func_227(var uParam0, float* fParam1)
  {
  	STATS::STAT_GET_FLOAT(uParam0->f_428, fParam1, -1);
  	uParam0->f_41 = (*fParam1 - uParam0->f_42);
  }
  
  int func_228(var uParam0)
  {
  	if (VEHICLE::IS_VEHICLE_DRIVEABLE(uParam0->f_4, false))
  	{
  		if (!PED::IS_PED_INJURED(uParam0->f_3))
  		{
  			if (!PED::IS_PED_IN_VEHICLE(uParam0->f_3, uParam0->f_4, true) && !PED::IS_PED_GETTING_INTO_A_VEHICLE(uParam0->f_3))
  			{
  				func_341(uParam0, "Passenger left car.", 9);
  			}
  			else if (func_179(uParam0))
  			{
  				if (func_222("TAXI_OBJ_PICKUP", 0, 0))
  				{
  					HUD::CLEAR_THIS_PRINT("TAXI_OBJ_PICKUP");
  				}
  				if (CAM::IS_SCREEN_FADED_IN())
  				{
  					return 1;
  				}
  			}
  			else
  			{
  				if ((MISC::GET_GAME_TIMER() % 1000) < 50)
  				{
  				}
  				func_167(uParam0, 1);
  			}
  		}
  	}
  	return 0;
  }
  
  int func_229(var uParam0, float fParam1)
  {
  	if (func_64(uParam0) == 2)
  	{
  		if (ENTITY::IS_ENTITY_AT_COORD(uParam0->f_4, uParam0->f_17, (fParam1 + 1f), (fParam1 + 1f), 2f, !uParam0->f_140, true, 0))
  		{
  		}
  		if (((func_231(uParam0->f_4, uParam0->f_17, 1) <= (fParam1 + 1f) && PLAYER::GET_PLAYER_WANTED_LEVEL(PLAYER::GET_PLAYER_INDEX()) < 1) && func_230(1, 1, 1)) && VEHICLE::IS_VEHICLE_ON_ALL_WHEELS(uParam0->f_4))
  		{
  			return func_160(uParam0, 1, fParam1);
  		}
  	}
  	else if (((ENTITY::IS_ENTITY_AT_COORD(uParam0->f_4, uParam0->f_17, (fParam1 + 1f), (fParam1 + 1f), 2f, !uParam0->f_140, true, 0) && PLAYER::GET_PLAYER_WANTED_LEVEL(PLAYER::GET_PLAYER_INDEX()) < 1) && func_230(1, 1, 1)) && VEHICLE::IS_VEHICLE_ON_ALL_WHEELS(uParam0->f_4))
  	{
  		return func_160(uParam0, 1, fParam1);
  	}
  	return 0;
  }
  
  int func_230(bool bParam0, bool bParam1, bool bParam2)
  {
  	int iVar0;
  	
  	if (MISC::IS_MINIGAME_IN_PROGRESS())
  	{
  		return 0;
  	}
  	if (bParam0)
  	{
  		if (ENTITY::IS_ENTITY_DEAD(PLAYER::PLAYER_PED_ID(), false))
  		{
  			return 0;
  		}
  	}
  	iVar0 = 0;
  	if (PED::IS_PED_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID(), false))
  	{
  		if (!PED::IS_PED_SITTING_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID()))
  		{
  			return 0;
  		}
  		iVar0 = PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), false);
  		if (bParam0)
  		{
  			if (ENTITY::IS_ENTITY_DEAD(iVar0, false))
  			{
  				return 0;
  			}
  		}
  		if (bParam2)
  		{
  			if (!ENTITY::IS_ENTITY_DEAD(iVar0, false))
  			{
  				if (VEHICLE::GET_PED_IN_VEHICLE_SEAT(iVar0, -1, false) != PLAYER::PLAYER_PED_ID())
  				{
  					return 0;
  				}
  			}
  		}
  		if (!ENTITY::IS_ENTITY_DEAD(iVar0, false))
  		{
  			if (ENTITY::GET_ENTITY_UPRIGHT_VALUE(iVar0) < 0.95f || ENTITY::GET_ENTITY_UPRIGHT_VALUE(iVar0) > 1.011f)
  			{
  				return 0;
  			}
  		}
  	}
  	else if (bParam1)
  	{
  		return 0;
  	}
  	if (!PLAYER::IS_PLAYER_READY_FOR_CUTSCENE(PLAYER::PLAYER_ID()))
  	{
  		return 0;
  	}
  	if (!PLAYER::CAN_PLAYER_START_MISSION(PLAYER::PLAYER_ID()))
  	{
  		return 0;
  	}
  	return 1;
  }
  
  float func_231(int iParam0, struct<3> Param1, bool bParam4)
  {
  	struct<3> Var0;
  	
  	if (!ENTITY::IS_ENTITY_DEAD(iParam0, false))
  	{
  		Var0 = { ENTITY::GET_ENTITY_COORDS(iParam0, true) };
  	}
  	else
  	{
  		Var0 = { ENTITY::GET_ENTITY_COORDS(iParam0, false) };
  	}
  	return MISC::GET_DISTANCE_BETWEEN_COORDS(Var0, Param1, bParam4);
  }
  
  int func_232(var uParam0, int iParam1)
  {
  	if (!PED::IS_PED_INJURED(uParam0->f_3))
  	{
  		if (PED::IS_PED_IN_VEHICLE(uParam0->f_3, uParam0->f_4, false))
  		{
  			if (VEHICLE::IS_VEHICLE_SEAT_FREE(uParam0->f_4, iParam1, false))
  			{
  				if (TASK::GET_SCRIPT_TASK_STATUS(uParam0->f_3, 355471868) != 1)
  				{
  					TASK::TASK_SHUFFLE_TO_NEXT_VEHICLE_SEAT(uParam0->f_3, uParam0->f_4, 0);
  					return 1;
  				}
  			}
  		}
  	}
  	return 0;
  }
  
  int func_233(var uParam0, int iParam1)
  {
  	if (VEHICLE::IS_VEHICLE_DRIVEABLE(uParam0->f_4, false))
  	{
  		if (!PED::IS_PED_INJURED(uParam0->f_3))
  		{
  			if (PED::IS_PED_IN_VEHICLE(uParam0->f_3, uParam0->f_4, false))
  			{
  				if (!VEHICLE::IS_VEHICLE_SEAT_FREE(uParam0->f_4, iParam1, false))
  				{
  					return 1;
  				}
  			}
  		}
  	}
  	return 0;
  }
  
  void func_234(var uParam0)
  {
  	func_235(uParam0, 1000);
  	if (!ENTITY::IS_ENTITY_DEAD(uParam0->f_3, false) && !ENTITY::IS_ENTITY_DEAD(PLAYER::PLAYER_PED_ID(), false))
  	{
  		TASK::CLEAR_PED_TASKS_IMMEDIATELY(uParam0->f_3);
  		TASK::TASK_TURN_PED_TO_FACE_ENTITY(uParam0->f_3, PLAYER::PLAYER_PED_ID(), 0);
  	}
  	func_189();
  	func_180(uParam0);
  }
  
  void func_235(var uParam0, int iParam1)
  {
  	if (CAM::DOES_CAM_EXIST(*uParam0))
  	{
  		CAM::DESTROY_CAM(*uParam0, false);
  	}
  	if (iParam1 > 0)
  	{
  		CAM::RENDER_SCRIPT_CAMS(false, true, iParam1, true, false, 0);
  	}
  	else
  	{
  		CAM::RENDER_SCRIPT_CAMS(false, false, 3000, true, false, 0);
  	}
  }
  
  int func_236(var uParam0)
  {
  	if (ENTITY::DOES_ENTITY_EXIST(uParam0->f_4) && VEHICLE::IS_VEHICLE_DRIVEABLE(uParam0->f_4, false))
  	{
  		if ((((((((((((((((((((((((((((((((((((((((((((((((((((((((((ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("granger") || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("rebel")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("rebel2")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("sandking")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("sandking2")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("patriot")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("surfer")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("surfer2")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("mesa")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("rancherxl")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("tiptruck2")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("mixer")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("mixer2")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("rubble")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("scrap")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("tiptruck")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("armytanker")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("barracks")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("barracks2")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("pranger")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("ambulance")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("firetruk")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("policet")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("riot")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("sheriff2")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("stockade")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("stockade3")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("biff")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("hauler")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("packer")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("trash")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("benson")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("phantom")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("pounder")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("utillitruck")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("utillitruck2")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("utillitruck3")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("dloader")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("flatbed")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("tourbus")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("towtruck")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("towtruck2")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("camper")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("taco")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("boxville")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("boxville2")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("burrito")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("burrito2")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("burrito3")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("burrito4")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("gburrito")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("journey")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("mule")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("mule2")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("pony")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("rumpo")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("speedo")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("speedo2")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("youga"))
  		{
  			return 2;
  		}
  		else if ((((((((((((((((((((((ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("phoenix") || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("coquette")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("dune")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("cheetah")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("cogcabrio")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("jb700")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("monroe")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("ninef")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("ninef2")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("rapidgt")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("rapidgt2")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("stinger")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("stingergt")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("ztype")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("banshee")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("bullet")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("carbonizzare")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("comet2")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("entityxf")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("f620")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("infernus")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("surano")) || ENTITY::GET_ENTITY_MODEL(uParam0->f_4) == joaat("voltic"))
  		{
  			return 0;
  		}
  		else
  		{
  			return 1;
  		}
  	}
  	return 3;
  }
  
  void func_237()
  {
  	func_65(&(Local_410.f_55), 2);
  	func_65(&(Local_410.f_55), 4);
  	func_65(&(Local_410.f_55), 16);
  	func_65(&(Local_410.f_55), 64);
  	func_65(&(Local_410.f_55), 256);
  	func_65(&(Local_410.f_55), 512);
  	func_65(&(Local_410.f_55), 1024);
  	func_65(&(Local_410.f_55), 2048);
  	func_65(&(Local_410.f_55), 67108864);
  	func_65(&(Local_410.f_55), 134217728);
  	func_65(&(Local_410.f_55), 536870912);
  	func_65(&(Local_410.f_55), 268435456);
  	func_65(&(Local_410.f_55), 8192);
  	func_65(&(Local_410.f_55), 16384);
  	func_65(&(Local_410.f_55), 32768);
  	func_65(&(Local_410.f_55), 65536);
  	func_65(&(Local_410.f_55), 131072);
  	func_65(&(Local_410.f_55), 262144);
  	func_65(&(Local_410.f_55), 524288);
  	func_65(&(Local_410.f_55), 1048576);
  	func_65(&(Local_410.f_55), 2097152);
  	func_65(&(Local_410.f_100), 64);
  	func_65(&(Local_410.f_100), 2048);
  	func_65(&(Local_410.f_100), 128);
  	func_65(&(Local_410.f_100), 32);
  	func_65(&(Local_410.f_100), 256);
  	func_65(&(Local_410.f_100), 8);
  	func_65(&(Local_410.f_100), 1);
  	func_65(&(Local_410.f_100), 4096);
  	func_65(&(Local_410.f_100), 8192);
  	MISC::CLEAR_BIT(&uLocal_957, 2);
  	func_216(&Local_410, 7);
  }
  
  void func_238(var uParam0)
  {
  	PLAYER::CLEAR_PLAYER_HAS_DAMAGED_AT_LEAST_ONE_PED(PLAYER::PLAYER_ID());
  	PLAYER::SET_PLAYER_CONTROL(PLAYER::GET_PLAYER_INDEX(), true, 0);
  	func_235(uParam0, 1000);
  }
  
  void func_239(var uParam0, int iParam1, int iParam2, bool bParam3, bool bParam4)
  {
  	uParam0->f_416 = iParam1;
  	if (bParam4)
  	{
  		func_308(uParam0, 16, 4f, 0);
  		if (func_240(uParam0))
  		{
  			func_51();
  		}
  	}
  	func_273(uParam0, iParam2, bParam3);
  }
  
  int func_240(var uParam0)
  {
  	struct<3> Var0;
  	struct<6> Var6;
  	
  	StringCopy(&Var0, uParam0->f_143, 24);
  	if (func_191())
  	{
  		Var6 = { func_241() };
  		if (!MISC::IS_STRING_NULL_OR_EMPTY(&Var6))
  		{
  			StringConCat(&Var0, "_obj1", 24);
  			if (MISC::ARE_STRINGS_EQUAL(&Var6, &Var0))
  			{
  				return 1;
  			}
  			StringCopy(&Var0, uParam0->f_143, 24);
  			StringConCat(&Var0, "_gret1", 24);
  			func_188(&Var0);
  			if (MISC::ARE_STRINGS_EQUAL(&Var6, &Var0))
  			{
  				return 1;
  			}
  		}
  	}
  	return 0;
  }
  
  struct<6> func_241()
  {
  	struct<6> Var0;
  	
  	StringCopy(&Var0, "NULL", 24);
  	if (Global_21285 == 4)
  	{
  		return Global_20904;
  	}
  	return Var0;
  }
  
  int func_242(var uParam0)
  {
  	if (VEHICLE::IS_VEHICLE_DRIVEABLE(uParam0->f_4, false))
  	{
  		if (!PED::IS_PED_INJURED(uParam0->f_3))
  		{
  			if ((PED::IS_PED_GETTING_INTO_A_VEHICLE(uParam0->f_3) && (MISC::GET_GAME_TIMER() - iLocal_89) > 500) || PED::IS_PED_IN_VEHICLE(uParam0->f_3, uParam0->f_4, true))
  			{
  				return 1;
  			}
  		}
  	}
  	return 0;
  }
  
  int func_243(var uParam0, bool bParam1, float fParam2)
  {
  	int iVar0;
  	int iVar1;
  	int iVar2;
  	int iVar3;
  	float fVar4;
  	
  	if (VEHICLE::IS_VEHICLE_DRIVEABLE(uParam0->f_4, false))
  	{
  		if (!PED::IS_PED_IN_VEHICLE(uParam0->f_2, uParam0->f_4, false))
  		{
  			if ((MISC::GET_GAME_TIMER() % 1000) < 50)
  			{
  			}
  			func_167(uParam0, 1);
  			if (func_35())
  			{
  				PLAYER::SET_PLAYER_CONTROL(PLAYER::GET_PLAYER_INDEX(), true, 0);
  			}
  			if (TASK::GET_SCRIPT_TASK_STATUS(uParam0->f_3, 2106541073) == 1 || TASK::GET_SCRIPT_TASK_STATUS(uParam0->f_3, 2106541073) == 0)
  			{
  				TASK::CLEAR_PED_TASKS_IMMEDIATELY(uParam0->f_3);
  				uParam0->f_48 = 0;
  				iLocal_87 = 0;
  				TASK::TASK_TURN_PED_TO_FACE_ENTITY(uParam0->f_3, PLAYER::PLAYER_PED_ID(), 0);
  			}
  		}
  		else if (PLAYER::IS_PLAYER_WANTED_LEVEL_GREATER(PLAYER::GET_PLAYER_INDEX(), 0))
  		{
  			func_271(uParam0);
  			if (uParam0->f_48 > 1)
  			{
  				TASK::CLEAR_SEQUENCE_TASK(&iVar3);
  				TASK::OPEN_SEQUENCE_TASK(&iVar3);
  				TASK::TASK_FOLLOW_NAV_MESH_TO_COORD(0, uParam0->f_11, uParam0->f_6, 20000, 0.25f, false, 40000f);
  				TASK::TASK_TURN_PED_TO_FACE_ENTITY(0, uParam0->f_4, 0);
  				TASK::CLOSE_SEQUENCE_TASK(iVar3);
  				TASK::TASK_PERFORM_SEQUENCE(uParam0->f_3, iVar3);
  				uParam0->f_48 = 0;
  			}
  		}
  		else
  		{
  			if (func_177(uParam0, 14))
  			{
  				func_180(uParam0);
  				func_170(uParam0, 0);
  			}
  			if (func_177(uParam0, 9))
  			{
  				func_183(uParam0, 9, 0);
  				HUD::CLEAR_PRINTS();
  				if (HUD::DOES_BLIP_EXIST(uParam0->f_8))
  				{
  					HUD::SET_BLIP_ALPHA(uParam0->f_8, 255);
  					HUD::SET_BLIP_ROUTE(uParam0->f_8, true);
  				}
  			}
  			if (!ENTITY::IS_ENTITY_DEAD(uParam0->f_3, false))
  			{
  				fVar4 = ((ENTITY::GET_ENTITY_SPEED(uParam0->f_4) / 5f) + 4f);
  				if (uParam0->f_141 && func_270(uParam0, uParam0->f_3) > 300f)
  				{
  					func_341(uParam0, "Left Passenger", 8);
  				}
  				switch (uParam0->f_48)
  				{
  					case 0:
  						if (TASK::GET_SCRIPT_TASK_STATUS(uParam0->f_3, 242628503) != 1 || ((func_169(PLAYER::PLAYER_PED_ID(), uParam0->f_3, 1) < 20f && func_231(uParam0->f_3, uParam0->f_11, 1) <= 28f) && func_231(uParam0->f_4, uParam0->f_11, 1) <= 28f))
  						{
  							if (func_267(uParam0, fParam2))
  							{
  								uParam0->f_48++;
  							}
  						}
  						break;
  					
  					case 1:
  						if (func_266(uParam0, 0, 28f, fVar4, 4f))
  						{
  							uParam0->f_138 = 1;
  							if (bLocal_94)
  							{
  								uParam0->f_7 = func_265(uParam0->f_4, uParam0->f_3);
  								iVar0 = func_264(uParam0, &iVar1);
  								if (!ENTITY::IS_ENTITY_DEAD(iVar0, false))
  								{
  									if (iVar1 == uParam0->f_7)
  									{
  										if (uParam0->f_7 == 1)
  										{
  											iVar2 = 262144;
  										}
  										else if (uParam0->f_7 == 2)
  										{
  											iVar2 = 131072;
  										}
  										TASK::TASK_LEAVE_ANY_VEHICLE(iVar0, 0, iVar2);
  									}
  									else
  									{
  										TASK::TASK_LEAVE_ANY_VEHICLE(iVar0, 0, 0);
  									}
  								}
  								if (uParam0->f_411 == 0)
  								{
  									if (VEHICLE::IS_ENTRY_POINT_FOR_SEAT_CLEAR(uParam0->f_3, uParam0->f_4, 0, false, false))
  									{
  										if (uParam0->f_7 == 2)
  										{
  											uParam0->f_7 = 0;
  											if (!ENTITY::IS_ENTITY_DEAD(iVar0, false))
  											{
  												TASK::TASK_LEAVE_ANY_VEHICLE(iVar0, 0, 4096);
  											}
  										}
  									}
  								}
  							}
  							TASK::CLEAR_PED_TASKS(uParam0->f_3);
  							TASK::TASK_ENTER_VEHICLE(uParam0->f_3, uParam0->f_4, 20000, uParam0->f_7, uParam0->f_6, 1, 0);
  							uParam0->f_48++;
  						}
  						else
  						{
  							if (bParam1)
  							{
  								GRAPHICS::DRAW_DEBUG_SPHERE(ENTITY::GET_ENTITY_COORDS(uParam0->f_3, true), fVar4, 0, 0, 255, 150);
  							}
  							if (!func_218(uParam0))
  							{
  								TASK::CLEAR_PED_TASKS(uParam0->f_3);
  							}
  							else if (((TASK::GET_SCRIPT_TASK_STATUS(uParam0->f_3, 242628503) != 1 && TASK::GET_SCRIPT_TASK_STATUS(uParam0->f_3, 242628503) != 0) && TASK::GET_SCRIPT_TASK_STATUS(uParam0->f_3, 242628503) != 7) && func_270(uParam0, uParam0->f_3) > 8f)
  							{
  								TASK::CLEAR_SEQUENCE_TASK(&(uParam0->f_243));
  								TASK::OPEN_SEQUENCE_TASK(&(uParam0->f_243));
  								TASK::TASK_TURN_PED_TO_FACE_ENTITY(0, PLAYER::PLAYER_PED_ID(), 0);
  								if (uParam0->f_411 != 9)
  								{
  									TASK::TASK_PLAY_ANIM(0, "gestures@m@standing@casual", "gesture_nod_yes_hard", 8f, -8f, -1, 48, 0f, false, false, false);
  								}
  								else
  								{
  									TASK::TASK_PLAY_ANIM(0, "oddjobs@towingcome_here", "come_here_idle_c", 8f, -8f, -1, 48, 0f, false, false, false);
  								}
  								TASK::CLOSE_SEQUENCE_TASK(uParam0->f_243);
  								TASK::TASK_PERFORM_SEQUENCE(uParam0->f_3, uParam0->f_243);
  							}
  							if (ENTITY::IS_ENTITY_PLAYING_ANIM(uParam0->f_3, "oddjobs@towingcome_here", "come_here_idle_c", 3))
  							{
  								ENTITY::SET_ENTITY_ANIM_SPEED(uParam0->f_3, "oddjobs@towingcome_here", "come_here_idle_c", 1.75f);
  							}
  						}
  						break;
  					
  					case 2:
  						if (bLocal_94)
  						{
  							if (func_169(uParam0->f_4, uParam0->f_3, 1) < 3f)
  							{
  								if (!func_263(uParam0, 1))
  								{
  									TASK::CLEAR_PED_TASKS_IMMEDIATELY(uParam0->f_3);
  									func_341(uParam0, "You had a dead body in your back seat.", 5);
  								}
  								else if (!func_262(uParam0->f_4))
  								{
  									TASK::CLEAR_PED_TASKS_IMMEDIATELY(uParam0->f_3);
  									func_341(uParam0, "You had a dead body in your back seat.", 0);
  								}
  							}
  						}
  						func_260(uParam0);
  						if (func_270(uParam0, uParam0->f_3) < fVar4 || func_35())
  						{
  							if (PED::IS_PED_IN_VEHICLE(uParam0->f_2, uParam0->f_4, false))
  							{
  								if (func_245(uParam0))
  								{
  									func_244(uParam0);
  									iLocal_89 = MISC::GET_GAME_TIMER();
  									PED::SET_PED_CONFIG_FLAG(uParam0->f_3, 26, true);
  									func_183(uParam0, 5, 0);
  									HUD::CLEAR_GPS_FLAGS();
  									STATS::STAT_GET_FLOAT(uParam0->f_428, &(uParam0->f_42), -1);
  									PED::SET_PED_CAN_PLAY_AMBIENT_BASE_ANIMS(uParam0->f_3, false);
  									return 1;
  								}
  							}
  						}
  						else if (bParam1)
  						{
  							GRAPHICS::DRAW_DEBUG_SPHERE(ENTITY::GET_ENTITY_COORDS(uParam0->f_3, true), fVar4, 0, 0, 255, 150);
  						}
  						break;
  					}
  				}
  			}
  	}
  	return 0;
  }
  
  void func_244(var uParam0)
  {
  	if (HUD::DOES_BLIP_EXIST(uParam0->f_8))
  	{
  		HUD::SET_BLIP_ROUTE(uParam0->f_8, false);
  		HUD::REMOVE_BLIP(&(uParam0->f_8));
  	}
  }
  
  int func_245(var uParam0)
  {
  	struct<3> Var0;
  	struct<3> Var3;
  	struct<3> Var6;
  	int iVar9;
  	int iVar10;
  	int iVar11;
  	int iVar12;
  	struct<3> Var13;
  	
  	func_259("UPDATE_PASSENGER_ENTER_CUTSCENE", &(uParam0->f_78), 1000);
  	iVar12 = -1;
  	if (!ENTITY::IS_ENTITY_DEAD(uParam0->f_3, false) && !ENTITY::IS_ENTITY_DEAD(uParam0->f_4, false))
  	{
  		func_258();
  	}
  	if (bLocal_94)
  	{
  		iLocal_86 = 10;
  	}
  	if ((iLocal_86 < 7 && iLocal_86 > 0) && !bLocal_94)
  	{
  		if (func_256(iLocal_88))
  		{
  			iLocal_86 = 7;
  		}
  	}
  	switch (iLocal_86)
  	{
  		case 0:
  			if (func_160(uParam0, 0, 1084227584) && func_230(1, 1, 1))
  			{
  				if (func_263(uParam0, 1))
  				{
  					iLocal_88 = MISC::GET_GAME_TIMER();
  					SYSTEM::SETTIMERA(0);
  					iLocal_86 = 1;
  				}
  				else
  				{
  					func_341(uParam0, "You had a dead body in your back seat.", 5);
  				}
  			}
  			break;
  		
  		case 1:
  			if (SYSTEM::TIMERA() > 500)
  			{
  				uParam0->f_7 = func_265(uParam0->f_4, uParam0->f_3);
  				iVar9 = func_264(uParam0, &iVar10);
  				if (!ENTITY::IS_ENTITY_DEAD(iVar9, false))
  				{
  					if (iVar10 == uParam0->f_7)
  					{
  						if (uParam0->f_7 == 1)
  						{
  							iVar11 = 262144;
  						}
  						else
  						{
  							iVar11 = 131072;
  						}
  						TASK::TASK_LEAVE_ANY_VEHICLE(iVar9, 0, iVar11);
  					}
  					else
  					{
  						TASK::TASK_LEAVE_ANY_VEHICLE(iVar9, 0, 0);
  					}
  				}
  				if (uParam0->f_411 == 0)
  				{
  					if (VEHICLE::IS_ENTRY_POINT_FOR_SEAT_CLEAR(uParam0->f_3, uParam0->f_4, 0, false, false))
  					{
  						uParam0->f_7 = 0;
  						if (!ENTITY::IS_ENTITY_DEAD(iVar9, false))
  						{
  							TASK::TASK_LEAVE_ANY_VEHICLE(iVar9, 0, 4096);
  						}
  					}
  				}
  				iLocal_86 = 2;
  			}
  			break;
  		
  		case 2:
  			if (uParam0->f_7 == 0)
  			{
  				Var6 = { 1.5f, 0f, -0.6422f };
  				Var0 = { -1.4309f, 3.958f, 3.5037f };
  				Var3 = { 0.1017f, 1.3354f, -0.0925f };
  			}
  			else if (uParam0->f_7 == 2)
  			{
  				Var6 = { 1.5f, -1f, -0.6422f };
  				Var0 = { 1.4309f, 3.958f, 0.5037f };
  				Var3 = { 0.1017f, 1.3354f, -0.0925f };
  			}
  			else
  			{
  				Var6 = { -1.5f, -1f, -0.6422f };
  				Var0 = { -1.4823f, 4.2333f, 0.5939f };
  				Var3 = { -0.4718f, 1.4282f, 0.3619f };
  			}
  			iVar12 = func_255(&(uParam0->f_409), ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(uParam0->f_4, 0f, 2.2f, 0.275f), ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(uParam0->f_4, Var0), 1);
  			if (iVar12 == 1)
  			{
  				Var0.f_2 = (Var0.f_2 + 1.5f);
  				if (uParam0->f_7 == 2)
  				{
  					Var3 = { 0.7632f, 1.4884f, 0.4369f };
  				}
  			}
  			if (iVar12 != -1)
  			{
  				func_254(0, 0, 1);
  				MISC::CLEAR_AREA_OF_PEDS(ENTITY::GET_ENTITY_COORDS(uParam0->f_4, true), 3f, 0);
  				MISC::CLEAR_AREA_OF_OBJECTS(ENTITY::GET_ENTITY_COORDS(uParam0->f_4, true), 25f, 0);
  				HUD::CLEAR_HELP(true);
  				HUD::CLEAR_PRINTS();
  				func_252();
  				func_273(uParam0, 0, 0);
  				Var13 = { ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(uParam0->f_4, Var6) };
  				ENTITY::SET_ENTITY_COORDS(uParam0->f_3, Var13, true, false, false, true);
  				ENTITY::SET_ENTITY_HEADING(uParam0->f_3, func_250(uParam0));
  				func_249(uParam0, 1f, 1f, 1f, 0f, 0f, 0f, 1112014848);
  				CAM::SET_CAM_COORD(*uParam0, ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(uParam0->f_4, Var0));
  				CAM::POINT_CAM_AT_ENTITY(*uParam0, uParam0->f_4, Var3, true);
  				CAM::SET_CAM_ACTIVE(*uParam0, true);
  				CAM::RENDER_SCRIPT_CAMS(true, false, 3000, true, false, 0);
  				PED::FORCE_PED_AI_AND_ANIMATION_UPDATE(uParam0->f_3, false, false);
  				TASK::TASK_ENTER_VEHICLE(uParam0->f_3, uParam0->f_4, 20000, uParam0->f_7, uParam0->f_6, 3, 0);
  				iLocal_86 = 5;
  			}
  			break;
  		
  		case 5:
  			func_259("TAXI_PED_ENTER_CUT_WAIT", &(uParam0->f_78), 1000);
  			if (SYSTEM::TIMERA() > 3500)
  			{
  				iLocal_86 = 9;
  			}
  			break;
  		
  		case 6:
  			break;
  		
  		case 7:
  			if (!ENTITY::IS_ENTITY_DEAD(uParam0->f_3, false) && !ENTITY::IS_ENTITY_DEAD(uParam0->f_4, false))
  			{
  				if (!PED::IS_PED_IN_ANY_VEHICLE(uParam0->f_3, false))
  				{
  					PED::SET_PED_INTO_VEHICLE(uParam0->f_3, uParam0->f_4, uParam0->f_7);
  					VEHICLE::SET_VEHICLE_DOOR_SHUT(uParam0->f_4, func_248(uParam0->f_7), true);
  				}
  				CAM::RENDER_SCRIPT_CAMS(false, false, 3000, true, false, 0);
  				CAM::DESTROY_CAM(*uParam0, false);
  				CAM::DESTROY_CAM(uParam0->f_1, false);
  				CAM::SET_GAMEPLAY_CAM_RELATIVE_HEADING(0f);
  				CAM::SET_GAMEPLAY_CAM_RELATIVE_PITCH(0f, 1f);
  				CAM::DO_SCREEN_FADE_IN(800);
  				HUD::CLEAR_HELP(true);
  				HUD::CLEAR_PRINTS();
  				func_252();
  				func_273(uParam0, 0, 0);
  				iLocal_86 = 8;
  			}
  			break;
  		
  		case 8:
  			if (CAM::IS_SCREEN_FADED_IN() && !CAM::IS_SCREEN_FADING_IN())
  			{
  				func_246(1, 1, 1);
  				return 1;
  			}
  			break;
  		
  		case 9:
  			CAM::RENDER_SCRIPT_CAMS(false, false, 3000, true, false, 0);
  			CAM::DESTROY_CAM(*uParam0, false);
  			CAM::DESTROY_CAM(uParam0->f_1, false);
  			CAM::SET_GAMEPLAY_CAM_RELATIVE_HEADING(0f);
  			CAM::SET_GAMEPLAY_CAM_RELATIVE_PITCH(0f, 1f);
  			func_246(1, 1, 1);
  			return 1;
  			break;
  		
  		case 10:
  			if (!ENTITY::IS_ENTITY_DEAD(uParam0->f_3, false) && !ENTITY::IS_ENTITY_DEAD(uParam0->f_4, false))
  			{
  				if (PED::IS_PED_GETTING_INTO_A_VEHICLE(uParam0->f_3) || PED::IS_PED_IN_ANY_VEHICLE(uParam0->f_3, true))
  				{
  					return 1;
  				}
  				else if (TASK::GET_SCRIPT_TASK_STATUS(PLAYER::PLAYER_PED_ID(), -1794415470) != 1 && TASK::GET_SCRIPT_TASK_STATUS(PLAYER::PLAYER_PED_ID(), -1794415470) != 0)
  				{
  					TASK::TASK_ENTER_VEHICLE(uParam0->f_3, uParam0->f_4, 20000, uParam0->f_7, uParam0->f_6, 1, 0);
  				}
  			}
  			break;
  	}
  	return 0;
  }
  
  void func_246(bool bParam0, bool bParam1, int iParam2)
  {
  	if (bParam0)
  	{
  		PLAYER::SET_PLAYER_CONTROL(PLAYER::GET_PLAYER_INDEX(), true, 0);
  	}
  	CUTSCENE::_0xC61B86C9F61EB404(true);
  	func_25(0, 1, iParam2, 0, 0, 0, 0);
  	if (bParam1)
  	{
  		HUD::DISPLAY_RADAR(true);
  		HUD::DISPLAY_HUD(true);
  	}
  	func_247(23, 0);
  }
  
  void func_247(int iParam0, bool bParam1)
  {
  	if (bParam1)
  	{
  		MISC::SET_BIT(&Global_31753, iParam0);
  	}
  	else
  	{
  		MISC::CLEAR_BIT(&Global_31753, iParam0);
  	}
  }
  
  int func_248(int iParam0)
  {
  	switch (iParam0)
  	{
  		case 1:
  			return 2;
  		
  		case 2:
  			return 3;
  		
  		case 0:
  			return 1;
  		
  		case -1:
  			return 0;
  		
  		default:
  	}
  	return 2;
  }
  
  void func_249(var uParam0, struct<3> Param1, struct<3> Param4, float fParam7)
  {
  	if (!CAM::DOES_CAM_EXIST(*uParam0))
  	{
  		*uParam0 = CAM::CREATE_CAMERA_WITH_PARAMS(26379945, Param1, Param4, fParam7, false, 2);
  	}
  }
  
  float func_250(var uParam0)
  {
  	float fVar0;
  	struct<3> Var1;
  	
  	fVar0 = 0f;
  	Var1 = { func_43() };
  	if (uParam0->f_7 == 2)
  	{
  		Var1 = { ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(uParam0->f_4, 0.773f, -0.646f, -0.6422f) };
  	}
  	else
  	{
  		Var1 = { ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(uParam0->f_4, -0.773f, -0.646f, -0.6422f) };
  	}
  	fVar0 = func_251(ENTITY::GET_ENTITY_COORDS(uParam0->f_3, true), Var1);
  	return fVar0;
  }
  
  float func_251(struct<2> Param0, Vector3 vParam2, struct<2> Param3, var uParam5)
  {
  	return MISC::GET_HEADING_FROM_VECTOR_2D((Param3.f_0 - Param0.f_0), (Param3.f_1 - Param0.f_1));
  }
  
  void func_252()
  {
  	Global_20151 = 0;
  	func_253();
  }
  
  void func_253()
  {
  	if (AUDIO::IS_SCRIPTED_CONVERSATION_ONGOING())
  	{
  		AUDIO::RESTART_SCRIPTED_CONVERSATION();
  		Global_22296 = 0;
  		AUDIO::STOP_SCRIPTED_CONVERSATION(true);
  		Global_21285 = 6;
  		return;
  	}
  }
  
  void func_254(int iParam0, bool bParam1, int iParam2)
  {
  	PLAYER::SET_PLAYER_CONTROL(PLAYER::GET_PLAYER_INDEX(), false, iParam0);
  	if (!PED::IS_PED_INJURED(PLAYER::PLAYER_PED_ID()))
  	{
  		FIRE::STOP_FIRE_IN_RANGE(ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), true), 15f);
  	}
  	CUTSCENE::_0xC61B86C9F61EB404(bParam1);
  	func_44(0);
  	func_25(1, 1, iParam2, 0, 0, 0, 0);
  	HUD::DISPLAY_RADAR(false);
  	HUD::DISPLAY_HUD(false);
  	func_247(23, 1);
  }
  
  int func_255(var uParam0, struct<3> Param1, struct<3> Param4, bool bParam7)
  {
  	var uVar0;
  	var uVar3;
  	int iVar6;
  	var uVar7;
  	int iVar8;
  	
  	if (*uParam0 == 0)
  	{
  		*uParam0 = SHAPETEST::START_SHAPE_TEST_LOS_PROBE(Param1, Param4, 511, 0, 7);
  		if (bParam7)
  		{
  		}
  	}
  	else
  	{
  		iVar8 = SHAPETEST::GET_SHAPE_TEST_RESULT(*uParam0, &iVar6, &uVar0, &uVar3, &uVar7);
  		if (iVar8 == 2)
  		{
  			if (bParam7)
  			{
  			}
  			if (iVar6 == 0)
  			{
  				*uParam0 = 0;
  				return iVar6;
  			}
  			else
  			{
  				if (bParam7)
  				{
  				}
  				*uParam0 = 0;
  				return iVar6;
  			}
  		}
  		else if (iVar8 == 0)
  		{
  			if (bParam7)
  			{
  			}
  			*uParam0 = 0;
  		}
  	}
  	return -1;
  }
  
  int func_256(int iParam0)
  {
  	if (func_257() && MISC::GET_GAME_TIMER() >= iParam0 + 1000)
  	{
  		CAM::DO_SCREEN_FADE_OUT(500);
  		while (!CAM::IS_SCREEN_FADED_OUT())
  		{
  			SYSTEM::WAIT(0);
  		}
  		func_44(0);
  		func_189();
  		return 1;
  	}
  	return 0;
  }
  
  int func_257()
  {
  	if (HUD::IS_PAUSE_MENU_ACTIVE())
  	{
  		return 0;
  	}
  	if (PAD::IS_CONTROL_JUST_PRESSED(0, 18) || PAD::IS_CONTROL_JUST_PRESSED(2, 18))
  	{
  		return 1;
  	}
  	return 0;
  }
  
  void func_258()
  {
  	if (func_37())
  	{
  		MISC::TERMINATE_ALL_SCRIPTS_WITH_THIS_NAME("appInternet");
  	}
  	if (func_36())
  	{
  		MISC::TERMINATE_ALL_SCRIPTS_WITH_THIS_NAME("appCamera");
  	}
  	if (func_46(1))
  	{
  		func_44(0);
  	}
  }
  
  void func_259(char* sParam0, int iParam1, int iParam2)
  {
  	if (MISC::GET_GAME_TIMER() < (*iParam1 + iParam2))
  	{
  		return;
  	}
  	*iParam1 = MISC::GET_GAME_TIMER();
  }
  
  void func_260(var uParam0)
  {
  	int iVar0;
  	
  	if (VEHICLE::IS_VEHICLE_DRIVEABLE(uParam0->f_4, false))
  	{
  		if (!PED::IS_PED_INJURED(uParam0->f_3))
  		{
  			if (func_168(uParam0->f_3, 1) > 30f || func_261(uParam0))
  			{
  				if (TASK::GET_SCRIPT_TASK_STATUS(uParam0->f_3, -1794415470) == 1 || TASK::GET_SCRIPT_TASK_STATUS(uParam0->f_3, 242628503) == 1)
  				{
  					TASK::CLEAR_SEQUENCE_TASK(&iVar0);
  					TASK::OPEN_SEQUENCE_TASK(&iVar0);
  					TASK::TASK_TURN_PED_TO_FACE_ENTITY(0, uParam0->f_4, 0);
  					TASK::TASK_PLAY_ANIM(0, "misscommon@response", "screw_you", 8f, -8f, -1, 0, 0f, false, false, false);
  					TASK::TASK_FOLLOW_NAV_MESH_TO_COORD(0, uParam0->f_11, uParam0->f_6, 20000, 0.25f, false, 40000f);
  					TASK::CLOSE_SEQUENCE_TASK(iVar0);
  					TASK::TASK_PERFORM_SEQUENCE(uParam0->f_3, iVar0);
  					func_341(uParam0, "Player abandoned passenger on pickup.", 8);
  				}
  			}
  		}
  	}
  }
  
  int func_261(var uParam0)
  {
  	if ((ENTITY::GET_ENTITY_SPEED(uParam0->f_4) > 3f && func_418(uParam0, 5) > 15f) || ENTITY::IS_ENTITY_UPSIDEDOWN(uParam0->f_4))
  	{
  		return 1;
  	}
  	return 0;
  }
  
  int func_262(int iParam0)
  {
  	int iVar0;
  	int iVar1;
  	
  	iVar0 = 0;
  	if (!VEHICLE::IS_VEHICLE_TYRE_BURST(iParam0, 0, false))
  	{
  		iVar0++;
  	}
  	if (!VEHICLE::IS_VEHICLE_TYRE_BURST(iParam0, 1, false))
  	{
  		iVar0++;
  	}
  	if (!VEHICLE::IS_VEHICLE_TYRE_BURST(iParam0, 4, false))
  	{
  		iVar0++;
  	}
  	if (!VEHICLE::IS_VEHICLE_TYRE_BURST(iParam0, 5, false))
  	{
  		iVar0++;
  	}
  	if (iVar0 < 2)
  	{
  		return 0;
  	}
  	if (VEHICLE::IS_THIS_MODEL_A_CAR(ENTITY::GET_ENTITY_MODEL(iParam0)))
  	{
  		iVar1 = 0;
  		if (!VEHICLE::IS_VEHICLE_DOOR_DAMAGED(iParam0, 0))
  		{
  			iVar1++;
  		}
  		if (!VEHICLE::IS_VEHICLE_DOOR_DAMAGED(iParam0, 1))
  		{
  			iVar1++;
  		}
  		if (!VEHICLE::IS_VEHICLE_DOOR_DAMAGED(iParam0, 2))
  		{
  			iVar1++;
  		}
  		if (!VEHICLE::IS_VEHICLE_DOOR_DAMAGED(iParam0, 3))
  		{
  			iVar1++;
  		}
  		if (iVar1 < 2)
  		{
  			return 0;
  		}
  	}
  	return 1;
  }
  
  int func_263(var uParam0, bool bParam1)
  {
  	int iVar0[3];
  	int iVar4;
  	
  	if (VEHICLE::IS_VEHICLE_DRIVEABLE(uParam0->f_4, false))
  	{
  		iVar0[0] = VEHICLE::GET_PED_IN_VEHICLE_SEAT(uParam0->f_4, 1, false);
  		iVar0[1] = VEHICLE::GET_PED_IN_VEHICLE_SEAT(uParam0->f_4, 2, false);
  		iVar0[2] = VEHICLE::GET_PED_IN_VEHICLE_SEAT(uParam0->f_4, 0, false);
  		iVar4 = 0;
  		while (iVar4 < 3)
  		{
  			if (ENTITY::DOES_ENTITY_EXIST(iVar0[iVar4]))
  			{
  				if (ENTITY::IS_ENTITY_DEAD(iVar0[iVar4], false))
  				{
  					if (iVar4 == 0)
  					{
  						uParam0->f_7 = 1;
  						if (bParam1)
  						{
  						}
  					}
  					else if (iVar4 == 1)
  					{
  						uParam0->f_7 = 2;
  						if (bParam1)
  						{
  						}
  					}
  					else
  					{
  						uParam0->f_7 = 0;
  						if (bParam1)
  						{
  						}
  					}
  					if (bParam1)
  					{
  					}
  					return 0;
  				}
  			}
  			iVar4++;
  		}
  		if ((MISC::GET_GAME_TIMER() % 1000) < 50)
  		{
  		}
  	}
  	return 1;
  }
  
  int func_264(var uParam0, var uParam1)
  {
  	int iVar0;
  	
  	if (VEHICLE::IS_VEHICLE_DRIVEABLE(uParam0->f_4, false))
  	{
  		iVar0 = VEHICLE::GET_PED_IN_VEHICLE_SEAT(uParam0->f_4, 1, false);
  		if (ENTITY::DOES_ENTITY_EXIST(iVar0))
  		{
  			*uParam1 = 1;
  			return iVar0;
  		}
  		else
  		{
  			iVar0 = VEHICLE::GET_PED_IN_VEHICLE_SEAT(uParam0->f_4, 2, false);
  			if (ENTITY::DOES_ENTITY_EXIST(iVar0))
  			{
  				*uParam1 = 2;
  				return iVar0;
  			}
  			else
  			{
  				iVar0 = VEHICLE::GET_PED_IN_VEHICLE_SEAT(uParam0->f_4, 0, false);
  				if (ENTITY::DOES_ENTITY_EXIST(iVar0))
  				{
  					*uParam1 = 0;
  					return iVar0;
  				}
  			}
  		}
  	}
  	return 0;
  }
  
  int func_265(int iParam0, int iParam1)
  {
  	struct<3> Var0;
  	int iVar3;
  	int iVar4;
  	
  	iVar4 = VEHICLE::GET_VEHICLE_MAX_NUMBER_OF_PASSENGERS(iParam0);
  	Var0 = { ENTITY::GET_OFFSET_FROM_ENTITY_GIVEN_WORLD_COORDS(iParam0, ENTITY::GET_ENTITY_COORDS(iParam1, true)) };
  	if (ENTITY::GET_ENTITY_MODEL(iParam0) != joaat("vacca"))
  	{
  	}
  	if (ENTITY::GET_ENTITY_MODEL(iParam0) == joaat("sentinel2"))
  	{
  		iVar4 = 1;
  	}
  	if (iVar4 == 1)
  	{
  		iVar3 = 0;
  	}
  	else if (Var0.f_0 > 0f)
  	{
  		if (VEHICLE::IS_ENTRY_POINT_FOR_SEAT_CLEAR(iParam1, iParam0, 2, false, false))
  		{
  			iVar3 = 2;
  		}
  		else if (VEHICLE::IS_ENTRY_POINT_FOR_SEAT_CLEAR(iParam1, iParam0, 1, false, false))
  		{
  			iVar3 = 1;
  		}
  		else
  		{
  			iVar3 = -2;
  		}
  	}
  	else if (VEHICLE::IS_ENTRY_POINT_FOR_SEAT_CLEAR(iParam1, iParam0, 1, false, false))
  	{
  		iVar3 = 1;
  	}
  	else if (VEHICLE::IS_ENTRY_POINT_FOR_SEAT_CLEAR(iParam1, iParam0, 2, false, false))
  	{
  		iVar3 = 2;
  	}
  	else
  	{
  		iVar3 = -2;
  	}
  	return iVar3;
  }
  
  int func_266(var uParam0, int iParam1, float fParam2, float fParam3, float fParam4)
  {
  	if (!ENTITY::IS_ENTITY_DEAD(uParam0->f_3, false))
  	{
  		if (!ENTITY::IS_ENTITY_OCCLUDED(uParam0->f_3) && func_168(uParam0->f_3, 1) < fParam2)
  		{
  			if (!func_177(uParam0, 5))
  			{
  				func_308(uParam0, 5, 0, 0);
  			}
  		}
  		else if (func_177(uParam0, 5))
  		{
  			func_183(uParam0, 5, 0);
  		}
  		if (((func_418(uParam0, 5) > IntToFloat(iParam1) && ENTITY::GET_ENTITY_SPEED(uParam0->f_4) < fParam4) && !ENTITY::IS_ENTITY_OCCLUDED(uParam0->f_3)) || func_168(uParam0->f_3, 1) <= fParam3)
  		{
  			return 1;
  		}
  	}
  	return 0;
  }
  
  int func_267(var uParam0, float fParam1)
  {
  	struct<3> Var0;
  	struct<3> Var3;
  	struct<3> Var6;
  	var uVar9;
  	var uVar12;
  	int iVar15;
  	var uVar16;
  	int iVar17;
  	int iVar18;
  	
  	iVar18 = ENTITY::GET_ENTITY_BONE_INDEX_BY_NAME(uParam0->f_4, "windscreen");
  	if (iVar18 == -1)
  	{
  		iVar18 = ENTITY::GET_ENTITY_BONE_INDEX_BY_NAME(uParam0->f_4, "windscreen_f");
  	}
  	if (iVar18 != -1)
  	{
  		Var6 = { ENTITY::GET_WORLD_POSITION_OF_ENTITY_BONE(uParam0->f_4, iVar18) };
  		Var6 = { ENTITY::GET_OFFSET_FROM_ENTITY_GIVEN_WORLD_COORDS(uParam0->f_4, Var6) };
  		Var6.f_1 = (Var6.f_1 + 1f);
  	}
  	else
  	{
  		Var6 = { 0f, 1f, 1f };
  	}
  	Var0 = { ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(uParam0->f_4, Var6) };
  	Var3 = { ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(uParam0->f_3, 0f, 0.25f, 0.9f) };
  	GRAPHICS::DRAW_DEBUG_LINE(Var0, Var3, 0, 0, 255, 255);
  	switch (iLocal_87)
  	{
  		case 0:
  			PED::SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(uParam0->f_3, true);
  			iLocal_87 = 1;
  			break;
  		
  		case 1:
  			if ((func_169(uParam0->f_4, uParam0->f_3, 0) <= fParam1 && !uParam0->f_142) && MISC::ABSF((Var0.f_2 - Var3.f_2)) < 5f)
  			{
  				if (uParam0->f_409 == 0)
  				{
  					uParam0->f_409 = SHAPETEST::START_SHAPE_TEST_LOS_PROBE(Var0, Var3, 511, 0, 7);
  				}
  				else
  				{
  					iVar17 = SHAPETEST::GET_SHAPE_TEST_RESULT(uParam0->f_409, &iVar15, &uVar9, &uVar12, &uVar16);
  					if (iVar17 == 2)
  					{
  						if (iVar15 == 0)
  						{
  							iLocal_87 = 2;
  						}
  						uParam0->f_409 = 0;
  					}
  					else if (iVar17 == 0)
  					{
  						uParam0->f_409 = 0;
  					}
  				}
  			}
  			else if (TASK::GET_SCRIPT_TASK_STATUS(uParam0->f_3, 242628503) != 1 && TASK::GET_SCRIPT_TASK_STATUS(uParam0->f_3, 242628503) != 0)
  			{
  				TASK::CLEAR_SEQUENCE_TASK(&(uParam0->f_243));
  				TASK::OPEN_SEQUENCE_TASK(&(uParam0->f_243));
  				TASK::TASK_PLAY_ANIM(0, "oddjobs@taxi@", "idle_a", 8f, -8f, -1, 0, 0f, false, false, false);
  				TASK::TASK_TURN_PED_TO_FACE_ENTITY(0, PLAYER::PLAYER_PED_ID(), 0);
  				TASK::SET_SEQUENCE_TO_REPEAT(uParam0->f_243, true);
  				TASK::CLOSE_SEQUENCE_TASK(uParam0->f_243);
  				TASK::TASK_PERFORM_SEQUENCE(uParam0->f_3, uParam0->f_243);
  			}
  			break;
  		
  		case 2:
  			HUD::CLEAR_PRINTS();
  			if (uParam0->f_411 != 9)
  			{
  				if (!func_24(uParam0->f_44, 128))
  				{
  					func_239(uParam0, 4, 1, 0, 1);
  				}
  			}
  			else
  			{
  				func_268(uParam0->f_3, "TAXI_HAIL", uParam0->f_145, 4);
  			}
  			TASK::CLEAR_PED_TASKS(uParam0->f_3);
  			TASK::TASK_LOOK_AT_ENTITY(uParam0->f_3, uParam0->f_4, -1, 2048, 4);
  			TASK::CLEAR_SEQUENCE_TASK(&(uParam0->f_243));
  			TASK::OPEN_SEQUENCE_TASK(&(uParam0->f_243));
  			if (uParam0->f_411 != 9)
  			{
  				TASK::TASK_PLAY_ANIM(0, "gestures@m@standing@casual", "gesture_nod_yes_hard", 8f, -8f, -1, 48, 0f, false, false, false);
  			}
  			else
  			{
  				TASK::TASK_PLAY_ANIM(0, "oddjobs@towingcome_here", "come_here_idle_c", 8f, -1.5f, -1, 48, 0f, false, false, false);
  			}
  			TASK::TASK_TURN_PED_TO_FACE_ENTITY(0, PLAYER::PLAYER_PED_ID(), 0);
  			TASK::CLOSE_SEQUENCE_TASK(uParam0->f_243);
  			TASK::TASK_PERFORM_SEQUENCE(uParam0->f_3, uParam0->f_243);
  			TASK::CLEAR_SEQUENCE_TASK(&(uParam0->f_243));
  			iLocal_87 = 3;
  			break;
  		
  		case 3:
  			iLocal_87 = 0;
  			if (ENTITY::IS_ENTITY_PLAYING_ANIM(uParam0->f_3, "gestures@m@standing@casual", "gesture_you_hard", 3))
  			{
  				ENTITY::SET_ENTITY_ANIM_SPEED(uParam0->f_3, "gestures@m@standing@casual", "gesture_you_hard", 0.8f);
  			}
  			return 1;
  			break;
  	}
  	return 0;
  }
  
  void func_268(int iParam0, char* sParam1, char* sParam2, int iParam3)
  {
  	AUDIO::PLAY_PED_AMBIENT_SPEECH_WITH_VOICE_NATIVE(iParam0, sParam1, sParam2, func_269(iParam3), false);
  }
  
  int func_269(int iParam0)
  {
  	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;
  }
  
  float func_270(var uParam0, int iParam1)
  {
  	if (!ENTITY::IS_ENTITY_DEAD(iParam1, false))
  	{
  		if (func_218(uParam0))
  		{
  			return func_169(uParam0->f_4, iParam1, 1);
  		}
  	}
  	return 0f;
  }
  
  void func_271(var uParam0)
  {
  	func_178(uParam0, uParam0->f_3);
  	if (func_218(uParam0))
  	{
  		if (func_177(uParam0, 14))
  		{
  			func_180(uParam0);
  			if (HUD::DOES_BLIP_EXIST(uParam0->f_10))
  			{
  				HUD::REMOVE_BLIP(&(uParam0->f_10));
  			}
  		}
  	}
  	if (!func_177(uParam0, 9))
  	{
  		if (HUD::DOES_BLIP_EXIST(uParam0->f_8))
  		{
  			HUD::SET_BLIP_ALPHA(uParam0->f_8, 0);
  			HUD::SET_BLIP_ROUTE(uParam0->f_8, false);
  		}
  		func_308(uParam0, 9, 0, 0);
  		func_272("TAXI_OBJ_POL", 7500, 1);
  	}
  }
  
  void func_272(char* sParam0, int iParam1, int iParam2)
  {
  	iParam2 = iParam2;
  	HUD::BEGIN_TEXT_COMMAND_PRINT(sParam0);
  	HUD::END_TEXT_COMMAND_PRINT(iParam1, true);
  }
  
  void func_273(var uParam0, int iParam1, bool bParam2)
  {
  	uParam0->f_110 = iParam1;
  	if (bParam2)
  	{
  		func_51();
  		func_308(uParam0, 16, 4f, 0);
  		HUD::CLEAR_PRINTS();
  	}
  }
  
  int func_274(var uParam0, int iParam1)
  {
  	if (!HUD::HAS_ADDITIONAL_TEXT_LOADED(2))
  	{
  		return 0;
  	}
  	func_278(12);
  	if (func_24(uParam0->f_44, 8))
  	{
  		if (!func_24(uParam0->f_44, 128))
  		{
  			if (PED::IS_PED_JACKING(PLAYER::PLAYER_PED_ID()) && !func_24(uParam0->f_44, 256))
  			{
  				func_65(&(uParam0->f_44), 256);
  			}
  			if (func_24(uParam0->f_44, 256) && PED::IS_PED_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID(), false))
  			{
  				func_239(uParam0, 135, 1, 0, 1);
  				func_65(&(uParam0->f_44), 128);
  			}
  		}
  	}
  	if (!func_277(uParam0, iParam1))
  	{
  		if (func_168(uParam0->f_3, 1) < 35f)
  		{
  			if (!func_24(uParam0->f_44, 8))
  			{
  				TASK::TASK_TURN_PED_TO_FACE_ENTITY(uParam0->f_3, PLAYER::PLAYER_PED_ID(), 0);
  				func_239(uParam0, 133, 1, 0, 1);
  				func_65(&(uParam0->f_44), 8);
  			}
  		}
  		if ((PED::IS_PED_INJURED(uParam0->f_3) || PED::IS_PED_FLEEING(uParam0->f_3)) || func_168(uParam0->f_3, 1) > 400f)
  		{
  			func_341(uParam0, "ped is fleeing or injured", 5);
  		}
  	}
  	else
  	{
  		uParam0->f_4 = PED::GET_VEHICLE_PED_IS_IN(uParam0->f_2, false);
  		VEHICLE::SET_VEHICLE_HAS_STRONG_AXLES(uParam0->f_4, true);
  		if (VEHICLE::GET_PED_IN_VEHICLE_SEAT(uParam0->f_4, -1, false) == uParam0->f_2)
  		{
  			VEHICLE::ADD_VEHICLE_UPSIDEDOWN_CHECK(uParam0->f_4);
  			func_275(uParam0);
  			func_53(2, 0);
  			bLocal_94 = true;
  			func_217(&iLocal_90);
  			return 1;
  		}
  		else
  		{
  			func_341(uParam0, "No Taxi", 21);
  			func_128("TAXI_DBG_NTAXI", -1);
  		}
  	}
  	return 0;
  }
  
  void func_275(var uParam0)
  {
  	if (!ENTITY::IS_ENTITY_DEAD(uParam0->f_4, false))
  	{
  		if (func_276())
  		{
  		}
  	}
  }
  
  int func_276()
  {
  	if (MISC::IS_BIT_SET(MISC::GET_RANDOM_INT_IN_RANGE(0, 65535), 0))
  	{
  		return 1;
  	}
  	return 0;
  }
  
  int func_277(var uParam0, int iParam1)
  {
  	int iVar0;
  	int iVar1;
  	bool bVar2;
  	bool bVar3;
  	bool bVar4;
  	bool bVar5;
  	
  	if (!ENTITY::IS_ENTITY_DEAD(PLAYER::PLAYER_PED_ID(), false))
  	{
  		if (PED::IS_PED_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID(), false))
  		{
  			iVar0 = PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), false);
  			if (VEHICLE::IS_VEHICLE_DRIVEABLE(iVar0, false))
  			{
  				iVar1 = ENTITY::GET_ENTITY_MODEL(iVar0);
  				bVar2 = func_262(iVar0);
  				bVar3 = true;
  				if (((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((iVar1 == joaat("rhino") || iVar1 == joaat("ratloader")) || iVar1 == joaat("surfer")) || iVar1 == joaat("surfer2")) || iVar1 == joaat("armytanker")) || iVar1 == joaat("barracks")) || iVar1 == joaat("barracks2")) || iVar1 == joaat("crusader")) || iVar1 == joaat("utillitruck")) || iVar1 == joaat("utillitruck2")) || iVar1 == joaat("utillitruck3")) || iVar1 == joaat("airtug")) || iVar1 == joaat("caddy")) || iVar1 == joaat("caddy2")) || iVar1 == joaat("dloader")) || iVar1 == joaat("docktug")) || iVar1 == joaat("flatbed")) || iVar1 == joaat("ripley")) || iVar1 == joaat("romero")) || iVar1 == joaat("towtruck")) || iVar1 == joaat("towtruck2")) || iVar1 == joaat("airbus")) || iVar1 == joaat("bus")) || iVar1 == joaat("coach")) || iVar1 == joaat("rentalbus")) || iVar1 == joaat("tourbus")) || iVar1 == joaat("riot")) || iVar1 == joaat("trash")) || iVar1 == joaat("benson")) || iVar1 == joaat("biff")) || iVar1 == joaat("hauler")) || iVar1 == joaat("packer")) || iVar1 == joaat("phantom")) || iVar1 == joaat("pounder")) || iVar1 == joaat("bulldozer")) || iVar1 == joaat("handler")) || iVar1 == joaat("tiptruck2")) || iVar1 == joaat("cutter")) || iVar1 == joaat("dump")) || iVar1 == joaat("mixer")) || iVar1 == joaat("mixer2")) || iVar1 == joaat("rubble")) || iVar1 == joaat("scrap")) || iVar1 == joaat("tiptruck")) || iVar1 == joaat("camper")) || iVar1 == joaat("taco")) || iVar1 == joaat("boxville")) || iVar1 == joaat("boxville2")) || iVar1 == joaat("boxville3")) || iVar1 == joaat("burrito")) || iVar1 == joaat("burrito2")) || iVar1 == joaat("burrito3")) || iVar1 == joaat("burrito4")) || iVar1 == joaat("gburrito")) || iVar1 == joaat("journey")) || iVar1 == joaat("mule")) || iVar1 == joaat("mule2")) || iVar1 == joaat("pony")) || iVar1 == joaat("rumpo")) || iVar1 == joaat("rumpo2")) || iVar1 == joaat("speedo")) || iVar1 == joaat("speedo2")) || iVar1 == joaat("youga")) || iVar1 == joaat("mower")) || iVar1 == joaat("tractor")) || iVar1 == joaat("tractor2")) || iVar1 == joaat("fbi")) || iVar1 == joaat("fbi2")) || iVar1 == joaat("pranger")) || iVar1 == joaat("ambulance")) || iVar1 == joaat("dilettante2")) || iVar1 == joaat("firetruk")) || iVar1 == joaat("lguard")) || iVar1 == joaat("dune")) || iVar1 == joaat("pbus")) || iVar1 == joaat("police")) || iVar1 == joaat("police2")) || iVar1 == joaat("police3")) || iVar1 == joaat("police4")) || iVar1 == joaat("policeb")) || iVar1 == joaat("policet")) || iVar1 == joaat("sheriff")) || iVar1 == joaat("sheriff2")) || iVar1 == joaat("stockade"))
  				{
  					bVar3 = false;
  				}
  				if (uParam0->f_411 == 7)
  				{
  					if (iVar1 == joaat("bodhi2"))
  					{
  						bVar3 = false;
  					}
  				}
  				bVar4 = false;
  				if (VEHICLE::IS_THIS_MODEL_A_CAR(iVar1))
  				{
  					if (VEHICLE::GET_PED_IN_VEHICLE_SEAT(iVar0, -1, false) == PLAYER::PLAYER_PED_ID())
  					{
  						bVar4 = true;
  					}
  				}
  				bVar5 = true;
  				if (VEHICLE::GET_VEHICLE_MAX_NUMBER_OF_PASSENGERS(iVar0) < iParam1)
  				{
  					bVar5 = false;
  				}
  				if (!bVar2)
  				{
  					if (!func_24(uParam0->f_44, 64))
  					{
  						if (HUD::HAS_ADDITIONAL_TEXT_LOADED(2))
  						{
  							func_128("TX_VIP_DMGD", -1);
  							if (func_119("TX_VIP_DMGD"))
  							{
  								func_65(&(uParam0->f_44), 64);
  							}
  						}
  					}
  					return 0;
  				}
  				else if (!bVar4 || !bVar3)
  				{
  					if (!func_24(uParam0->f_44, 32))
  					{
  						if (HUD::HAS_ADDITIONAL_TEXT_LOADED(2))
  						{
  							func_128("TX_VIP_CAR", -1);
  							if (func_119("TX_VIP_CAR"))
  							{
  								func_65(&(uParam0->f_44), 32);
  							}
  						}
  					}
  					return 0;
  				}
  				else if (!bVar5)
  				{
  					if (!func_24(uParam0->f_44, 16))
  					{
  						if (HUD::HAS_ADDITIONAL_TEXT_LOADED(2))
  						{
  							func_128("TX_VIP_SMALL", -1);
  							if (func_119("TX_VIP_SMALL"))
  							{
  								func_65(&(uParam0->f_44), 16);
  							}
  						}
  					}
  					return 0;
  				}
  				return 1;
  			}
  		}
  		else
  		{
  			func_22(&(uParam0->f_44), 16);
  			func_22(&(uParam0->f_44), 64);
  			func_22(&(uParam0->f_44), 32);
  		}
  	}
  	return 0;
  }
  
  void func_278(int iParam0)
  {
  	var uVar0;
  	char cVar1[24];
  	
  	if (MISC::IS_XBOX360_VERSION() || MISC::IS_DURANGO_VERSION())
  	{
  		uVar0 = iParam0;
  		NETWORK::NETWORK_SET_RICH_PRESENCE(8, &uVar0, 1, 1);
  	}
  	else if (MISC::IS_PS3_VERSION() || MISC::IS_ORBIS_VERSION())
  	{
  		StringCopy(&cVar1, "SPMG_", 24);
  		StringIntConCat(&cVar1, iParam0, 24);
  		StringConCat(&cVar1, "_STR", 24);
  		NETWORK::NETWORK_SET_RICH_PRESENCE_STRING(8, &cVar1);
  	}
  }
  
  void func_279(var uParam0)
  {
  	int iVar0;
  	
  	iVar0 = 0;
  	while (iVar0 < 15)
  	{
  		func_23(&(uParam0->f_100), iVar0);
  		iVar0++;
  	}
  }
  
  void func_280()
  {
  	Local_343.f_0 = 0;
  	func_297(42150, 42125, 1);
  	func_297(41886, 41863, 1);
  	func_297(41801, 41776, 1);
  	func_297(41704, 41680, 1);
  	func_297(41570, 41549, 1);
  	func_297(41496, 41471, 1);
  	func_297(41329, 41306, 1);
  }
  
  int func_281(var uParam0, var uParam1)
  {
  	uParam1 = uParam1;
  	func_341(uParam0, "Taxi Not Driveable", 1);
  	return 1;
  }
  
  int func_282(var uParam0)
  {
  	if (ENTITY::DOES_ENTITY_EXIST(uParam0->f_4))
  	{
  		if (func_284(uParam0->f_4))
  		{
  			func_283(uParam0, 1);
  			return 1;
  		}
  	}
  	return 0;
  }
  
  void func_283(var uParam0, int iParam1)
  {
  	uParam0->f_117 = 1;
  	uParam0->f_118 = iParam1;
  }
  
  int func_284(int iParam0)
  {
  	if (!VEHICLE::IS_VEHICLE_DRIVEABLE(iParam0, false))
  	{
  		return 1;
  	}
  	if (VEHICLE::GET_VEHICLE_ENGINE_HEALTH(iParam0) < -100f)
  	{
  		return 1;
  	}
  	else if (VEHICLE::IS_VEHICLE_STUCK_TIMER_UP(iParam0, 0, 40000) || VEHICLE::IS_VEHICLE_STUCK_TIMER_UP(iParam0, 1, 40000))
  	{
  		return 1;
  	}
  	return 0;
  }
  
  int func_285(var uParam0, var uParam1)
  {
  	uParam1 = uParam1;
  	func_341(uParam0, "Didn't lose police in time.", 9);
  	return 1;
  }
  
  int func_286(var uParam0)
  {
  	if (PLAYER::GET_PLAYER_WANTED_LEVEL(PLAYER::PLAYER_ID()) > 0)
  	{
  		if (func_287(uParam0->f_85, 32))
  		{
  			return 1;
  		}
  	}
  	return 0;
  }
  
  bool func_287(var uParam0, int iParam1)
  {
  	return (uParam0 && iParam1) != 0;
  }
  
  int func_288(var uParam0, var uParam1)
  {
  	uParam1 = uParam1;
  	func_283(uParam0, 11);
  	return 1;
  }
  
  int func_289(var uParam0)
  {
  	if (ENTITY::DOES_ENTITY_EXIST(uParam0->f_4))
  	{
  		if (ENTITY::IS_ENTITY_IN_WATER(uParam0->f_4) && !VEHICLE::IS_VEHICLE_ON_ALL_WHEELS(uParam0->f_4))
  		{
  			if (!func_177(uParam0, 25))
  			{
  				func_308(uParam0, 25, 0, 0);
  			}
  			else if (func_418(uParam0, 25) > 2f)
  			{
  				return 1;
  			}
  		}
  		else if (func_177(uParam0, 25))
  		{
  			func_183(uParam0, 25, 0);
  		}
  	}
  	return 0;
  }
  
  int func_290(var uParam0, var uParam1)
  {
  	uParam1 = uParam1;
  	func_341(uParam0, "Taxi Is Flipped", 0);
  	return 1;
  }
  
  int func_291(var uParam0)
  {
  	if (!ENTITY::IS_ENTITY_DEAD(uParam0->f_4, false))
  	{
  		if (VEHICLE::DOES_VEHICLE_HAVE_STUCK_VEHICLE_CHECK(uParam0->f_4))
  		{
  			if (VEHICLE::IS_VEHICLE_STUCK_TIMER_UP(uParam0->f_4, 0, 40000) || VEHICLE::IS_VEHICLE_STUCK_TIMER_UP(uParam0->f_4, 1, 40000))
  			{
  				return 1;
  			}
  		}
  	}
  	return 0;
  }
  
  int func_292(var uParam0, var uParam1)
  {
  	uParam1 = uParam1;
  	func_341(uParam0, "Stayed stopped for too long.", 9);
  	return 1;
  }
  
  int func_293(var uParam0)
  {
  	if (!ENTITY::IS_ENTITY_DEAD(uParam0->f_4, false))
  	{
  		if (VEHICLE::IS_VEHICLE_DRIVEABLE(uParam0->f_4, false))
  		{
  			if (VEHICLE::IS_VEHICLE_STOPPED(uParam0->f_4))
  			{
  				if (func_287(uParam0->f_86, 8))
  				{
  					return 1;
  				}
  			}
  		}
  	}
  	return 0;
  }
  
  int func_294(var uParam0, var uParam1)
  {
  	uParam1 = uParam1;
  	func_341(uParam0, "Taxi Not Driveable", 0);
  	return 1;
  }
  
  int func_295(var uParam0)
  {
  	if (ENTITY::DOES_ENTITY_EXIST(uParam0->f_4))
  	{
  		if (func_296(uParam0->f_4))
  		{
  			func_283(uParam0, 0);
  			return 1;
  		}
  	}
  	return 0;
  }
  
  int func_296(int iParam0)
  {
  	if (!VEHICLE::IS_VEHICLE_DRIVEABLE(iParam0, false))
  	{
  		return 1;
  	}
  	if (VEHICLE::GET_VEHICLE_ENGINE_HEALTH(iParam0) == 0f)
  	{
  		if (!VEHICLE::IS_VEHICLE_DRIVEABLE(iParam0, false))
  		{
  		}
  		return 1;
  	}
  	else if (VEHICLE::IS_VEHICLE_STUCK_TIMER_UP(iParam0, 0, 40000) || VEHICLE::IS_VEHICLE_STUCK_TIMER_UP(iParam0, 1, 40000))
  	{
  		return 1;
  	}
  	return 0;
  }
  
  void func_297(int iParam0, int iParam1, bool bParam2)
  {
  	if (Local_343.f_0 >= 16)
  	{
  		Local_343.f_0 = 16;
  		return;
  	}
  	Local_343.f_1[Local_343.f_0 /*4*/] = 0;
  	func_66(&(Local_343.f_1[Local_343.f_0 /*4*/]), 1);
  	if (bParam2)
  	{
  		func_66(&(Local_343.f_1[Local_343.f_0 /*4*/]), 2);
  	}
  	Local_343.f_1[Local_343.f_0 /*4*/].f_2 = iParam0;
  	Local_343.f_1[Local_343.f_0 /*4*/].f_3 = iParam1;
  	Local_343.f_0++;
  }
  
  int func_298(var uParam0, var uParam1)
  {
  	uParam1 = uParam1;
  	func_341(uParam0, "Passenger injured.", 15);
  	return 1;
  }
  
  int func_299(var uParam0)
  {
  	if (ENTITY::DOES_ENTITY_EXIST(uParam0->f_3))
  	{
  		if ((PED::IS_PED_INJURED(uParam0->f_3) || ENTITY::IS_ENTITY_DEAD(uParam0->f_3, false)) || FIRE::IS_ENTITY_ON_FIRE(uParam0->f_3))
  		{
  			return 1;
  		}
  	}
  	return 0;
  }
  
  void func_300()
  {
  	Local_190[5 /*10*/] = 5;
  	Local_190[5 /*10*/].f_1 = 0;
  	Local_190[5 /*10*/].f_2 = "TX_SPEED_N";
  	Local_190[5 /*10*/].f_9 = 78;
  	Local_190[0 /*10*/] = 5;
  	Local_190[0 /*10*/].f_1 = 0;
  	Local_190[0 /*10*/].f_2 = "TX_AIR_N";
  	Local_190[0 /*10*/].f_9 = 76;
  	Local_190[2 /*10*/] = 5;
  	Local_190[2 /*10*/].f_1 = 0;
  	Local_190[2 /*10*/].f_2 = "TX_QSTOP_N";
  	Local_190[2 /*10*/].f_9 = 21;
  	Local_190[1 /*10*/] = 10;
  	Local_190[1 /*10*/].f_1 = 0;
  	Local_190[1 /*10*/].f_2 = "TX_DRIFT_N";
  	Local_190[1 /*10*/].f_9 = 71;
  	Local_190[4 /*10*/] = 10;
  	Local_190[4 /*10*/].f_1 = 0;
  	Local_190[4 /*10*/].f_2 = "TX_SIDEWALK_N";
  	Local_190[4 /*10*/].f_9 = 79;
  	Local_190[6 /*10*/] = 10;
  	Local_190[6 /*10*/].f_1 = 0;
  	Local_190[6 /*10*/].f_2 = "TX_ONCOMING_N";
  	Local_190[6 /*10*/].f_9 = 80;
  	Local_190[9 /*10*/] = 15;
  	Local_190[9 /*10*/].f_1 = 0;
  	Local_190[9 /*10*/].f_2 = "TX_HITRUN_N";
  	Local_190[9 /*10*/].f_9 = 82;
  	Local_190[8 /*10*/] = 15;
  	Local_190[8 /*10*/].f_1 = 0;
  	Local_190[8 /*10*/].f_2 = "TX_RECKLESS_N";
  	Local_190[8 /*10*/].f_9 = 72;
  	Local_190[7 /*10*/] = 15;
  	Local_190[7 /*10*/].f_1 = 0;
  	Local_190[7 /*10*/].f_2 = "TX_ROLL_N";
  	Local_190[7 /*10*/].f_9 = 74;
  	Local_190[11 /*10*/] = 5;
  	Local_190[11 /*10*/].f_1 = 0;
  	Local_190[11 /*10*/].f_2 = "TX_SWERVE_N";
  	Local_190[11 /*10*/].f_9 = 70;
  	Local_190[12 /*10*/] = 5;
  	Local_190[12 /*10*/].f_1 = 0;
  	Local_190[12 /*10*/].f_2 = "TX_REVERSE_N";
  	Local_190[12 /*10*/].f_9 = 69;
  	Local_190[13 /*10*/] = 10;
  	Local_190[13 /*10*/].f_1 = 0;
  	Local_190[13 /*10*/].f_2 = "TX_OFFROAD_N";
  	Local_190[13 /*10*/].f_9 = 67;
  	Local_190[14 /*10*/] = 10;
  	Local_190[14 /*10*/].f_1 = 0;
  	Local_190[14 /*10*/].f_2 = "TX_NEARMIS_N";
  	Local_190[14 /*10*/].f_9 = 75;
  }
  
  int func_301()
  {
  	if (!STREAMING::HAS_MODEL_LOADED(iLocal_852))
  	{
  		func_259("TAXI_ASSETS_STREAMED - Loading A_M_Y_SouCent_01", &iLocal_869, 1000);
  		return 0;
  	}
  	if (!GRAPHICS::HAS_SCALEFORM_MOVIE_LOADED(iLocal_964))
  	{
  		return 0;
  	}
  	if (!func_302(&iLocal_869, 1))
  	{
  		func_259("TAXI_ASSETS_STREAMED - Loading shared assets", &iLocal_869, 1000);
  		return 0;
  	}
  	return 1;
  }
  
  int func_302(int iParam0, bool bParam1)
  {
  	if (!STREAMING::HAS_MODEL_LOADED(func_21()))
  	{
  		func_259("TAXI_SHARED_ASSETS_STREAMED - TAXI MODEL Loading...", iParam0, 1000);
  		return 0;
  	}
  	if (bParam1)
  	{
  		if (!STREAMING::HAS_ANIM_DICT_LOADED("gestures@m@standing@casual"))
  		{
  			func_259("TAXI_SHARED_ASSETS_STREAMED - Anim Dicts gestures@m@standing@casual Loading...", iParam0, 1000);
  			return 0;
  		}
  	}
  	if (!STREAMING::HAS_ANIM_DICT_LOADED("oddjobs@taxi@"))
  	{
  		func_259("TAXI_SHARED_ASSETS_STREAMED - Anim Dicts oddjobs@taxi@ Loading...", iParam0, 1000);
  		return 0;
  	}
  	if (!STREAMING::HAS_ANIM_DICT_LOADED("oddjobs@towingcome_here"))
  	{
  		func_259("TAXI_SHARED_ASSETS_STREAMED - Anim Dicts oddjobs@towingcome_here Loading...", iParam0, 1000);
  		return 0;
  	}
  	if (!STREAMING::HAS_ANIM_DICT_LOADED("misscommon@response"))
  	{
  		func_259("TAXI_SHARED_ASSETS_STREAMED - Anim Dicts misscommon@ Loading...", iParam0, 1000);
  		return 0;
  	}
  	if (!HUD::HAS_ADDITIONAL_TEXT_LOADED(2))
  	{
  		func_259("TAXI_SHARED_ASSETS_STREAMED - Mission Text Loading...", iParam0, 1000);
  		return 0;
  	}
  	return 1;
  }
  
  void func_303(var uParam0, int iParam1)
  {
  	switch (iParam1)
  	{
  		case 1:
  			uParam0->f_123 = "TRS_STREAMING";
  			break;
  		
  		case 2:
  			uParam0->f_123 = " TRS_FINDING_LOCATION ";
  			break;
  		
  		case 3:
  			uParam0->f_123 = " TRS_SPAWNING ";
  			break;
  		
  		case 4:
  			uParam0->f_123 = " TRS_SPAWN_CAR ";
  			break;
  		
  		case 5:
  			uParam0->f_123 = " TRS_MANAGE_PICKUP ";
  			break;
  		
  		case 6:
  			uParam0->f_123 = " TRS_PASSENGER_ENTER ";
  			break;
  		
  		case 7:
  			uParam0->f_123 = " TRS_WAIT_FOR_TIME ";
  			break;
  		
  		case 8:
  			uParam0->f_123 = " TRS_WAIT_FOR_TAIL ";
  			break;
  		
  		case 9:
  			uParam0->f_123 = " TRS_DRIVING_PASSENGER ";
  			break;
  		
  		case 10:
  			uParam0->f_123 = " TRS_WAIT_FOR_FULL_STOP ";
  			break;
  		
  		case 18:
  			uParam0->f_123 = " TRS_PRE_CUTSCENE ";
  			break;
  		
  		case 11:
  			uParam0->f_123 = " TRS_SWITCH_JOB ";
  			break;
  		
  		case 19:
  			uParam0->f_123 = " TRS_CUTSCENE ";
  			break;
  		
  		case 20:
  			uParam0->f_123 = " TRS_CUTSCENE_02 ";
  			break;
  		
  		case 13:
  			uParam0->f_123 = " TRS_CHASE_DRIVER ";
  			break;
  		
  		case 12:
  			uParam0->f_123 = " TRS_SAVE_DAMSEL ";
  			break;
  		
  		case 14:
  			uParam0->f_123 = " TRS_REVEAL_DESTINATION ";
  			break;
  		
  		case 15:
  			uParam0->f_123 = " TRS_WAIT_PARK ";
  			break;
  		
  		case 16:
  			uParam0->f_123 = " TRS_SEND_TO_STORE ";
  			break;
  		
  		case 17:
  			uParam0->f_123 = " TRS_WAIT_1ST_STOP ";
  			break;
  		
  		case 22:
  			uParam0->f_123 = " TRS_DROPPING_OFF ";
  			break;
  		
  		case 25:
  			uParam0->f_123 = " TRS_ESCAPE_POLICE ";
  			break;
  		
  		case 26:
  			uParam0->f_123 = " TRS_POLICE_ESCAPED ";
  			break;
  		
  		case 24:
  			uParam0->f_123 = " TRS_TIE_UP_LOSE_ENDS ";
  			break;
  		
  		case 27:
  			uParam0->f_123 = " TRS_REGULAR_PAYMENT ";
  			break;
  		
  		case 23:
  			uParam0->f_123 = " TRS_ELIMATE_ALL_ENEMIES ";
  			break;
  		
  		case 28:
  			uParam0->f_123 = " TRS_SPECIAL_ENDING ";
  			break;
  		
  		case 29:
  			uParam0->f_123 = " TRS_SCORECARD_GRADE ";
  			break;
  		
  		case 30:
  			uParam0->f_123 = " TRS_CLEANUP ";
  			break;
  		
  		case 21:
  			uParam0->f_123 = " TRS_WAIT_FOR_PASSENGER ";
  			break;
  		
  		default:
  			uParam0->f_123 = " TRS IS UNIDENTIFIED - FIX THIS ";
  			break;
  	}
  	uParam0->f_410 = iParam1;
  }
  
  int func_304(var uParam0)
  {
  	if (!PED::IS_PED_INJURED(uParam0->f_3))
  	{
  		uParam0->f_8 = func_305(uParam0->f_3, 0, 0);
  		HUD::SET_GPS_FLAGS(1, 0f);
  		HUD::SET_BLIP_ROUTE(uParam0->f_8, true);
  		HUD::SET_BLIP_NAME_FROM_TEXT_FILE(uParam0->f_8, "TAXI_BLIP_PASS");
  		TASK::TASK_LOOK_AT_ENTITY(uParam0->f_3, PLAYER::PLAYER_PED_ID(), -1, 2048, 4);
  	}
  	return 1;
  }
  
  int func_305(int iParam0, bool bParam1, bool bParam2)
  {
  	return func_151(iParam0, !bParam1, bParam2);
  }
  
  int func_306(var uParam0, struct<3> Param1, struct<3> Param4, char* sParam7, int iParam8, float fParam9, float fParam10)
  {
  	if (!ENTITY::DOES_ENTITY_EXIST(uParam0->f_3))
  	{
  		func_307(uParam0, uParam0->f_14);
  		uParam0->f_11 = { Param1 };
  		uParam0->f_14 = { Param4 };
  		func_41(uParam0->f_14, 0);
  		MISC::CLEAR_AREA_OF_PEDS(uParam0->f_14, 2f, 0);
  		func_39(uParam0->f_14, 0, fParam10);
  		if (iParam8 == 0)
  		{
  			uParam0->f_3 = PED::CREATE_RANDOM_PED(uParam0->f_11);
  		}
  		else if (ENTITY::DOES_ENTITY_EXIST(Global_111625.f_225[0]))
  		{
  			uParam0->f_3 = Global_111625.f_225[0];
  			ENTITY::SET_ENTITY_AS_MISSION_ENTITY(uParam0->f_3, true, true);
  		}
  		else
  		{
  			uParam0->f_3 = PED::CREATE_PED(26, iParam8, uParam0->f_11, fParam9, true, true);
  		}
  		func_8(&(uParam0->f_244), 3, uParam0->f_3, sParam7, 0, 1);
  		AUDIO::SET_AMBIENT_VOICE_NAME(uParam0->f_3, sParam7);
  		PED::SET_PED_RESET_FLAG(uParam0->f_3, 112, true);
  		if (!PED::IS_PED_INJURED(uParam0->f_3))
  		{
  			ENTITY::SET_ENTITY_LOD_DIST(uParam0->f_3, 250);
  			PED::SET_PED_CONFIG_FLAG(uParam0->f_3, 32, false);
  			PED::SET_PED_CONFIG_FLAG(uParam0->f_3, 104, true);
  			PED::SET_PED_CONFIG_FLAG(uParam0->f_3, 177, true);
  			PED::SET_PED_CONFIG_FLAG(uParam0->f_3, 116, false);
  			PED::ADD_RELATIONSHIP_GROUP("TAXI_Passenger", &(uParam0->f_413));
  			PED::SET_RELATIONSHIP_BETWEEN_GROUPS(1, uParam0->f_413, joaat("player"));
  			PED::SET_RELATIONSHIP_BETWEEN_GROUPS(2, uParam0->f_413, joaat("COP"));
  			PED::SET_PED_RELATIONSHIP_GROUP_HASH(uParam0->f_3, uParam0->f_413);
  			return 1;
  		}
  	}
  	return 0;
  }
  
  void func_307(var uParam0, struct<3> Param1)
  {
  	uParam0->f_51[0] = VEHICLE::ADD_ROAD_NODE_SPEED_ZONE(Param1, 20f, 5f, false);
  }
  
  void func_308(var uParam0, int iParam1, float fParam2, bool bParam3)
  {
  	int iVar0;
  	
  	if (iParam1 == 32)
  	{
  		iVar0 = 0;
  		while (iVar0 < 32)
  		{
  			if (fParam2 > 0f)
  			{
  				func_108(&(uParam0->f_146[iVar0 /*3*/]), fParam2);
  			}
  			else
  			{
  				func_107(&(uParam0->f_146[iVar0 /*3*/]));
  			}
  			iVar0++;
  		}
  	}
  	else if (fParam2 > 0f)
  	{
  		func_108(&(uParam0->f_146[iParam1 /*3*/]), fParam2);
  	}
  	else
  	{
  		func_107(&(uParam0->f_146[iParam1 /*3*/]));
  	}
  	if (bParam3)
  	{
  	}
  }
  
  void func_309()
  {
  	STREAMING::REQUEST_MODEL(iLocal_852);
  	STREAMING::REQUEST_ANIM_DICT(sLocal_884);
  	AUDIO::REQUEST_SCRIPT_AUDIO_BANK("Taxi_Vomit", false, -1);
  	iLocal_964 = func_311();
  	STREAMING::REQUEST_PTFX_ASSET();
  	func_310(1);
  }
  
  void func_310(bool bParam0)
  {
  	STREAMING::REQUEST_MODEL(func_21());
  	if (bParam0)
  	{
  		STREAMING::REQUEST_ANIM_DICT("gestures@m@standing@casual");
  	}
  	STREAMING::REQUEST_ANIM_DICT("oddjobs@taxi@");
  	STREAMING::REQUEST_ANIM_DICT("oddjobs@towingcome_here");
  	STREAMING::REQUEST_ANIM_DICT("misscommon@response");
  	HUD::REQUEST_ADDITIONAL_TEXT("TAXI", 2);
  	if (!func_24(Global_112915.f_19097, 128))
  	{
  		func_65(&(Global_112915.f_19097), 128);
  	}
  }
  
  int func_311()
  {
  	return GRAPHICS::REQUEST_SCALEFORM_MOVIE("MIDSIZED_MESSAGE");
  }
  
  void func_312(var uParam0, var uParam1)
  {
  	int iVar0;
  	
  	if (*uParam1 <= 5)
  	{
  		iVar0 = 0;
  		iVar0 = 0;
  		while (iVar0 <= 4)
  		{
  			MISC::CLEAR_BIT(&(uParam0->f_60[iVar0 /*3*/]), 1);
  			iVar0++;
  		}
  		iVar0 = 0;
  		iVar0 = 0;
  		while (iVar0 < *uParam1)
  		{
  			uParam0->f_60[iVar0 /*3*/] = { *(uParam1[iVar0 /*3*/]) };
  			MISC::SET_BIT(&(uParam0->f_60[iVar0 /*3*/]), 1);
  			MISC::CLEAR_BIT(&(uParam0->f_60[iVar0 /*3*/]), 2);
  			iVar0++;
  		}
  	}
  }
  
  void func_313(var uParam0, char* sParam1, int iParam2)
  {
  	*uParam0 = 0;
  	uParam0->f_1 = iParam2;
  	uParam0->f_2 = sParam1;
  }
  
  int func_314()
  {
  	float fVar0;
  	int iVar1;
  	
  	fVar0 = SYSTEM::TO_FLOAT(MISC::GET_GAME_TIMER());
  	iVar1 = func_192(&Local_410);
  	if ((fVar0 - fLocal_873) > 5f)
  	{
  		fLocal_873 = fVar0;
  		if (iLocal_872 == 0)
  		{
  			if (func_10(Local_410.f_4, Local_410.f_17, 1) < 200f)
  			{
  				iLocal_872++;
  			}
  			if (iVar1 >= 5)
  			{
  				if (!func_191())
  				{
  					return 1;
  				}
  				else
  				{
  					func_189();
  					fLocal_873 = 0f;
  				}
  			}
  		}
  		else if (iVar1 >= 7)
  		{
  			if (!func_191())
  			{
  				return 1;
  			}
  			else
  			{
  				func_189();
  				fLocal_873 = 0f;
  			}
  		}
  	}
  	return 0;
  }
  
  void func_315()
  {
  	if (func_316(&Local_410, 27, 155f))
  	{
  	}
  }
  
  int func_316(var uParam0, int iParam1, float fParam2)
  {
  	if (uParam0->f_410 < 29)
  	{
  		if (func_177(uParam0, 7))
  		{
  			func_216(uParam0, 23);
  			if (func_418(uParam0, 7) > fParam2 && func_418(uParam0, 23) > 35f)
  			{
  				func_308(uParam0, 23, 0, 0);
  				func_239(uParam0, iParam1, 1, 0, 0);
  				return 1;
  			}
  		}
  	}
  	return 0;
  }
  
  void func_317(var uParam0, int iParam1, bool bParam2)
  {
  	if (uParam0->f_411 == 0)
  	{
  		if (PLAYER::GET_PLAYER_WANTED_LEVEL(PLAYER::PLAYER_ID()) == 0)
  		{
  			if (bParam2)
  			{
  				if (func_418(uParam0, 10) > (20f + 10f))
  				{
  					if (uParam0->f_112)
  					{
  						func_239(uParam0, 92, 1, 0, 0);
  						uParam0->f_112 = 0;
  					}
  					else
  					{
  						func_239(uParam0, 83, 1, 0, 0);
  					}
  					uParam0->f_113 = 1;
  					func_308(uParam0, 10, 0f, 1);
  				}
  			}
  			else if (func_418(uParam0, 10) > 20f)
  			{
  				if (uParam0->f_112)
  				{
  					func_239(uParam0, 92, 1, 0, 0);
  					uParam0->f_112 = 0;
  				}
  				else
  				{
  					func_239(uParam0, 83, 1, 0, 0);
  				}
  				uParam0->f_113 = 1;
  				func_308(uParam0, 10, 0f, 1);
  			}
  		}
  	}
  	if (uParam0->f_411 == 1)
  	{
  		if (func_418(uParam0, 10) > 30f)
  		{
  			if (!func_191())
  			{
  				if (uParam0->f_112)
  				{
  					func_239(uParam0, 92, 1, 0, 0);
  					uParam0->f_112 = 0;
  				}
  				else
  				{
  					func_239(uParam0, 83, 1, 0, 0);
  				}
  				uParam0->f_113 = 1;
  				func_308(uParam0, 10, 0f, 1);
  			}
  		}
  	}
  	if (func_24(uParam0->f_100, 64))
  	{
  		if (!func_16(&(Local_190[5 /*10*/].f_6)))
  		{
  			func_217(&(Local_190[5 /*10*/].f_6));
  		}
  		else if (func_105(&(Local_190[5 /*10*/].f_6)) > 6f)
  		{
  			if (func_340(uParam0))
  			{
  				if (uParam0->f_113)
  				{
  					func_239(uParam0, 93, 1, 0, 0);
  					uParam0->f_113 = 0;
  				}
  				else
  				{
  					func_239(uParam0, Local_190[5 /*10*/].f_9, 1, 0, 0);
  				}
  				func_339(uParam0, 1);
  				func_337(5, uParam0);
  				func_336(uParam0);
  			}
  		}
  	}
  	if (func_24(uParam0->f_100, 1))
  	{
  		if (!func_16(&(Local_190[0 /*10*/].f_6)))
  		{
  			func_217(&(Local_190[0 /*10*/].f_6));
  		}
  		else if (func_105(&(Local_190[0 /*10*/].f_6)) > 5f)
  		{
  			if (func_335(uParam0))
  			{
  				func_339(uParam0, 1);
  				func_337(0, uParam0);
  				if (uParam0->f_113)
  				{
  					func_239(uParam0, 93, 1, 0, 0);
  					uParam0->f_113 = 0;
  				}
  				else
  				{
  					func_239(uParam0, Local_190[0 /*10*/].f_9, 1, 0, 0);
  				}
  				func_336(uParam0);
  			}
  		}
  	}
  	if (func_24(uParam0->f_100, 2))
  	{
  		if (!func_16(&(Local_190[1 /*10*/].f_6)))
  		{
  			func_217(&(Local_190[1 /*10*/].f_6));
  		}
  		else if (func_105(&(Local_190[1 /*10*/].f_6)) > 5f)
  		{
  			if (func_334(uParam0))
  			{
  				func_339(uParam0, 1);
  				func_337(1, uParam0);
  				if (uParam0->f_113)
  				{
  					func_239(uParam0, 93, 1, 0, 0);
  					uParam0->f_113 = 0;
  				}
  				else
  				{
  					func_239(uParam0, Local_190[1 /*10*/].f_9, 1, 0, 0);
  				}
  				func_336(uParam0);
  			}
  		}
  	}
  	if (func_24(uParam0->f_100, 2048))
  	{
  		if (!func_16(&(Local_190[8 /*10*/].f_6)))
  		{
  			if (ENTITY::DOES_ENTITY_EXIST(uParam0->f_4))
  			{
  				uParam0->f_46 = ENTITY::GET_ENTITY_HEALTH(uParam0->f_4);
  				func_217(&(Local_190[8 /*10*/].f_6));
  			}
  		}
  		else if (func_105(&(Local_190[8 /*10*/].f_6)) > 7f || Local_190[8 /*10*/].f_1 == 0)
  		{
  			if (func_333(uParam0))
  			{
  				func_339(uParam0, 1);
  				func_337(8, uParam0);
  				func_336(uParam0);
  			}
  		}
  	}
  	if (func_24(uParam0->f_100, 128))
  	{
  		if (!func_16(&(Local_190[6 /*10*/].f_6)))
  		{
  			func_217(&(Local_190[6 /*10*/].f_6));
  		}
  		else if (func_105(&(Local_190[6 /*10*/].f_6)) > 5f)
  		{
  			if (func_332(uParam0))
  			{
  				func_339(uParam0, 1);
  				func_337(6, uParam0);
  				if (uParam0->f_113)
  				{
  					func_239(uParam0, 93, 1, 0, 0);
  					uParam0->f_113 = 0;
  				}
  				else
  				{
  					func_239(uParam0, Local_190[6 /*10*/].f_9, 1, 0, 0);
  				}
  				func_336(uParam0);
  			}
  		}
  	}
  	if (func_24(uParam0->f_100, 32))
  	{
  		if (!func_16(&(Local_190[4 /*10*/].f_6)))
  		{
  			func_217(&(Local_190[4 /*10*/].f_6));
  		}
  		else if (func_105(&(Local_190[4 /*10*/].f_6)) > 4f)
  		{
  			if (func_331(uParam0))
  			{
  				func_339(uParam0, 1);
  				func_337(4, uParam0);
  				if (uParam0->f_113)
  				{
  					func_239(uParam0, 93, 1, 0, 0);
  					uParam0->f_113 = 0;
  				}
  				else
  				{
  					func_239(uParam0, Local_190[4 /*10*/].f_9, 1, 0, 0);
  				}
  				func_336(uParam0);
  			}
  		}
  	}
  	if (func_24(uParam0->f_100, 256))
  	{
  		if (!func_16(&(Local_190[7 /*10*/].f_6)))
  		{
  			func_217(&(Local_190[7 /*10*/].f_6));
  		}
  		else if (func_105(&(Local_190[7 /*10*/].f_6)) > 5f || Local_190[7 /*10*/].f_1 == 0)
  		{
  			if (func_330(uParam0))
  			{
  				func_337(7, uParam0);
  				func_339(uParam0, 1);
  				if (uParam0->f_113)
  				{
  					func_239(uParam0, 93, 1, 0, 0);
  					uParam0->f_113 = 0;
  				}
  				else
  				{
  					func_239(uParam0, Local_190[7 /*10*/].f_9, 1, 0, 1);
  				}
  				func_336(uParam0);
  			}
  		}
  	}
  	if (func_24(uParam0->f_100, 8))
  	{
  		if (!func_16(&(Local_190[9 /*10*/].f_6)))
  		{
  			func_217(&(Local_190[9 /*10*/].f_6));
  		}
  		else if (func_105(&(Local_190[9 /*10*/].f_6)) <= 7f)
  		{
  			PLAYER::CLEAR_PLAYER_HAS_DAMAGED_AT_LEAST_ONE_PED(PLAYER::PLAYER_ID());
  		}
  		else if (func_105(&(Local_190[9 /*10*/].f_6)) > 7f || Local_190[9 /*10*/].f_1 == 0)
  		{
  			if (func_329(uParam0))
  			{
  				func_339(uParam0, 1);
  				func_337(9, uParam0);
  				if (uParam0->f_113)
  				{
  					func_239(uParam0, 93, 1, 0, 0);
  					uParam0->f_113 = 0;
  				}
  				else
  				{
  					func_239(uParam0, Local_190[9 /*10*/].f_9, 1, 0, 1);
  				}
  				func_336(uParam0);
  			}
  		}
  	}
  	if (func_24(uParam0->f_100, 16384))
  	{
  		if (!func_16(&(Local_190[13 /*10*/].f_6)))
  		{
  			func_217(&(Local_190[13 /*10*/].f_6));
  		}
  		else if (func_105(&(Local_190[13 /*10*/].f_6)) > 10f)
  		{
  			if (func_323(uParam0))
  			{
  				func_339(uParam0, 1);
  				func_337(13, uParam0);
  				if (uParam0->f_113)
  				{
  					func_239(uParam0, 93, 1, 0, 0);
  					uParam0->f_113 = 0;
  				}
  				else
  				{
  					func_239(uParam0, Local_190[13 /*10*/].f_9, 1, 0, 0);
  				}
  				func_336(uParam0);
  			}
  		}
  	}
  	if (func_24(uParam0->f_100, 32768))
  	{
  		if (!func_16(&(Local_190[14 /*10*/].f_6)))
  		{
  			func_217(&(Local_190[14 /*10*/].f_6));
  		}
  		else if (func_105(&(Local_190[14 /*10*/].f_6)) > 7f)
  		{
  			if (func_322(uParam0))
  			{
  				func_339(uParam0, 1);
  				func_337(14, uParam0);
  				if (uParam0->f_113)
  				{
  					func_239(uParam0, 93, 1, 0, 0);
  					uParam0->f_113 = 0;
  				}
  				else
  				{
  					func_239(uParam0, Local_190[14 /*10*/].f_9, 1, 0, 0);
  				}
  				func_336(uParam0);
  			}
  		}
  	}
  	if (func_24(uParam0->f_100, 4096))
  	{
  		if (!func_16(&(Local_190[11 /*10*/].f_6)))
  		{
  			func_217(&(Local_190[11 /*10*/].f_6));
  		}
  		else if (func_105(&(Local_190[11 /*10*/].f_6)) > 8f)
  		{
  			if (func_321(uParam0))
  			{
  				func_339(uParam0, 1);
  				func_337(11, uParam0);
  				if (uParam0->f_113)
  				{
  					func_239(uParam0, 93, 1, 0, 0);
  					uParam0->f_113 = 0;
  				}
  				else
  				{
  					func_239(uParam0, Local_190[11 /*10*/].f_9, 1, 0, 0);
  				}
  				func_336(uParam0);
  			}
  		}
  	}
  	if (func_24(uParam0->f_100, 8192))
  	{
  		if (!func_16(&(Local_190[12 /*10*/].f_6)))
  		{
  			func_217(&(Local_190[12 /*10*/].f_6));
  		}
  		else if (func_105(&(Local_190[12 /*10*/].f_6)) > 5f)
  		{
  			if (func_320(uParam0))
  			{
  				func_339(uParam0, 1);
  				func_337(12, uParam0);
  				if (uParam0->f_113)
  				{
  					func_239(uParam0, 93, 1, 0, 0);
  					uParam0->f_113 = 0;
  				}
  				else
  				{
  					func_239(uParam0, Local_190[12 /*10*/].f_9, 1, 0, 0);
  				}
  				func_336(uParam0);
  			}
  		}
  	}
  	if (func_24(uParam0->f_100, 4))
  	{
  		if (!func_16(&(Local_190[2 /*10*/].f_6)))
  		{
  			func_319(&(Local_190[2 /*10*/].f_6), 0f);
  		}
  		else if (func_105(&(Local_190[2 /*10*/].f_6)) > 5f)
  		{
  			if (func_318(uParam0))
  			{
  				if (uParam0->f_113)
  				{
  					func_239(uParam0, 93, 1, 0, 0);
  					uParam0->f_113 = 0;
  				}
  				else
  				{
  					func_239(uParam0, Local_190[2 /*10*/].f_9, 1, 0, 0);
  				}
  				func_339(uParam0, 1);
  				func_337(2, uParam0);
  				func_336(uParam0);
  			}
  		}
  	}
  }
  
  int func_318(var uParam0)
  {
  	float fVar0;
  	
  	if (!PED::IS_PED_INJURED(uParam0->f_2))
  	{
  		if ((!PED::IS_PED_STOPPED(uParam0->f_2) && !func_16(&(Local_190[0 /*10*/].f_3))) && !func_16(&(Local_190[1 /*10*/].f_3)))
  		{
  			if (!func_16(&(Local_190[2 /*10*/].f_3)))
  			{
  				uParam0->f_37 = ENTITY::GET_ENTITY_SPEED(uParam0->f_2);
  				if (uParam0->f_37 > 10f)
  				{
  					func_217(&(Local_190[2 /*10*/].f_3));
  				}
  			}
  			else if (func_105(&(Local_190[2 /*10*/].f_3)) > 0.9f)
  			{
  				uParam0->f_38 = uParam0->f_37;
  				uParam0->f_37 = ENTITY::GET_ENTITY_SPEED(uParam0->f_2);
  				fVar0 = (uParam0->f_38 - uParam0->f_37);
  				func_104(&(Local_190[2 /*10*/].f_3));
  				if (fVar0 > 10f && uParam0->f_37 < 12f)
  				{
  					return 1;
  				}
  			}
  		}
  		else
  		{
  			func_104(&(Local_190[2 /*10*/].f_3));
  		}
  	}
  	return 0;
  }
  
  void func_319(int* iParam0, float fParam1)
  {
  	if (!func_16(iParam0))
  	{
  		func_108(iParam0, fParam1);
  	}
  }
  
  int func_320(var uParam0)
  {
  	struct<3> Var0;
  	
  	if (VEHICLE::IS_VEHICLE_DRIVEABLE(uParam0->f_4, false))
  	{
  		Var0 = { ENTITY::GET_ENTITY_SPEED_VECTOR(uParam0->f_4, true) };
  		if (Var0.f_1 < -10f && !func_16(&(Local_190[0 /*10*/].f_3)))
  		{
  			if (!func_16(&(Local_190[12 /*10*/].f_3)))
  			{
  				func_217(&(Local_190[12 /*10*/].f_3));
  			}
  			else if (func_105(&(Local_190[12 /*10*/].f_3)) > 5f)
  			{
  				func_104(&(Local_190[12 /*10*/].f_3));
  				return 1;
  			}
  		}
  		else
  		{
  			func_104(&(Local_190[12 /*10*/].f_3));
  		}
  	}
  	return 0;
  }
  
  int func_321(var uParam0)
  {
  	struct<3> Var0;
  	
  	if ((((((VEHICLE::IS_VEHICLE_DRIVEABLE(uParam0->f_4, false) && !func_16(&(Local_190[0 /*10*/].f_3))) && !func_16(&(Local_190[1 /*10*/].f_3))) && !func_16(&(Local_190[5 /*10*/].f_3))) && !func_16(&(Local_190[9 /*10*/].f_3))) && !func_16(&(Local_190[7 /*10*/].f_3))) && !func_16(&(Local_190[8 /*10*/].f_3)))
  	{
  		Var0 = { ENTITY::GET_ENTITY_SPEED_VECTOR(uParam0->f_4, true) };
  		if (MISC::ABSF(Var0.f_0) > 2.5f && !func_16(&(Local_190[0 /*10*/].f_3)))
  		{
  			if (!func_16(&(Local_190[11 /*10*/].f_3)))
  			{
  				func_217(&(Local_190[11 /*10*/].f_3));
  				fLocal_342 = Var0.f_0;
  			}
  			else if (func_105(&(Local_190[11 /*10*/].f_3)) < 1.5f && (MISC::ABSF(fLocal_342) - MISC::ABSF(Var0.f_0)) < 0f)
  			{
  				func_104(&(Local_190[11 /*10*/].f_3));
  				return 1;
  			}
  			else if (func_105(&(Local_190[11 /*10*/].f_3)) >= 1.5f)
  			{
  				func_104(&(Local_190[11 /*10*/].f_3));
  				return 0;
  			}
  		}
  	}
  	return 0;
  }
  
  int func_322(var uParam0)
  {
  	if (((((VEHICLE::IS_VEHICLE_DRIVEABLE(uParam0->f_4, false) && !func_16(&(Local_190[0 /*10*/].f_3))) && !func_16(&(Local_190[8 /*10*/].f_3))) && !func_16(&(Local_190[5 /*10*/].f_3))) && !func_16(&(Local_190[9 /*10*/].f_3))) && !func_16(&(Local_190[7 /*10*/].f_3)))
  	{
  		if (!func_16(&(Local_190[14 /*10*/].f_3)))
  		{
  			uParam0->f_5 = VEHICLE::GET_CLOSEST_VEHICLE(ENTITY::GET_ENTITY_COORDS(uParam0->f_4, true), 10f, 0, 260);
  			if (ENTITY::DOES_ENTITY_EXIST(uParam0->f_5))
  			{
  				if ((ENTITY::GET_ENTITY_SPEED(uParam0->f_4) > 15f && func_169(uParam0->f_5, uParam0->f_4, 1) < 3f) && (!ENTITY::IS_ENTITY_DEAD(uParam0->f_5, false) && !VEHICLE::IS_VEHICLE_SEAT_FREE(uParam0->f_5, -1, false)))
  				{
  					func_217(&(Local_190[14 /*10*/].f_3));
  				}
  			}
  		}
  		else if ((func_105(&(Local_190[14 /*10*/].f_3)) < 1.5f && func_169(uParam0->f_5, uParam0->f_4, 1) > 4.5f) && !ENTITY::HAS_ENTITY_BEEN_DAMAGED_BY_ANY_VEHICLE(uParam0->f_5))
  		{
  			func_104(&(Local_190[14 /*10*/].f_3));
  			return 1;
  		}
  		else if (func_105(&(Local_190[14 /*10*/].f_3)) >= 1.5f)
  		{
  			func_104(&(Local_190[14 /*10*/].f_3));
  			return 0;
  		}
  		else if (ENTITY::HAS_ENTITY_BEEN_DAMAGED_BY_ANY_VEHICLE(uParam0->f_5))
  		{
  			func_104(&(Local_190[14 /*10*/].f_3));
  			return 0;
  		}
  	}
  	return 0;
  }
  
  int func_323(var uParam0)
  {
  	if (((VEHICLE::IS_VEHICLE_DRIVEABLE(uParam0->f_4, false) && !func_16(&(Local_190[9 /*10*/].f_3))) && !func_16(&(Local_190[7 /*10*/].f_3))) && !func_16(&(Local_190[4 /*10*/].f_3)))
  	{
  		if (!func_324(uParam0->f_4) && ENTITY::GET_ENTITY_SPEED(uParam0->f_4) > 15f)
  		{
  			if (!func_16(&(Local_190[13 /*10*/].f_3)))
  			{
  				func_217(&(Local_190[13 /*10*/].f_3));
  			}
  			else if (func_105(&(Local_190[13 /*10*/].f_3)) > 5f)
  			{
  				func_104(&(Local_190[13 /*10*/].f_3));
  				return 1;
  			}
  		}
  		else
  		{
  			func_104(&(Local_190[13 /*10*/].f_3));
  		}
  	}
  	return 0;
  }
  
  bool func_324(int iParam0)
  {
  	struct<3> Var0;
  	struct<3> Var3;
  	struct<3> Var6;
  	struct<3> Var9;
  	struct<3> Var12;
  	struct<3> Var15;
  	struct<3> Var18;
  	struct<3> Var21;
  	struct<3> Var24;
  	float fVar27;
  	
  	PATHFIND::GET_NTH_CLOSEST_VEHICLE_NODE(ENTITY::GET_ENTITY_COORDS(iParam0, true), 1, &Var0, 1, 1077936128, 0);
  	PATHFIND::GET_NTH_CLOSEST_VEHICLE_NODE(ENTITY::GET_ENTITY_COORDS(iParam0, true), 2, &Var3, 1, 1077936128, 0);
  	PATHFIND::_GET_POINT_ON_ROAD_SIDE(Var0, -1, &Var6);
  	fVar27 = SYSTEM::VMAG(Var6 - Var0);
  	Var9 = { func_328((Var3.f_0 - Var0.f_0), (Var3.f_1 - Var0.f_1), 0f) };
  	Var12 = { func_327(Var9, 0) * Vector(fVar27, fVar27, fVar27) };
  	Var9 = { Var9 * Vector(2f, 2f, 2f) };
  	Var15 = { Var0 - Var9 + Var12 };
  	Var18 = { Var0 - Var9 - Var12 };
  	Var21 = { Var3 + Var9 + Var12 };
  	Var24 = { Var3 + Var9 - Var12 };
  	Var24 = { Var24 };
  	return func_325(ENTITY::GET_ENTITY_COORDS(iParam0, true), Var15, Var18, Var21);
  }
  
  int func_325(struct<3> Param0, struct<3> Param3, struct<3> Param6, struct<3> Param9)
  {
  	struct<3> Var0;
  	struct<3> Var3;
  	float fVar6;
  	float fVar7;
  	float fVar8;
  	float fVar9;
  	float fVar10;
  	float fVar11;
  	float fVar12;
  	float fVar13;
  	
  	Param0.f_2 = 0f;
  	Param3.f_2 = 0f;
  	Param6.f_2 = 0f;
  	Param9.f_2 = 0f;
  	Var0 = { func_328(Param6 - Param3) };
  	Var3 = { func_328(Param9 - Param3) };
  	fVar6 = func_326(Param0, Var0);
  	fVar7 = func_326(Param3, Var0);
  	fVar8 = func_326(Param6, Var0);
  	fVar9 = func_326(Param0, Var3);
  	fVar10 = func_326(Param3, Var3);
  	fVar11 = func_326(Param9, Var3);
  	if (fVar7 > fVar8)
  	{
  		fVar12 = fVar7;
  		fVar7 = fVar8;
  		fVar8 = fVar12;
  	}
  	if (fVar6 < fVar7 || fVar6 > fVar8)
  	{
  		return 0;
  	}
  	if (fVar10 > fVar11)
  	{
  		fVar13 = fVar10;
  		fVar10 = fVar11;
  		fVar11 = fVar13;
  	}
  	if (fVar9 < fVar10 || fVar9 > fVar11)
  	{
  		return 0;
  	}
  	return 1;
  }
  
  float func_326(struct<3> Param0, struct<3> Param3)
  {
  	return (((Param0.f_0 * Param3.f_0) + (Param0.f_1 * Param3.f_1)) + (Param0.f_2 * Param3.f_2));
  }
  
  Vector3 func_327(struct<3> Param0, int iParam3)
  {
  	struct<3> Var0;
  	
  	switch (iParam3)
  	{
  		case 0:
  			Var0.f_0 = -Param0.f_1;
  			Var0.f_1 = Param0.f_0;
  			break;
  		
  		case 1:
  			Var0.f_0 = -Param0.f_0;
  			Var0.f_1 = -Param0.f_1;
  			break;
  		
  		case 2:
  			Var0.f_0 = Param0.f_1;
  			Var0.f_1 = -Param0.f_0;
  			break;
  	}
  	Var0.f_2 = Param0.f_2;
  	return Var0;
  }
  
  Vector3 func_328(struct<3> Param0)
  {
  	float fVar0;
  	float fVar1;
  	
  	fVar0 = SYSTEM::VMAG(Param0);
  	if (fVar0 != 0f)
  	{
  		fVar1 = (1f / fVar0);
  		Param0 = { Param0 * Vector(fVar1, fVar1, fVar1) };
  	}
  	else
  	{
  		Param0.f_0 = 0f;
  		Param0.f_1 = 0f;
  		Param0.f_2 = 0f;
  	}
  	return Param0;
  }
  
  int func_329(var uParam0)
  {
  	if (VEHICLE::IS_VEHICLE_DRIVEABLE(uParam0->f_4, false))
  	{
  		if (VEHICLE::GET_PED_IN_VEHICLE_SEAT(uParam0->f_4, -1, false) == PLAYER::PLAYER_PED_ID())
  		{
  			if (PLAYER::HAS_PLAYER_DAMAGED_AT_LEAST_ONE_PED(PLAYER::PLAYER_ID()))
  			{
  				return 1;
  			}
  		}
  	}
  	return 0;
  }
  
  int func_330(var uParam0)
  {
  	if (VEHICLE::IS_VEHICLE_DRIVEABLE(uParam0->f_4, false))
  	{
  		if (VEHICLE::GET_PED_IN_VEHICLE_SEAT(uParam0->f_4, -1, false) == PLAYER::PLAYER_PED_ID())
  		{
  			if (ENTITY::IS_ENTITY_UPSIDEDOWN(uParam0->f_4))
  			{
  				if (!iLocal_341)
  				{
  					if (ENTITY::GET_ENTITY_ROLL(uParam0->f_4) <= -145f || ENTITY::GET_ENTITY_ROLL(uParam0->f_4) >= 145f)
  					{
  						iLocal_341 = 1;
  					}
  				}
  			}
  			else if (iLocal_341)
  			{
  				if (ENTITY::GET_ENTITY_ROLL(uParam0->f_4) <= 35f && ENTITY::GET_ENTITY_ROLL(uParam0->f_4) >= -35f)
  				{
  					iLocal_341 = 0;
  					return 1;
  				}
  			}
  		}
  	}
  	return 0;
  }
  
  int func_331(var uParam0)
  {
  	int iVar0;
  	
  	if (VEHICLE::IS_VEHICLE_DRIVEABLE(uParam0->f_4, false))
  	{
  		iVar0 = PLAYER::GET_TIME_SINCE_PLAYER_DROVE_ON_PAVEMENT(PLAYER::PLAYER_ID());
  		if (iVar0 == 0)
  		{
  			if (!func_16(&(Local_190[4 /*10*/].f_3)))
  			{
  				func_217(&(Local_190[4 /*10*/].f_3));
  			}
  			else if (func_105(&(Local_190[4 /*10*/].f_3)) > 2f)
  			{
  				func_104(&(Local_190[4 /*10*/].f_3));
  				return 1;
  			}
  		}
  		else
  		{
  			func_104(&(Local_190[4 /*10*/].f_3));
  		}
  	}
  	return 0;
  }
  
  int func_332(var uParam0)
  {
  	int iVar0;
  	
  	if (VEHICLE::IS_VEHICLE_DRIVEABLE(uParam0->f_4, false))
  	{
  		iVar0 = PLAYER::GET_TIME_SINCE_PLAYER_DROVE_AGAINST_TRAFFIC(PLAYER::PLAYER_ID());
  		if (iVar0 == 0)
  		{
  			if (!func_16(&(Local_190[6 /*10*/].f_3)))
  			{
  				func_217(&(Local_190[6 /*10*/].f_3));
  			}
  			else if (func_105(&(Local_190[6 /*10*/].f_3)) > 3.5f)
  			{
  				func_104(&(Local_190[6 /*10*/].f_3));
  				return 1;
  			}
  		}
  		else
  		{
  			func_104(&(Local_190[6 /*10*/].f_3));
  		}
  	}
  	return 0;
  }
  
  int func_333(var uParam0)
  {
  	int iVar0;
  	int iVar1;
  	
  	if (VEHICLE::IS_VEHICLE_DRIVEABLE(uParam0->f_4, false))
  	{
  		if (ENTITY::HAS_ENTITY_COLLIDED_WITH_ANYTHING(uParam0->f_4))
  		{
  			iVar0 = ENTITY::GET_ENTITY_HEALTH(uParam0->f_4);
  			iVar1 = (uParam0->f_46 - iVar0);
  			uParam0->f_46 = iVar0;
  			ENTITY::CLEAR_ENTITY_LAST_DAMAGE_ENTITY(uParam0->f_4);
  			if (IntToFloat(iVar1) > 10f)
  			{
  				if (uParam0->f_113)
  				{
  					func_239(uParam0, 93, 1, 0, 0);
  					uParam0->f_113 = 0;
  				}
  				else
  				{
  					func_239(uParam0, 72, 1, 0, 1);
  				}
  				func_104(&(Local_190[2 /*10*/].f_6));
  				return 1;
  			}
  		}
  	}
  	return 0;
  }
  
  int func_334(var uParam0)
  {
  	struct<3> Var0;
  	
  	if (VEHICLE::IS_VEHICLE_DRIVEABLE(uParam0->f_4, false))
  	{
  		Var0 = { ENTITY::GET_ENTITY_SPEED_VECTOR(uParam0->f_4, true) };
  		if (MISC::ABSF(Var0.f_0) > 3f && !func_16(&(Local_190[0 /*10*/].f_3)))
  		{
  			if (!func_16(&(Local_190[1 /*10*/].f_3)))
  			{
  				func_217(&(Local_190[1 /*10*/].f_3));
  			}
  			else if (func_105(&(Local_190[1 /*10*/].f_3)) > 1.2f)
  			{
  				func_104(&(Local_190[1 /*10*/].f_3));
  				return 1;
  			}
  		}
  		else
  		{
  			func_104(&(Local_190[1 /*10*/].f_3));
  		}
  	}
  	return 0;
  }
  
  int func_335(var uParam0)
  {
  	if (VEHICLE::IS_VEHICLE_DRIVEABLE(uParam0->f_4, false))
  	{
  		if (!VEHICLE::IS_VEHICLE_ON_ALL_WHEELS(uParam0->f_4) && ENTITY::IS_ENTITY_IN_AIR(uParam0->f_4))
  		{
  			if (!func_16(&(Local_190[0 /*10*/].f_3)))
  			{
  				func_217(&(Local_190[0 /*10*/].f_3));
  			}
  			else if (func_105(&(Local_190[0 /*10*/].f_3)) > 0.7f)
  			{
  				func_104(&(Local_190[0 /*10*/].f_3));
  				func_107(&(Local_190[1 /*10*/].f_6));
  				return 1;
  			}
  		}
  		else
  		{
  			func_104(&(Local_190[0 /*10*/].f_3));
  		}
  	}
  	return 0;
  }
  
  void func_336(var uParam0)
  {
  	int iVar0;
  	
  	iVar0 = 0;
  	while (iVar0 < 15)
  	{
  		if (func_16(&(Local_190[iVar0 /*10*/].f_6)))
  		{
  			func_107(&(Local_190[iVar0 /*10*/].f_6));
  		}
  		iVar0++;
  	}
  	func_308(uParam0, 10, 0f, 1);
  	PLAYER::CLEAR_PLAYER_HAS_DAMAGED_AT_LEAST_ONE_PED(PLAYER::PLAYER_ID());
  }
  
  void func_337(int iParam0, var uParam1)
  {
  	Local_190[iParam0 /*10*/].f_1++;
  	func_338(uParam1, iParam0);
  	func_104(&(Local_190[iParam0 /*10*/].f_6));
  	uParam1->f_112 = 1;
  }
  
  void func_338(var uParam0, int iParam1)
  {
  	uParam0->f_76 = (uParam0->f_76 + Local_190[iParam1 /*10*/]);
  }
  
  void func_339(var uParam0, int iParam1)
  {
  	uParam0->f_104 = (uParam0->f_104 + iParam1);
  }
  
  int func_340(var uParam0)
  {
  	if (VEHICLE::IS_VEHICLE_DRIVEABLE(uParam0->f_4, false))
  	{
  		if (ENTITY::GET_ENTITY_SPEED(uParam0->f_4) > 25f)
  		{
  			if (!func_16(&(Local_190[5 /*10*/].f_3)))
  			{
  				func_217(&(Local_190[5 /*10*/].f_3));
  			}
  			else if (func_105(&(Local_190[5 /*10*/].f_3)) > 3.5f)
  			{
  				func_104(&(Local_190[5 /*10*/].f_3));
  				return 1;
  			}
  		}
  		else
  		{
  			func_104(&(Local_190[5 /*10*/].f_3));
  		}
  	}
  	return 0;
  }
  
  void func_341(var uParam0, char* sParam1, int iParam2)
  {
  	struct<3> Var0;
  	
  	func_189();
  	func_438(2);
  	Var0 = { func_345() };
  	if ((!MISC::IS_STRING_NULL_OR_EMPTY(&Var0) && func_191()) && !MISC::ARE_STRINGS_EQUAL(&Var0, "NULL"))
  	{
  	}
  	else
  	{
  		HUD::CLEAR_PRINTS();
  		HUD::CLEAR_HELP(true);
  		StringCopy(&Var0, uParam0->f_143, 24);
  		if (!ENTITY::IS_ENTITY_DEAD(uParam0->f_3, false))
  		{
  			if (!func_164(uParam0))
  			{
  				if (ENTITY::IS_ENTITY_PLAYING_ANIM(uParam0->f_3, "oddjobs@towingcome_here", "come_here_idle_a", 3))
  				{
  					TASK::STOP_ANIM_TASK(uParam0->f_3, "oddjobs@towingcome_here", "come_here_idle_a", -8f);
  				}
  				else if (ENTITY::IS_ENTITY_PLAYING_ANIM(uParam0->f_3, "oddjobs@towingcome_here", "come_here_idle_c", 3))
  				{
  					TASK::STOP_ANIM_TASK(uParam0->f_3, "oddjobs@towingcome_here", "come_here_idle_c", -8f);
  				}
  				else if (ENTITY::IS_ENTITY_PLAYING_ANIM(uParam0->f_3, "gestures@m@standing@casual", "gesture_nod_yes_hard", 3))
  				{
  					TASK::STOP_ANIM_TASK(uParam0->f_3, "gestures@m@standing@casual", "gesture_nod_yes_hard", -8f);
  				}
  			}
  		}
  		uParam0->f_109 = 1;
  		uParam0->f_121 = sParam1;
  		uParam0->f_415 = iParam2;
  		func_308(uParam0, 3, 0, 0);
  		if (iParam2 == 8 || iParam2 == 18)
  		{
  			if (uParam0->f_411 != 9)
  			{
  				if (uParam0->f_115)
  				{
  					StringConCat(&Var0, "_aband2", 24);
  				}
  				else
  				{
  					StringConCat(&Var0, "_aband1", 24);
  				}
  				func_343(uParam0, &Var0);
  			}
  			else if (!PED::IS_PED_INJURED(uParam0->f_3))
  			{
  				func_268(uParam0->f_3, "TAXI_FAIL", uParam0->f_145, 4);
  			}
  			StringCopy(&(uParam0->f_130), "TAXI_OBJ_FAIL", 24);
  		}
  		else if (iParam2 == 10)
  		{
  			if (uParam0->f_115)
  			{
  				StringConCat(&Var0, "_aggro2", 24);
  			}
  			else
  			{
  				StringConCat(&Var0, "_aggro", 24);
  			}
  			func_343(uParam0, &Var0);
  			StringCopy(&(uParam0->f_130), "TAXI_OBJ_F_SPK", 24);
  		}
  		else if (uParam0->f_415 == 15)
  		{
  			StringCopy(&(uParam0->f_130), "TAXI_OBJ_F_DEAD", 24);
  		}
  		else if (iParam2 == 2)
  		{
  			StringConCat(&Var0, "_lost1", 24);
  			func_343(uParam0, &Var0);
  			StringCopy(&(uParam0->f_130), "TAXI_OBJ_FAIL", 24);
  		}
  		else if (iParam2 == 3)
  		{
  			StringConCat(&Var0, "_spotd1", 24);
  			func_343(uParam0, &Var0);
  			StringCopy(&(uParam0->f_130), "TAXI_OBJ_F_SPT", 24);
  		}
  		else if (iParam2 == 4)
  		{
  			StringConCat(&Var0, "_wntd1", 24);
  			func_343(uParam0, &Var0);
  			StringCopy(&(uParam0->f_130), "TAXI_OBJ_F_SPT", 24);
  		}
  		else if (iParam2 == 5)
  		{
  			StringConCat(&Var0, "_spook", 24);
  			func_343(uParam0, &Var0);
  			StringCopy(&(uParam0->f_130), "TAXI_OBJ_F_SPK", 24);
  			if (func_164(uParam0))
  			{
  				if (VEHICLE::IS_VEHICLE_STOPPED(uParam0->f_4))
  				{
  					func_152(uParam0, 4096, 0);
  				}
  				else
  				{
  					func_152(uParam0, 0, 0);
  				}
  			}
  		}
  		else if (iParam2 == 6)
  		{
  			StringConCat(&Var0, "_hit2", 24);
  			func_343(uParam0, &Var0);
  			StringCopy(&(uParam0->f_130), "TAXI_OBJ_F_SPK", 24);
  		}
  		else if (iParam2 == 7)
  		{
  			StringConCat(&Var0, "_jak", 24);
  			func_343(uParam0, &Var0);
  			StringCopy(&(uParam0->f_130), "TAXI_OBJ_F_SPT", 24);
  		}
  		else if (iParam2 == 14)
  		{
  			if (uParam0->f_411 != 9)
  			{
  				if (uParam0->f_115)
  				{
  					StringConCat(&Var0, "_shot2", 24);
  				}
  				else
  				{
  					StringConCat(&Var0, "_shot1", 24);
  				}
  				func_343(uParam0, &Var0);
  			}
  			else if (!PED::IS_PED_INJURED(uParam0->f_3))
  			{
  				func_268(uParam0->f_3, "CALL_COPS_COMMIT", uParam0->f_145, 4);
  			}
  			PLAYER::SET_PLAYER_WANTED_LEVEL(PLAYER::PLAYER_ID(), 1, false);
  			StringCopy(&(uParam0->f_130), "TAXI_OBJ_F_SHT", 24);
  		}
  		else if (iParam2 == 12)
  		{
  			StringConCat(&Var0, "_shot1", 24);
  			func_343(uParam0, &Var0);
  			PLAYER::SET_PLAYER_WANTED_LEVEL(PLAYER::PLAYER_ID(), 1, false);
  			StringCopy(&(uParam0->f_130), "TAXI_OBJ_F_SPT", 24);
  		}
  		else if (iParam2 == 13)
  		{
  			StringConCat(&Var0, "_shot1", 24);
  			func_343(uParam0, &Var0);
  			PLAYER::SET_PLAYER_WANTED_LEVEL(PLAYER::PLAYER_ID(), 1, false);
  			StringCopy(&(uParam0->f_130), "TAXI_OBJ_F_CK", 24);
  		}
  		else if (iParam2 == 11)
  		{
  			func_53(8, 0);
  			iLocal_57[3] = 1;
  			if (uParam0->f_411 != 9)
  			{
  				if (uParam0->f_115)
  				{
  					StringConCat(&Var0, "_noDri2", 24);
  				}
  				else
  				{
  					StringConCat(&Var0, "_noDri1", 24);
  				}
  				func_343(uParam0, &Var0);
  			}
  			else if (!PED::IS_PED_INJURED(uParam0->f_3))
  			{
  				func_268(uParam0->f_3, "GENERIC_INSULT_MED", uParam0->f_145, 4);
  			}
  			func_152(uParam0, 0, 0);
  			func_343(uParam0, &Var0);
  			StringCopy(&(uParam0->f_130), "TAXI_OBJ_F_WAT", 24);
  		}
  		else if (iParam2 == 0)
  		{
  			func_53(8, 0);
  			iLocal_57[3] = 1;
  			if (uParam0->f_411 != 9)
  			{
  				if (uParam0->f_115)
  				{
  					StringConCat(&Var0, "_noDri2", 24);
  				}
  				else
  				{
  					StringConCat(&Var0, "_noDri1", 24);
  				}
  				func_343(uParam0, &Var0);
  			}
  			else if (!PED::IS_PED_INJURED(uParam0->f_3))
  			{
  				func_268(uParam0->f_3, "TAXI_FAIL", uParam0->f_145, 4);
  			}
  			func_343(uParam0, &Var0);
  			StringCopy(&(uParam0->f_130), "TAXI_OBJ_F_DR", 24);
  		}
  		else if (iParam2 == 1)
  		{
  			func_53(8, 0);
  			iLocal_57[3] = 1;
  			if (uParam0->f_411 != 9)
  			{
  				if (uParam0->f_115)
  				{
  					StringConCat(&Var0, "_noDri2", 24);
  				}
  				else
  				{
  					StringConCat(&Var0, "_noDri1", 24);
  				}
  				func_343(uParam0, &Var0);
  			}
  			else if (!PED::IS_PED_INJURED(uParam0->f_3))
  			{
  				func_268(uParam0->f_3, "TAXI_FAIL", uParam0->f_145, 4);
  			}
  			StringCopy(&(uParam0->f_130), "TAXI_OBJ_F_FIRE", 24);
  		}
  		else if (iParam2 == 19)
  		{
  			StringCopy(&Var0, "OJTX_QUIT_", 24);
  			func_342(&Var0);
  			func_193(&(uParam0->f_244), "OJTXAUD", &Var0, 7, 0, 0, 0);
  			StringCopy(&(uParam0->f_130), "TAXI_OBJ_CNCL", 24);
  		}
  		else if (iParam2 == 20)
  		{
  			if (uParam0->f_115)
  			{
  				StringConCat(&Var0, "_aband2", 24);
  			}
  			else
  			{
  				StringConCat(&Var0, "_fail1", 24);
  			}
  			func_343(uParam0, &Var0);
  			StringCopy(&(uParam0->f_130), "TAXI_OBJ_FAIL", 24);
  		}
  		else
  		{
  			if (uParam0->f_411 != 9)
  			{
  				if (iParam2 != 21)
  				{
  					StringConCat(&Var0, "_Fail1", 24);
  				}
  				else
  				{
  					StringConCat(&Var0, "_aband1", 24);
  				}
  				if (uParam0->f_410 > 5)
  				{
  					func_343(uParam0, &Var0);
  				}
  			}
  			else if (!PED::IS_PED_INJURED(uParam0->f_3))
  			{
  				func_268(uParam0->f_3, "TAXI_FAIL", uParam0->f_145, 4);
  			}
  			StringCopy(&(uParam0->f_130), "TAXI_OBJ_FAIL", 24);
  			func_53(3, 0);
  		}
  		func_308(uParam0, 3, 0f, 1);
  	}
  }
  
  void func_342(char* sParam0)
  {
  	switch (func_3(PLAYER::PLAYER_PED_ID()))
  	{
  		case 0:
  			StringConCat(sParam0, "M", 24);
  			break;
  		
  		case 2:
  			StringConCat(sParam0, "T", 24);
  			break;
  		
  		case 1:
  			StringConCat(sParam0, "F", 24);
  			break;
  		
  		default:
  			StringConCat(sParam0, "M", 24);
  			break;
  	}
  }
  
  void func_343(var uParam0, char* sParam1)
  {
  	if (func_344(uParam0))
  	{
  		func_193(&(uParam0->f_244), uParam0->f_144, sParam1, 9, 0, 0, 0);
  	}
  }
  
  int func_344(var uParam0)
  {
  	if (!ENTITY::IS_ENTITY_DEAD(uParam0->f_3, false))
  	{
  		if (func_169(PLAYER::PLAYER_PED_ID(), uParam0->f_3, 1) < 40f && !ENTITY::IS_ENTITY_OCCLUDED(uParam0->f_3))
  		{
  			return 1;
  		}
  	}
  	return 0;
  }
  
  struct<6> func_345()
  {
  	struct<6> Var0;
  	int iVar6;
  	
  	StringCopy(&Var0, "NULL", 24);
  	if (Global_21285 == 4)
  	{
  		iVar6 = AUDIO::GET_CURRENT_SCRIPTED_CONVERSATION_LINE();
  		iVar6 = (iVar6 + Global_22295);
  		if (iVar6 > -1)
  		{
  			return Global_20153[iVar6 /*6*/];
  		}
  		else
  		{
  			return Var0;
  		}
  	}
  	return Var0;
  }
  
  int func_346(var uParam0)
  {
  	return uParam0->f_118;
  }
  
  void func_347()
  {
  	if (func_379(&Local_410, &Local_886))
  	{
  		switch (Local_886.f_27)
  		{
  			case 0:
  				if (Local_410.f_410 == 9)
  				{
  					if (!func_378(&Local_410) && PLAYER::GET_PLAYER_WANTED_LEVEL(PLAYER::PLAYER_ID()) < 1)
  					{
  						if (func_377("TX_OBJ_TIE_DO") || HUD::DOES_BLIP_EXIST(Local_410.f_9))
  						{
  							Local_886.f_27++;
  						}
  						else if (func_376(&Local_410) != 10)
  						{
  							func_239(&Local_410, 10, 1, 0, 1);
  						}
  					}
  				}
  				break;
  			
  			case 1:
  				if (!bLocal_879)
  				{
  					if (func_376(&Local_410) > 10 && func_376(&Local_410) != 15)
  					{
  						func_239(&Local_410, 15, 1, 0, 0);
  						func_308(&Local_410, 10, 0, 0);
  						if (bLocal_885)
  						{
  						}
  					}
  				}
  				else
  				{
  					Local_886.f_27++;
  				}
  				break;
  			
  			case 2:
  				if ((bLocal_879 && iLocal_847 == 0) && !func_191())
  				{
  					if (func_376(&Local_410) > 10 && func_376(&Local_410) != 16)
  					{
  						func_239(&Local_410, 16, 1, 0, 0);
  						func_308(&Local_410, 10, 0, 0);
  						if (bLocal_885)
  						{
  						}
  					}
  				}
  				break;
  			
  			case 3:
  				break;
  			}
  	}
  	func_348(&Local_410, &uLocal_916, &Local_886, 4, bLocal_885);
  }
  
  int func_348(var uParam0, var uParam1, var uParam2, int iParam3, bool bParam4)
  {
  	char cVar0[48];
  	struct<6> Var6;
  	
  	func_359(uParam0, uParam1);
  	if ((*uParam2 == -1 && uParam0->f_410 < 29) && !uParam0->f_109)
  	{
  		if (func_358(uParam1))
  		{
  			*uParam2 = 1;
  			if (bParam4)
  			{
  			}
  		}
  	}
  	if (!uParam0->f_109)
  	{
  		switch (*uParam2)
  		{
  			case 1:
  				if (!func_357(uParam0))
  				{
  					uParam2->f_7 = { func_356(uParam1) };
  					func_193(&(uParam0->f_244), uParam0->f_144, &(uParam2->f_7), 8, 0, 0, 0);
  					*uParam2 = 2;
  					if (bParam4)
  					{
  					}
  				}
  				break;
  			
  			case 2:
  				if (func_191())
  				{
  					uParam2->f_13 = { func_241() };
  					if (MISC::ARE_STRINGS_EQUAL(&(uParam2->f_13), &(uParam2->f_7)))
  					{
  						*uParam2 = 3;
  						if (bParam4)
  						{
  						}
  					}
  					else
  					{
  						*uParam2 = 1;
  					}
  				}
  				break;
  			
  			case 3:
  				if (func_220(uParam0))
  				{
  					if (func_191())
  					{
  						if (AUDIO::IS_ANY_SPEECH_PLAYING(PLAYER::PLAYER_PED_ID()))
  						{
  							uParam2->f_29 = 1;
  						}
  						else
  						{
  							uParam2->f_29 = 0;
  						}
  						func_308(uParam0, 17, 0f, 1);
  						if (uParam0->f_411 == 1)
  						{
  							uParam2->f_1 = { func_345() };
  							func_51();
  						}
  						else
  						{
  							uParam2->f_1 = { func_355() };
  							func_189();
  						}
  						if (PLAYER::GET_PLAYER_WANTED_LEVEL(PLAYER::GET_PLAYER_INDEX()) >= 1)
  						{
  							*uParam2 = 0;
  						}
  						else if (uParam0->f_411 == 1)
  						{
  							*uParam2 = 4;
  						}
  						else
  						{
  							*uParam2 = 6;
  						}
  					}
  				}
  				else if (func_191())
  				{
  					uParam2->f_19 = { func_355() };
  				}
  				else
  				{
  					func_66(&(uParam2->f_26), SYSTEM::ROUND(SYSTEM::POW(2f, SYSTEM::TO_FLOAT(uParam2->f_27))));
  					uParam2->f_27++;
  					func_353(uParam1);
  					func_308(uParam0, 18, 0, 0);
  					*uParam2 = -1;
  					if (bParam4)
  					{
  					}
  					return 1;
  				}
  				break;
  			
  			case 4:
  				if (((!func_177(uParam0, 14) && !func_191()) && !func_220(uParam0)) && func_418(uParam0, 18) > 1f)
  				{
  					func_308(uParam0, 18, 0, 0);
  					*uParam2 = 5;
  					if (bParam4)
  					{
  					}
  				}
  				break;
  			
  			case 5:
  				if ((func_418(uParam0, 18) > 1.5f && !func_191()) && !func_220(uParam0))
  				{
  					StringCopy(&cVar0, uParam0->f_143, 24);
  					if (func_352(uParam2, &cVar0))
  					{
  						func_193(&(uParam0->f_244), uParam0->f_144, &cVar0, 8, 0, 0, 0);
  						func_308(uParam0, 18, 0, 0);
  						*uParam2 = 7;
  					}
  					else
  					{
  						if (uParam2->f_29)
  						{
  							StringConCat(&cVar0, "_resB", 24);
  						}
  						else
  						{
  							StringConCat(&cVar0, "_resA", 24);
  						}
  						Var6 = { cVar0 };
  						func_351(&(uParam2->f_25), iParam3, &cVar0, 1, 1, 0);
  						func_350(&(uParam0->f_244), uParam0->f_144, &Var6, &cVar0, 8, 0, 0);
  						func_308(uParam0, 18, 0, 0);
  						*uParam2 = 6;
  					}
  				}
  				break;
  			
  			case 6:
  				if (!func_191() && func_418(uParam0, 17) > 1f)
  				{
  					if (func_418(uParam0, 18) > 0.5f || uParam0->f_411 == 0)
  					{
  						if (MISC::ARE_STRINGS_EQUAL(&(uParam2->f_19), &(uParam2->f_1)) && uParam0->f_411 != 0)
  						{
  							StringCopy(&(uParam2->f_1), uParam0->f_143, 24);
  							StringConCat(&(uParam2->f_1), "_end1", 24);
  							func_188(&(uParam2->f_1));
  							func_193(&(uParam0->f_244), uParam0->f_144, &(uParam2->f_1), 8, 0, 0, 0);
  							func_183(uParam0, 17, 1);
  							*uParam2 = 7;
  						}
  						else if (!MISC::IS_STRING_NULL_OR_EMPTY(&(uParam2->f_1)))
  						{
  							func_349(&(uParam0->f_244), uParam0->f_144, &(uParam2->f_13), &(uParam2->f_1), 8, 0, 0);
  							if (bParam4)
  							{
  							}
  						}
  						*uParam2 = 3;
  					}
  				}
  				break;
  			
  			case 7:
  				if (!func_191())
  				{
  					func_66(&(uParam2->f_26), SYSTEM::ROUND(SYSTEM::POW(2f, SYSTEM::TO_FLOAT(uParam2->f_27))));
  					uParam2->f_27++;
  					func_353(uParam1);
  					func_308(uParam0, 18, 0, 0);
  					*uParam2 = -1;
  				}
  				break;
  			}
  	}
  	return 0;
  }
  
  int func_349(var uParam0, char* sParam1, char* sParam2, char* sParam3, int iParam4, int iParam5, int iParam6)
  {
  	func_205(uParam0, 145, sParam1, iParam5, iParam6, 0);
  	if (iParam4 > 7)
  	{
  		if (iParam4 < 12)
  		{
  			iParam4 = 7;
  		}
  	}
  	Global_21292 = 0;
  	Global_21299 = 0;
  	Global_21294 = 0;
  	Global_22276 = 0;
  	Global_22278 = 0;
  	Global_22282 = 1;
  	StringCopy(&Global_22289, sParam3, 24);
  	Global_2883585 = 0;
  	return func_194(sParam2, iParam4, 0);
  }
  
  int func_350(var uParam0, char* sParam1, char* sParam2, char* sParam3, int iParam4, int iParam5, int iParam6)
  {
  	func_205(uParam0, 145, sParam1, iParam5, iParam6, 0);
  	if (iParam4 > 7)
  	{
  		if (iParam4 < 12)
  		{
  			iParam4 = 7;
  		}
  	}
  	Global_21292 = 0;
  	Global_21299 = 0;
  	Global_21294 = 0;
  	Global_22276 = 1;
  	Global_22278 = 0;
  	Global_22282 = 0;
  	StringCopy(&Global_22289, sParam3, 24);
  	Global_2883585 = 0;
  	return func_194(sParam2, iParam4, 0);
  }
  
  void func_351(var uParam0, int iParam1, char* sParam2, bool bParam3, bool bParam4, bool bParam5)
  {
  	float fVar0;
  	int iVar1;
  	int iVar2;
  	
  	iVar2 = 0;
  	while (iVar2 < iParam1)
  	{
  		fVar0 = SYSTEM::TO_FLOAT(iVar2);
  		iVar1 = SYSTEM::ROUND(SYSTEM::POW(2f, fVar0));
  		if (!func_287(*uParam0, iVar1))
  		{
  			func_66(uParam0, iVar1);
  			if (bParam5)
  			{
  				if (!bParam4)
  				{
  					StringIntConCat(sParam2, iVar2 + 1, 24);
  					func_188(sParam2);
  				}
  				else
  				{
  					func_188(sParam2);
  				}
  			}
  			else
  			{
  				if (bParam4)
  				{
  					StringConCat(sParam2, "_", 24);
  				}
  				StringIntConCat(sParam2, iVar2 + 1, 24);
  			}
  			if (bParam3)
  			{
  				if (iVar2 == (iParam1 - 1))
  				{
  					*uParam0 = 0;
  				}
  			}
  			return;
  		}
  		iVar2++;
  	}
  }
  
  int func_352(var uParam0, char* sParam1)
  {
  	if (MISC::ARE_STRINGS_EQUAL(&(uParam0->f_13), "txm3_bant1") || MISC::ARE_STRINGS_EQUAL(&(uParam0->f_13), "txm9_bant2"))
  	{
  		StringConCat(sParam1, "_resBn1", 24);
  		return 1;
  	}
  	if ((MISC::ARE_STRINGS_EQUAL(&(uParam0->f_13), "txm6_bant3M") || MISC::ARE_STRINGS_EQUAL(&(uParam0->f_13), "txm6_bant3T")) || MISC::ARE_STRINGS_EQUAL(&(uParam0->f_13), "txm6_bant3F"))
  	{
  		func_65(&(uParam0->f_28), 1);
  		StringConCat(sParam1, "_resBn1", 24);
  		return 1;
  	}
  	return 0;
  }
  
  void func_353(var uParam0)
  {
  	int iVar0;
  	
  	iVar0 = func_354(uParam0);
  	if (iVar0 > -1)
  	{
  		func_22(&((uParam0[iVar0 /*8*/])->f_7), 2);
  		func_22(&((uParam0[iVar0 /*8*/])->f_7), 4);
  		func_65(&((uParam0[iVar0 /*8*/])->f_7), 8);
  		StringCopy(uParam0[iVar0 /*8*/], func_210(), 24);
  	}
  }
  
  int func_354(var uParam0)
  {
  	int iVar0;
  	
  	iVar0 = 0;
  	while (iVar0 < 5)
  	{
  		if (func_24((uParam0[iVar0 /*8*/])->f_7, 4))
  		{
  			return iVar0;
  		}
  		iVar0++;
  	}
  	return -1;
  }
  
  struct<6> func_355()
  {
  	struct<6> Var0;
  	int iVar6;
  	int iVar7;
  	int iVar8;
  	
  	StringCopy(&Var0, "NULL", 24);
  	if (Global_21285 == 4)
  	{
  		iVar6 = AUDIO::GET_CURRENT_SCRIPTED_CONVERSATION_LINE();
  		iVar6 = (iVar6 + Global_22295);
  		iVar7 = iVar6 + 1;
  		if (iVar7 > -1 && iVar6 > -1)
  		{
  			if (HUD::DOES_TEXT_LABEL_EXIST(&(Global_20153[iVar7 /*6*/])))
  			{
  				return Global_20153[iVar7 /*6*/];
  			}
  			else
  			{
  				iVar8 = iVar7;
  				while (iVar8 < 70)
  				{
  					if (HUD::DOES_TEXT_LABEL_EXIST(&(Global_20153[iVar8 /*6*/])))
  					{
  						return Global_20153[iVar8 /*6*/];
  						iVar8 = 70;
  					}
  					iVar8++;
  				}
  				return Var0;
  			}
  			return Global_20153[iVar6 /*6*/];
  		}
  		else
  		{
  			return Var0;
  		}
  	}
  	return Var0;
  }
  
  struct<6> func_356(var uParam0)
  {
  	int iVar0;
  	struct<6> Var1;
  	
  	iVar0 = 0;
  	while (iVar0 < 5)
  	{
  		if (func_24((uParam0[iVar0 /*8*/])->f_7, 2))
  		{
  			Var1 = { *(uParam0[iVar0 /*8*/]) };
  			func_65(&((uParam0[iVar0 /*8*/])->f_7), 4);
  		}
  		iVar0++;
  	}
  	return Var1;
  }
  
  int func_357(var uParam0)
  {
  	switch (uParam0->f_411)
  	{
  		case 0:
  			if (func_222("TX_OBJ_NEX_DO", 0, 0))
  			{
  				return 1;
  			}
  			break;
  		
  		case 1:
  			if (func_222("TX_OBJ_TIE_DO", 0, 0))
  			{
  				return 1;
  			}
  			break;
  		
  		case 2:
  			if (func_222("TX_OBJ_DL_DO", 0, 0))
  			{
  				return 1;
  			}
  			break;
  		
  		case 3:
  			if ((func_222("TX_OBJ_GYB_DO", 0, 0) || func_222("TAXI_OBJ_GYB", 0, 0)) || func_222("TAXI_OBJ_GYB_2", 0, 0))
  			{
  				return 1;
  			}
  			break;
  		
  		case 4:
  			if (func_222("TX_OBJ_TTB_DO", 0, 0))
  			{
  				return 1;
  			}
  			break;
  		
  		case 5:
  			if ((func_222("TX_OBJ_CYI_DO", 0, 0) || func_222("TAXI_OBJ_CYI_01", 0, 0)) || func_222("TAXI_OBJ_CYI_02", 0, 0))
  			{
  				return 1;
  			}
  			break;
  		
  		case 6:
  			if (((func_222("TX_OBJ_GYN_DO", 0, 0) || func_222("TAXI_OBJ_GYN", 0, 0)) || func_222("TAXI_OBJ_GYN_TG", 0, 0)) || func_222("TAXI_OBJ_GYN_GF", 0, 0))
  			{
  				return 1;
  			}
  			break;
  		
  		case 7:
  			if ((func_222("TAXI_OBJ_CC1", 0, 0) || func_222("TAXI_OBJ_CC2", 0, 0)) || func_222("TAXI_OBJ_CC3", 0, 0))
  			{
  				return 1;
  			}
  			break;
  		
  		case 8:
  			if ((func_222("TAXI_OBJ_FTC1", 0, 0) || func_222("TAXI_OBJ_FTC2", 0, 0)) || func_222("TAXI_OBJ_FTC3", 0, 0))
  			{
  				return 1;
  			}
  			break;
  		
  		case 9:
  			if (func_222("TX_OBJ_PRO_DO", 0, 0))
  			{
  				return 1;
  			}
  			break;
  	}
  	return (((((func_222("TAXI_OBJ_GETRUN", 0, 0) || func_222("TAXI_OBJ_DRIVE", 0, 0)) || func_222("TAXI_OBJ_RETURN", 0, 0)) || func_222("TAXI_OBJ_POL", 0, 0)) || func_222("TAXI_OBJ_RUNOUT", 0, 0)) || func_222("TAXI_OBJ_POL", 0, 0));
  }
  
  int func_358(var uParam0)
  {
  	int iVar0;
  	
  	iVar0 = 0;
  	while (iVar0 < 5)
  	{
  		if (func_24((uParam0[iVar0 /*8*/])->f_7, 2))
  		{
  			return 1;
  		}
  		iVar0++;
  	}
  	return 0;
  }
  
  void func_359(var uParam0, var uParam1)
  {
  	struct<3> Var0;
  	char cVar6[48];
  	int iVar12;
  	int iVar13;
  	int iVar14;
  	int iVar15[8];
  	bool bVar24;
  	
  	if (func_357(uParam0))
  	{
  	}
  	else if (!uParam0->f_110)
  	{
  	}
  	else if (func_177(uParam0, 14))
  	{
  		StringCopy(&Var0, uParam0->f_143, 24);
  		switch (func_376(uParam0))
  		{
  			case 55:
  				StringConCat(&Var0, "_lvMe1", 24);
  				cVar6 = { Var0 };
  				func_351(&(uParam0->f_93), 3, &cVar6, 0, 1, 0);
  				func_350(&(uParam0->f_244), uParam0->f_144, &Var0, &cVar6, 8, 0, 0);
  				func_308(uParam0, 16, 0, 0);
  				func_375(4, &(uParam0->f_57), &(uParam0->f_55), &(uParam0->f_124), Var0, 0);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 2:
  				if (!func_191())
  				{
  					if (uParam0->f_115)
  					{
  						StringConCat(&Var0, "_retrn2", 24);
  					}
  					else
  					{
  						StringConCat(&Var0, "_retrn1", 24);
  					}
  					if (uParam0->f_411 != 9)
  					{
  						func_374(uParam0, &Var0, 0, 0, 8);
  					}
  				}
  				else
  				{
  					func_371(uParam0, Var0, func_373(uParam0, 2));
  				}
  				if (func_24(uParam0->f_98, 4))
  				{
  					func_308(uParam0, 16, 0, 0);
  					func_273(uParam0, 0, 0);
  				}
  				func_174(uParam0, &(uParam0->f_98), 4, 3);
  				break;
  			
  			case 3:
  				if (func_418(uParam0, 16) > 1f)
  				{
  					func_176(1);
  					if (uParam0->f_411 == 9)
  					{
  						func_272("TAXI_OBJ_RETURN", 7500, 1);
  					}
  					else
  					{
  						func_272("TAXI_VIP_RETURN", 7500, 1);
  					}
  					func_308(uParam0, 16, 0, 0);
  					func_273(uParam0, 0, 0);
  				}
  				break;
  			
  			case 65:
  				if (uParam0->f_115)
  				{
  					StringConCat(&Var0, "_aggro2", 24);
  				}
  				else
  				{
  					StringConCat(&Var0, "_aggro", 24);
  				}
  				uParam0->f_107++;
  				if (uParam0->f_411 != 9)
  				{
  					func_374(uParam0, &Var0, 0, 1, 8);
  				}
  				else if (!PED::IS_PED_INJURED(uParam0->f_3))
  				{
  					func_268(uParam0->f_3, "TAXI_WHAT_THE_HELL", uParam0->f_145, 4);
  				}
  				break;
  		}
  	}
  	else if ((func_418(uParam0, 16) > func_117(uParam0->f_411 == 0, 1f, 4f) && !uParam0->f_142) && (((uParam0->f_411 == 0 || uParam0->f_411 == 1) && !func_191()) || (uParam0->f_411 != 0 && uParam0->f_411 != 1)))
  	{
  		StringCopy(&Var0, uParam0->f_143, 24);
  		switch (func_376(uParam0))
  		{
  			case 142:
  				if (uParam0->f_115)
  				{
  					StringConCat(&Var0, "_noDri2", 24);
  				}
  				else
  				{
  					StringConCat(&Var0, "_noDri1", 24);
  				}
  				func_374(uParam0, &Var0, 1, 0, 8);
  				break;
  			
  			case 56:
  				StringConCat(&Var0, "_lvMe2", 24);
  				cVar6 = { Var0 };
  				func_351(&(uParam0->f_93), 3, &cVar6, 0, 1, 0);
  				func_350(&(uParam0->f_244), uParam0->f_144, &Var0, &cVar6, 8, 0, 0);
  				func_308(uParam0, 16, 0, 0);
  				func_375(4, &(uParam0->f_57), &(uParam0->f_55), &(uParam0->f_124), Var0, 0);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 0:
  				if (uParam0->f_411 == 9)
  				{
  					func_193(&(uParam0->f_244), "OJTXAUD", "OJTX_PRO_CON", 8, 0, 0, 0);
  				}
  				func_239(uParam0, 1, 1, 0, 0);
  				break;
  			
  			case 1:
  				func_308(uParam0, 16, 0, 0);
  				func_239(uParam0, 4, 0, 0, 0);
  				break;
  			
  			case 4:
  				StringConCat(&Var0, "_hail1", 24);
  				cVar6 = { Var0 };
  				if (!func_24(uParam0->f_44, 128))
  				{
  					if ((uParam0->f_411 == 0 || uParam0->f_411 == 1) || uParam0->f_411 == 4)
  					{
  						func_351(&(uParam0->f_99), 4, &cVar6, 0, 1, 0);
  						func_350(&(uParam0->f_244), uParam0->f_144, &Var0, &cVar6, 8, 0, 0);
  					}
  					else
  					{
  						func_374(uParam0, &Var0, 0, 0, 8);
  					}
  				}
  				func_308(uParam0, 16, 4f, 0);
  				uParam0->f_141 = 1;
  				func_308(uParam0, 16, 0, 0);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 5:
  				if (uParam0->f_411 == 7)
  				{
  					func_272("TAXI_OBJ_GPCKUP", 7500, 1);
  				}
  				else
  				{
  					func_272("TAXI_OBJ_PICKUP", 7500, 1);
  				}
  				uParam0->f_141 = 1;
  				func_308(uParam0, 16, 0, 0);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 8:
  				StringConCat(&Var0, "_obj1", 24);
  				func_374(uParam0, &Var0, 0, 0, 8);
  				if (uParam0->f_411 != 7 && uParam0->f_411 != 4)
  				{
  					if (!HUD::DOES_BLIP_EXIST(uParam0->f_9))
  					{
  						uParam0->f_9 = func_370(uParam0->f_17, 1);
  					}
  					else if (HUD::GET_BLIP_ALPHA(uParam0->f_9) == 0)
  					{
  						HUD::SET_BLIP_ALPHA(uParam0->f_9, 255);
  						HUD::SET_BLIP_COORDS(uParam0->f_9, uParam0->f_17);
  						HUD::SET_BLIP_ROUTE(uParam0->f_9, true);
  					}
  				}
  				func_239(uParam0, 10, 1, 0, 0);
  				uParam0->f_417 = 10;
  				break;
  			
  			case 9:
  				if ((uParam0->f_101 == 1 || uParam0->f_411 == 2) || uParam0->f_411 == 0)
  				{
  					StringConCat(&Var0, "_gret1", 24);
  				}
  				else
  				{
  					switch (uParam0->f_102)
  					{
  						case 1:
  							StringConCat(&Var0, "_gret1", 24);
  							break;
  						
  						case 0:
  							StringConCat(&Var0, "_gret2", 24);
  							break;
  						
  						case 2:
  							StringConCat(&Var0, "_gret3", 24);
  							break;
  						
  						default:
  							StringConCat(&Var0, "_gret4", 24);
  							break;
  						}
  				}
  				func_188(&Var0);
  				if (uParam0->f_411 != 9)
  				{
  					func_374(uParam0, &Var0, 0, 0, 8);
  				}
  				else
  				{
  					func_268(uParam0->f_3, "TAXI_START", uParam0->f_145, 4);
  				}
  				if (uParam0->f_411 != 7 && uParam0->f_411 != 4)
  				{
  					if (!HUD::DOES_BLIP_EXIST(uParam0->f_9))
  					{
  						uParam0->f_9 = func_370(uParam0->f_17, 1);
  					}
  					else if (HUD::GET_BLIP_ALPHA(uParam0->f_9) == 0)
  					{
  						HUD::SET_BLIP_ALPHA(uParam0->f_9, 255);
  						HUD::SET_BLIP_COORDS(uParam0->f_9, uParam0->f_17);
  						HUD::SET_BLIP_ROUTE(uParam0->f_9, true);
  					}
  				}
  				func_239(uParam0, 10, 1, 0, 0);
  				uParam0->f_417 = 10;
  				break;
  			
  			case 7:
  				StringConCat(&Var0, "_dest2", 24);
  				func_369(uParam0, 33554432, Var0, "", 1, 8);
  				func_308(uParam0, 16, 0, 0);
  				func_239(uParam0, 10, 1, 0, 0);
  				uParam0->f_417 = 10;
  				break;
  			
  			case 10:
  				if (!func_191())
  				{
  					func_368(uParam0, 0);
  					func_65(&(uParam0->f_44), 4);
  					func_308(uParam0, 16, 0, 0);
  					func_239(uParam0, 13, 0, 0, 0);
  				}
  				break;
  			
  			case 14:
  				switch (uParam0->f_102)
  				{
  					case 0:
  						StringConCat(&Var0, "_bant2", 24);
  						break;
  					
  					case 1:
  						StringConCat(&Var0, "_bant1", 24);
  						break;
  					
  					case 2:
  						StringConCat(&Var0, "_bant3", 24);
  						break;
  					
  					default:
  						StringConCat(&Var0, "_bant1", 24);
  						break;
  				}
  				func_188(&Var0);
  				func_366(Var0, uParam1);
  				func_308(uParam0, 16, 0, 0);
  				func_308(uParam0, 11, 0, 0);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 15:
  				if (func_418(uParam0, 11) > uParam0->f_36)
  				{
  					if (uParam0->f_411 == 0)
  					{
  						StringConCat(&Var0, "_ban1", 24);
  					}
  					else
  					{
  						StringConCat(&Var0, "_bant1", 24);
  						func_188(&Var0);
  					}
  					func_366(Var0, uParam1);
  					func_65(&(uParam0->f_81), 67108864);
  					func_308(uParam0, 16, 0, 0);
  					func_308(uParam0, 11, 0, 0);
  					func_273(uParam0, 0, 0);
  				}
  				break;
  			
  			case 16:
  				if (func_418(uParam0, 11) > uParam0->f_36)
  				{
  					if (uParam0->f_411 == 0)
  					{
  						StringConCat(&Var0, "_ban2", 24);
  					}
  					else if (uParam0->f_411 == 1)
  					{
  						StringConCat(&Var0, "_banter", 24);
  					}
  					else
  					{
  						StringConCat(&Var0, "_bant2", 24);
  						if (uParam0->f_411 != 6)
  						{
  							func_188(&Var0);
  						}
  					}
  					func_366(Var0, uParam1);
  					func_308(uParam0, 11, 0, 0);
  					func_308(uParam0, 16, 0, 0);
  					func_273(uParam0, 0, 0);
  				}
  				break;
  			
  			case 17:
  				if (uParam0->f_411 == 0)
  				{
  					StringConCat(&Var0, "_ban3", 24);
  				}
  				else
  				{
  					StringConCat(&Var0, "_bant3", 24);
  					func_188(&Var0);
  				}
  				func_366(Var0, uParam1);
  				func_308(uParam0, 16, 0, 0);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 18:
  				if (uParam0->f_411 == 0)
  				{
  					StringConCat(&Var0, "_BAN4", 24);
  				}
  				else
  				{
  					StringConCat(&Var0, "_bant4", 24);
  				}
  				func_188(&Var0);
  				func_366(Var0, uParam1);
  				func_308(uParam0, 16, 0, 0);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 19:
  				if (uParam0->f_411 == 0)
  				{
  					StringConCat(&Var0, "_BAN5", 24);
  				}
  				else
  				{
  					StringConCat(&Var0, "_bant5", 24);
  				}
  				func_188(&Var0);
  				func_366(Var0, uParam1);
  				func_308(uParam0, 16, 0, 0);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 20:
  				StringConCat(&Var0, "_dest2b", 24);
  				func_188(&Var0);
  				func_366(Var0, uParam1);
  				func_308(uParam0, 16, 0, 0);
  				func_308(uParam0, 11, 0, 0);
  				func_273(uParam0, 0, 0);
  				func_65(&(uParam0->f_82), 262144);
  				uParam0->f_36 = 20f;
  				break;
  			
  			case 23:
  				StringConCat(&Var0, "_seePt1", 24);
  				func_374(uParam0, &Var0, 0, 0, 8);
  				func_239(uParam0, 24, 1, 0, 0);
  				break;
  			
  			case 24:
  				uParam0->f_417 = 24;
  				func_308(uParam0, 16, 0, 0);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 90:
  				StringConCat(&Var0, "_talk", 24);
  				StringIntConCat(&Var0, 1, 24);
  				func_188(&Var0);
  				func_374(uParam0, &Var0, 1, 0, 8);
  				break;
  			
  			case 89:
  				switch (uParam0->f_102)
  				{
  					case 0:
  						StringConCat(&Var0, "_deal1", 24);
  						break;
  					
  					case 1:
  						StringConCat(&Var0, "_deal1", 24);
  						break;
  					
  					default:
  						StringConCat(&Var0, "_deal1", 24);
  						break;
  				}
  				func_374(uParam0, &Var0, 0, 0, 8);
  				break;
  			
  			case 91:
  				StringConCat(&Var0, "_ig1c", 24);
  				func_374(uParam0, &Var0, 0, 0, 8);
  				break;
  			
  			case 27:
  				StringConCat(&Var0, "_bTime", 24);
  				if (uParam0->f_411 == 2)
  				{
  					iVar13 = 8;
  				}
  				else
  				{
  					iVar13 = 3;
  				}
  				iVar12 = 0;
  				while (iVar12 < iVar13)
  				{
  					switch (uParam0->f_411)
  					{
  						case 2:
  							switch (iVar12)
  							{
  								case 3:
  								case 5:
  								case 6:
  								case 7:
  									iVar15[iVar12] = 0;
  									break;
  								
  								default:
  									iVar15[iVar12] = 1;
  									break;
  							}
  							break;
  						
  						default:
  							iVar15[iVar12] = 1;
  							break;
  					}
  					iVar12++;
  				}
  				if (uParam0->f_411 == 2)
  				{
  					func_365(&(uParam0->f_90), 8, &Var0, &iVar15, 1, 0);
  				}
  				else
  				{
  					func_365(&(uParam0->f_90), 3, &Var0, &iVar15, 1, 0);
  				}
  				func_366(Var0, uParam1);
  				func_375(0, &(uParam0->f_57), &(uParam0->f_55), &(uParam0->f_124), Var0, 0);
  				func_308(uParam0, 16, 0, 0);
  				func_308(uParam0, 6, 0f, 1);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 26:
  				StringConCat(&Var0, "_gTime", 24);
  				iVar12 = 0;
  				while (iVar12 < 8)
  				{
  					switch (uParam0->f_411)
  					{
  						case 2:
  							switch (iVar12)
  							{
  								case 3:
  								case 4:
  								case 5:
  								case 7:
  									iVar15[iVar12] = 0;
  									break;
  								
  								default:
  									iVar15[iVar12] = 1;
  									break;
  							}
  							break;
  						
  						default:
  							iVar15[iVar12] = 1;
  							break;
  					}
  					iVar12++;
  				}
  				if (uParam0->f_411 == 2)
  				{
  					func_365(&(uParam0->f_89), 8, &Var0, &iVar15, 1, 0);
  				}
  				else
  				{
  					func_365(&(uParam0->f_89), 3, &Var0, &iVar15, 1, 0);
  				}
  				func_366(Var0, uParam1);
  				func_375(0, &(uParam0->f_57), &(uParam0->f_55), &(uParam0->f_124), Var0, 1);
  				func_308(uParam0, 16, 0, 0);
  				func_308(uParam0, 6, 0f, 1);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 12:
  				func_272("TAXI_OBJ_GYB", 3500, 1);
  				func_308(uParam0, 16, 0, 0);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 11:
  				if (uParam0->f_410 == 12 || uParam0->f_410 == 18)
  				{
  					func_272("TAXI_OBJ_GYN_TG", 7500, 1);
  				}
  				else if (uParam0->f_410 < 21)
  				{
  					func_272("TAXI_OBJ_GYN", 7500, 1);
  				}
  				else
  				{
  					func_272("TAXI_OBJ_GYN_GF", 7500, 1);
  				}
  				uParam0->f_417 = 11;
  				uParam0->f_141 = 1;
  				func_308(uParam0, 16, 0, 0);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 28:
  				switch (uParam0->f_102)
  				{
  					case 0:
  						StringConCat(&Var0, "_dest1A", 24);
  						break;
  					
  					case 1:
  						StringConCat(&Var0, "_dest1B", 24);
  						break;
  					
  					default:
  						StringConCat(&Var0, "_dest1A", 24);
  						break;
  				}
  				func_374(uParam0, &Var0, 0, 0, 8);
  				func_239(uParam0, 29, 1, 0, 0);
  				break;
  			
  			case 29:
  				if (!func_24(uParam0->f_98, 268435456))
  				{
  					func_272("TAXI_OBJ_CYI_01", 7500, 1);
  					func_65(&(uParam0->f_98), 268435456);
  				}
  				uParam0->f_417 = 29;
  				func_308(uParam0, 16, 0, 0);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 30:
  				StringConCat(&Var0, "_rCar1", 24);
  				func_188(&Var0);
  				func_366(Var0, uParam1);
  				uParam0->f_124 = { Var0 };
  				func_308(uParam0, 16, 0, 0);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 31:
  				StringConCat(&Var0, "_rCar2", 24);
  				func_188(&Var0);
  				func_366(Var0, uParam1);
  				uParam0->f_124 = { Var0 };
  				func_308(uParam0, 16, 0, 0);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 32:
  				StringConCat(&Var0, "_rCar3", 24);
  				func_188(&Var0);
  				func_366(Var0, uParam1);
  				uParam0->f_124 = { Var0 };
  				func_308(uParam0, 16, 0, 0);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 33:
  				func_272("TAXI_OBJ_CYI_02", 7500, 1);
  				uParam0->f_417 = 33;
  				func_308(uParam0, 16, 0, 0);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 34:
  				if (!func_24(uParam0->f_82, 8192))
  				{
  					if (func_418(uParam0, 11) > uParam0->f_36)
  					{
  						StringConCat(&Var0, "_airBr1", 24);
  						func_188(&Var0);
  						if (uParam0->f_411 == 5)
  						{
  							func_366(Var0, uParam1);
  						}
  						else
  						{
  							func_374(uParam0, &Var0, 0, 0, 8);
  						}
  						func_65(&(uParam0->f_82), 8192);
  						func_308(uParam0, 16, 0, 0);
  						func_308(uParam0, 11, 0, 0);
  						func_273(uParam0, 0, 0);
  					}
  				}
  				break;
  			
  			case 35:
  				if (!func_24(uParam0->f_82, 16384))
  				{
  					StringConCat(&Var0, "_seeD1", 24);
  					func_188(&Var0);
  					func_374(uParam0, &Var0, 0, 0, 8);
  					func_65(&(uParam0->f_82), 16384);
  				}
  				break;
  			
  			case 36:
  				if (!func_24(uParam0->f_82, 32768))
  				{
  					StringConCat(&Var0, "_seeD2", 24);
  					func_188(&Var0);
  					func_374(uParam0, &Var0, 0, 0, 8);
  					func_65(&(uParam0->f_82), 32768);
  				}
  				break;
  			
  			case 37:
  				StringConCat(&Var0, "_done1", 24);
  				func_374(uParam0, &Var0, 0, 0, 8);
  				func_239(uParam0, 46, 1, 0, 0);
  				break;
  			
  			case 138:
  				if (uParam0->f_101 == 1)
  				{
  					StringConCat(&Var0, "_ftc1", 24);
  				}
  				else
  				{
  					switch (uParam0->f_102)
  					{
  						case 1:
  							StringConCat(&Var0, "_ftc1", 24);
  							break;
  						
  						case 0:
  							StringConCat(&Var0, "_ftc2", 24);
  							break;
  						
  						case 2:
  							StringConCat(&Var0, "_ftc3", 24);
  							break;
  						
  						default:
  							StringConCat(&Var0, "_ftc3", 24);
  							break;
  						}
  				}
  				func_188(&Var0);
  				func_374(uParam0, &Var0, 0, 0, 8);
  				func_239(uParam0, 139, 1, 0, 0);
  				uParam0->f_417 = 139;
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 139:
  				func_272("TAXI_OBJ_FTC2", 7500, 1);
  				uParam0->f_417 = 13;
  				func_239(uParam0, 13, 0, 0, 0);
  				break;
  			
  			case 38:
  				StringConCat(&Var0, "_dOff1", 24);
  				cVar6 = { Var0 };
  				iVar14 = MISC::GET_RANDOM_INT_IN_RANGE(0, 120);
  				if (!func_24(uParam0->f_82, 268435456))
  				{
  					if (iVar14 > 80)
  					{
  						StringConCat(&cVar6, "_1", 24);
  					}
  					else if (iVar14 > 40)
  					{
  						StringConCat(&cVar6, "_2", 24);
  					}
  					else
  					{
  						StringConCat(&cVar6, "_3", 24);
  					}
  					func_65(&(uParam0->f_82), 268435456);
  				}
  				else if (iVar14 > 80)
  				{
  					StringConCat(&cVar6, "_4", 24);
  				}
  				else if (iVar14 > 40)
  				{
  					StringConCat(&cVar6, "_5", 24);
  				}
  				else
  				{
  					StringConCat(&cVar6, "_6", 24);
  				}
  				func_350(&(uParam0->f_244), uParam0->f_144, &Var0, &cVar6, 8, 0, 0);
  				func_308(uParam0, 16, 0, 0);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 39:
  				StringConCat(&Var0, "_bdOff1", 24);
  				cVar6 = { Var0 };
  				iVar14 = MISC::GET_RANDOM_INT_IN_RANGE(0, 100);
  				if (!func_24(uParam0->f_82, 268435456))
  				{
  					if (iVar14 < 50)
  					{
  						StringConCat(&cVar6, "_1", 24);
  					}
  					else
  					{
  						StringConCat(&cVar6, "_2", 24);
  					}
  					func_65(&(uParam0->f_82), 268435456);
  				}
  				else if (iVar14 < 50)
  				{
  					StringConCat(&cVar6, "_3", 24);
  				}
  				else
  				{
  					StringConCat(&cVar6, "_4", 24);
  				}
  				func_350(&(uParam0->f_244), uParam0->f_144, &Var0, &cVar6, 8, 0, 0);
  				func_308(uParam0, 16, 0, 0);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 41:
  				StringConCat(&Var0, "_dr2P", 24);
  				func_374(uParam0, &Var0, 0, 0, 8);
  				func_308(uParam0, 16, 0, 0);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 42:
  				StringConCat(&Var0, "_dr2N", 24);
  				func_374(uParam0, &Var0, 0, 0, 8);
  				func_308(uParam0, 16, 0, 0);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 40:
  				StringConCat(&Var0, "_dOff2", 24);
  				func_374(uParam0, &Var0, 0, 0, 8);
  				func_239(uParam0, 44, 1, 0, 0);
  				break;
  			
  			case 44:
  				func_272("TAXI_OBJ_CC2", 7500, 1);
  				uParam0->f_417 = 44;
  				func_273(uParam0, 0, 0);
  				func_239(uParam0, 97, 1, 0, 0);
  				break;
  			
  			case 43:
  				StringConCat(&Var0, "_dOff3", 24);
  				func_374(uParam0, &Var0, 0, 0, 8);
  				func_239(uParam0, 45, 1, 0, 0);
  				break;
  			
  			case 45:
  				if (!func_191())
  				{
  					func_272("TAXI_OBJ_CC3", 7500, 1);
  					uParam0->f_417 = 45;
  					func_273(uParam0, 0, 0);
  					func_239(uParam0, 98, 1, 0, 0);
  				}
  				break;
  			
  			case 46:
  				func_272("TAXI_OBJ_FTC3", 7500, 1);
  				uParam0->f_417 = 46;
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 21:
  				if (!func_24(uParam0->f_81, 1))
  				{
  					func_364(uParam0, 1, Var0, "_sick1", 8);
  					func_22(&(uParam0->f_81), 2);
  				}
  				else if (!func_24(uParam0->f_81, 2))
  				{
  					func_364(uParam0, 2, Var0, "_sick2", 8);
  					func_22(&(uParam0->f_81), 1);
  				}
  				func_375(12, &(uParam0->f_57), &(uParam0->f_55), &(uParam0->f_124), Var0, 0);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 22:
  				if (!func_24(uParam0->f_82, 2097152))
  				{
  					StringConCat(&Var0, "_nopke1", 24);
  				}
  				else if (!func_24(uParam0->f_82, 4194304))
  				{
  					StringConCat(&Var0, "_nopke2", 24);
  				}
  				func_65(&(uParam0->f_81), 2097152);
  				func_374(uParam0, &Var0, 0, 0, 8);
  				func_308(uParam0, 16, 0, 0);
  				func_375(17, &(uParam0->f_57), &(uParam0->f_55), &(uParam0->f_124), Var0, 1);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 61:
  				StringConCat(&Var0, "_Puke1", 24);
  				func_374(uParam0, &Var0, 0, 0, 8);
  				func_375(18, &(uParam0->f_57), &(uParam0->f_55), &(uParam0->f_124), Var0, 0);
  				break;
  			
  			case 63:
  				StringConCat(&Var0, "_PkStp2", 24);
  				func_374(uParam0, &Var0, 0, 0, 8);
  				func_375(20, &(uParam0->f_57), &(uParam0->f_55), &(uParam0->f_124), Var0, 0);
  				func_308(uParam0, 16, 0, 0);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 62:
  				StringConCat(&Var0, "_PkStp1", 24);
  				func_374(uParam0, &Var0, 0, 0, 8);
  				func_375(19, &(uParam0->f_57), &(uParam0->f_55), &(uParam0->f_124), Var0, 0);
  				break;
  			
  			case 64:
  				StringConCat(&Var0, "_PukeR1", 24);
  				func_188(&Var0);
  				func_374(uParam0, &Var0, 0, 0, 8);
  				break;
  			
  			case 71:
  				if (!func_24(uParam0->f_81, 4))
  				{
  					func_364(uParam0, 4, Var0, "_turns1", 8);
  				}
  				else if (!func_24(uParam0->f_81, 8))
  				{
  					func_364(uParam0, 8, Var0, "_turns2", 8);
  				}
  				else
  				{
  					func_364(uParam0, 8, Var0, "_turns3", 8);
  					func_22(&(uParam0->f_81), 4);
  					func_22(&(uParam0->f_81), 8);
  				}
  				func_375(13, &(uParam0->f_57), &(uParam0->f_55), &(uParam0->f_124), Var0, 0);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 72:
  				if (func_363(uParam0))
  				{
  					func_371(uParam0, Var0, func_373(uParam0, 72));
  				}
  				else if (uParam0->f_411 == 9)
  				{
  					if (!PED::IS_PED_INJURED(uParam0->f_3))
  					{
  						func_268(uParam0->f_3, "CRASH_GENERIC", uParam0->f_145, 4);
  					}
  				}
  				else if (uParam0->f_411 == 1)
  				{
  					StringConCat(&Var0, "_carHt", 24);
  					cVar6 = { Var0 };
  					func_351(&(uParam0->f_95), 5, &cVar6, 1, 0, 1);
  					func_193(&(uParam0->f_244), uParam0->f_144, &cVar6, 8, 0, 0, 0);
  				}
  				else
  				{
  					StringConCat(&Var0, "_carHt1", 24);
  					cVar6 = { Var0 };
  					if (uParam0->f_411 == 0)
  					{
  						func_351(&(uParam0->f_95), 8, &cVar6, 1, 1, 0);
  					}
  					else
  					{
  						func_351(&(uParam0->f_95), 5, &cVar6, 1, 1, 0);
  					}
  					func_350(&(uParam0->f_244), uParam0->f_144, &Var0, &cVar6, 8, 0, 0);
  				}
  				func_375(2, &(uParam0->f_57), &(uParam0->f_55), &(uParam0->f_124), cVar6, 0);
  				func_308(uParam0, 16, 0, 0);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 73:
  				StringConCat(&Var0, "_genPnHi", 24);
  				func_374(uParam0, &Var0, 0, 0, 8);
  				break;
  			
  			case 75:
  				if (!func_24(uParam0->f_83, 128))
  				{
  					StringConCat(&Var0, "_nMiss1", 24);
  					func_193(&(uParam0->f_244), uParam0->f_144, &Var0, 8, 0, 0, 0);
  					func_65(&(uParam0->f_83), 128);
  					func_22(&(uParam0->f_83), 256);
  					func_308(uParam0, 16, 0, 0);
  				}
  				else if (!func_24(uParam0->f_83, 256))
  				{
  					StringConCat(&Var0, "_nMiss2", 24);
  					func_193(&(uParam0->f_244), uParam0->f_144, &Var0, 8, 0, 0, 0);
  					func_65(&(uParam0->f_83), 256);
  					func_22(&(uParam0->f_83), 512);
  					func_308(uParam0, 16, 0, 0);
  				}
  				else if (!func_24(uParam0->f_83, 512))
  				{
  					StringConCat(&Var0, "_nMiss3", 24);
  					func_193(&(uParam0->f_244), uParam0->f_144, &Var0, 8, 0, 0, 0);
  					func_65(&(uParam0->f_83), 512);
  					func_22(&(uParam0->f_83), 128);
  					func_308(uParam0, 16, 0, 0);
  				}
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 76:
  				if (uParam0->f_411 == 1 || uParam0->f_411 == 0)
  				{
  					bVar24 = true;
  				}
  				if (!func_24(uParam0->f_83, 1))
  				{
  					StringConCat(&Var0, "_air1", 24);
  					if (bVar24)
  					{
  						func_188(&Var0);
  					}
  					func_193(&(uParam0->f_244), uParam0->f_144, &Var0, 8, 0, 0, 0);
  					func_65(&(uParam0->f_83), 1);
  					func_22(&(uParam0->f_83), 2);
  					func_308(uParam0, 16, 0, 0);
  				}
  				else if (!func_24(uParam0->f_83, 2))
  				{
  					StringConCat(&Var0, "_air2", 24);
  					if (bVar24)
  					{
  						func_188(&Var0);
  					}
  					func_193(&(uParam0->f_244), uParam0->f_144, &Var0, 8, 0, 0, 0);
  					func_65(&(uParam0->f_83), 2);
  					if (uParam0->f_411 == 0)
  					{
  						func_22(&(uParam0->f_83), 4);
  					}
  					else
  					{
  						func_22(&(uParam0->f_83), 1);
  					}
  					func_308(uParam0, 16, 0, 0);
  				}
  				else if (!func_24(uParam0->f_83, 4))
  				{
  					StringConCat(&Var0, "_air3", 24);
  					if (bVar24)
  					{
  						func_188(&Var0);
  					}
  					func_193(&(uParam0->f_244), uParam0->f_144, &Var0, 8, 0, 0, 0);
  					func_65(&(uParam0->f_83), 4);
  					func_22(&(uParam0->f_83), 1);
  					func_308(uParam0, 16, 0, 0);
  				}
  				func_375(11, &(uParam0->f_57), &(uParam0->f_55), &(uParam0->f_124), Var0, 0);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case joaat("mpsv_lp0_31"):
  				if (uParam0->f_411 == 1 || uParam0->f_411 == 0)
  				{
  					bVar24 = true;
  				}
  				if (!func_24(uParam0->f_81, 4096))
  				{
  					func_369(uParam0, 4096, Var0, "_sideW1", bVar24, 8);
  				}
  				else if (!func_24(uParam0->f_81, 8192))
  				{
  					func_369(uParam0, 8192, Var0, "_sideW2", bVar24, 8);
  				}
  				func_375(15, &(uParam0->f_57), &(uParam0->f_55), &(uParam0->f_124), Var0, 0);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 80:
  				if (uParam0->f_411 == 1 || uParam0->f_411 == 0)
  				{
  					bVar24 = true;
  				}
  				if (!func_24(uParam0->f_81, 16384))
  				{
  					func_369(uParam0, 16384, Var0, "_opLne1", bVar24, 8);
  				}
  				else if (!func_24(uParam0->f_81, 32768))
  				{
  					func_369(uParam0, 32768, Var0, "_opLne2", bVar24, 8);
  				}
  				func_375(14, &(uParam0->f_57), &(uParam0->f_55), &(uParam0->f_124), Var0, 0);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 83:
  				if (uParam0->f_411 == 0)
  				{
  					if (!func_24(uParam0->f_82, 8))
  					{
  						func_362(uParam0, 8, Var0, "_bored1", 8, 0);
  					}
  					else if (!func_24(uParam0->f_82, 16))
  					{
  						func_362(uParam0, 16, Var0, "_bored2", 8, 0);
  					}
  					else if (!func_24(uParam0->f_82, 32))
  					{
  						func_362(uParam0, 32, Var0, "_bored3", 8, 0);
  					}
  					func_375(9, &(uParam0->f_57), &(uParam0->f_55), &(uParam0->f_124), Var0, 0);
  					func_273(uParam0, 0, 0);
  				}
  				if (uParam0->f_411 == 1)
  				{
  					StringConCat(&Var0, "_good1", 24);
  					cVar6 = { Var0 };
  					func_351(&(uParam0->f_93), 6, &cVar6, 0, 1, 0);
  					func_350(&(uParam0->f_244), uParam0->f_144, &Var0, &cVar6, 8, 0, 0);
  					func_375(9, &(uParam0->f_57), &(uParam0->f_55), &(uParam0->f_124), Var0, 0);
  					func_308(uParam0, 16, 0, 0);
  					func_273(uParam0, 0, 0);
  				}
  				break;
  			
  			case 92:
  				StringConCat(&Var0, "_EtoB1", 24);
  				cVar6 = { Var0 };
  				func_351(&(uParam0->f_96), 2, &cVar6, 0, 1, 0);
  				func_350(&(uParam0->f_244), uParam0->f_144, &Var0, &cVar6, 8, 0, 0);
  				func_375(9, &(uParam0->f_57), &(uParam0->f_55), &(uParam0->f_124), Var0, 0);
  				func_308(uParam0, 16, 0, 0);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 93:
  				StringConCat(&Var0, "_BtoE1", 24);
  				cVar6 = { Var0 };
  				func_351(&(uParam0->f_97), 2, &cVar6, 0, 1, 0);
  				func_350(&(uParam0->f_244), uParam0->f_144, &Var0, &cVar6, 8, 0, 0);
  				func_375(12, &(uParam0->f_57), &(uParam0->f_55), &(uParam0->f_124), Var0, 0);
  				func_308(uParam0, 16, 0, 0);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 81:
  				if (!func_24(uParam0->f_81, 65536))
  				{
  					func_369(uParam0, 65536, Var0, "_runLit1", 1, 8);
  				}
  				else if (!func_24(uParam0->f_81, 131072))
  				{
  					func_369(uParam0, 131072, Var0, "_runLit2", 1, 8);
  				}
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 82:
  				if (func_363(uParam0))
  				{
  					func_371(uParam0, Var0, func_373(uParam0, 82));
  				}
  				else if (uParam0->f_411 == 9)
  				{
  					if (!PED::IS_PED_INJURED(uParam0->f_3))
  					{
  						func_268(uParam0->f_3, "CAR_HIT_PED_DRIVEN", uParam0->f_145, 4);
  					}
  				}
  				else if (!func_24(uParam0->f_83, 8))
  				{
  					StringConCat(&Var0, "_hitR1", 24);
  					func_188(&Var0);
  					func_193(&(uParam0->f_244), uParam0->f_144, &Var0, 8, 0, 0, 0);
  					func_65(&(uParam0->f_83), 8);
  					func_22(&(uParam0->f_83), 16);
  					func_308(uParam0, 16, 0, 0);
  				}
  				else if (!func_24(uParam0->f_83, 16))
  				{
  					StringConCat(&Var0, "_hitR2", 24);
  					func_188(&Var0);
  					func_193(&(uParam0->f_244), uParam0->f_144, &Var0, 8, 0, 0, 0);
  					func_65(&(uParam0->f_83), 16);
  					func_22(&(uParam0->f_83), 32);
  					func_308(uParam0, 16, 0, 0);
  				}
  				else if (!func_24(uParam0->f_83, 32))
  				{
  					StringConCat(&Var0, "_hitR3", 24);
  					func_188(&Var0);
  					func_193(&(uParam0->f_244), uParam0->f_144, &Var0, 8, 0, 0, 0);
  					func_65(&(uParam0->f_83), 32);
  					if (uParam0->f_411 == 0)
  					{
  						func_22(&(uParam0->f_83), 64);
  					}
  					else
  					{
  						func_22(&(uParam0->f_83), 8);
  					}
  					func_308(uParam0, 16, 0, 0);
  				}
  				else if (!func_24(uParam0->f_83, 64))
  				{
  					StringConCat(&Var0, "_hitR4", 24);
  					func_188(&Var0);
  					func_193(&(uParam0->f_244), uParam0->f_144, &Var0, 8, 0, 0, 0);
  					func_65(&(uParam0->f_83), 64);
  					func_22(&(uParam0->f_83), 8);
  					func_308(uParam0, 16, 0, 0);
  				}
  				func_375(1, &(uParam0->f_57), &(uParam0->f_55), &(uParam0->f_124), Var0, 0);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 65:
  				if (!func_191())
  				{
  					if (uParam0->f_115)
  					{
  						StringConCat(&Var0, "_aggro2", 24);
  					}
  					else
  					{
  						StringConCat(&Var0, "_aggro", 24);
  					}
  					func_374(uParam0, &Var0, 0, 1, 8);
  				}
  				else
  				{
  					func_371(uParam0, Var0, func_373(uParam0, 65));
  					func_273(uParam0, 0, 0);
  				}
  				uParam0->f_107++;
  				break;
  			
  			case 66:
  				if (!func_191())
  				{
  					if (uParam0->f_411 == 4)
  					{
  						StringCopy(&Var0, "tm6_shoot", 24);
  					}
  					else if (uParam0->f_115)
  					{
  						StringConCat(&Var0, "_shootlz", 24);
  					}
  					else
  					{
  						StringConCat(&Var0, "_shoot", 24);
  					}
  					func_374(uParam0, &Var0, 0, 1, 8);
  				}
  				else
  				{
  					func_371(uParam0, Var0, func_373(uParam0, 66));
  					func_273(uParam0, 0, 0);
  				}
  				uParam0->f_107++;
  				break;
  			
  			case 13:
  				if (uParam0->f_411 == 8)
  				{
  					if (!uParam0->f_109 && !func_191())
  					{
  						switch (uParam0->f_414)
  						{
  							case 3:
  								StringConCat(&Var0, "_warnC1", 24);
  								func_374(uParam0, &Var0, 0, 0, 8);
  								break;
  							
  							case 6:
  								StringConCat(&Var0, "_warnF1", 24);
  								func_374(uParam0, &Var0, 0, 0, 8);
  								break;
  							
  							case 1:
  								StringConCat(&Var0, "_far1", 24);
  								func_374(uParam0, &Var0, 0, 0, 8);
  								func_375(21, &(uParam0->f_57), &(uParam0->f_55), &(uParam0->f_124), Var0, 0);
  								break;
  							
  							case 2:
  								StringConCat(&Var0, "_close1", 24);
  								func_374(uParam0, &Var0, 0, 0, 8);
  								func_375(22, &(uParam0->f_57), &(uParam0->f_55), &(uParam0->f_124), Var0, 0);
  								break;
  							
  							case 10:
  								StringConCat(&Var0, "_hit1", 24);
  								func_374(uParam0, &Var0, 0, 0, 8);
  								break;
  							
  							case 8:
  								StringConCat(&Var0, "_good1", 24);
  								cVar6 = { Var0 };
  								func_351(&(uParam0->f_93), 6, &cVar6, 1, 1, 0);
  								func_350(&(uParam0->f_244), uParam0->f_144, &Var0, &cVar6, 8, 0, 0);
  								func_375(23, &(uParam0->f_57), &(uParam0->f_55), &(uParam0->f_124), cVar6, 0);
  								func_308(uParam0, 16, 0, 0);
  								func_273(uParam0, 0, 0);
  								break;
  							
  							case 9:
  								if (!iLocal_64)
  								{
  									StringConCat(&Var0, "_sBant1", 24);
  									cVar6 = { Var0 };
  									func_374(uParam0, &Var0, 0, 0, 8);
  									func_308(uParam0, 16, 0, 0);
  									func_308(uParam0, 11, 0, 0);
  									func_273(uParam0, 0, 0);
  									if (!iLocal_66)
  									{
  										iLocal_64 = 1;
  									}
  								}
  								else
  								{
  									if (!iLocal_65)
  									{
  										StringConCat(&Var0, "_bant3", 24);
  										iLocal_65 = 1;
  									}
  									else
  									{
  										StringConCat(&Var0, "_bant2", 24);
  										iLocal_66 = 1;
  									}
  									func_188(&Var0);
  									func_374(uParam0, &Var0, 0, 0, 8);
  									func_308(uParam0, 16, 0, 0);
  									func_308(uParam0, 11, 0, 0);
  									func_273(uParam0, 0, 0);
  									iLocal_64 = 0;
  								}
  								break;
  							
  							case 7:
  								StringConCat(&Var0, "_done1", 24);
  								func_374(uParam0, &Var0, 0, 0, 8);
  								break;
  						}
  						func_239(uParam0, 143, 0, 0, 0);
  					}
  				}
  				break;
  			
  			case 78:
  				StringConCat(&Var0, "_speed1", 24);
  				cVar6 = { Var0 };
  				func_351(&(uParam0->f_87), 6, &cVar6, 1, 1, 0);
  				func_350(&(uParam0->f_244), uParam0->f_144, &Var0, &cVar6, 8, 0, 0);
  				func_375(10, &(uParam0->f_57), &(uParam0->f_55), &(uParam0->f_124), Var0, 0);
  				func_308(uParam0, 16, 0, 0);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 25:
  				if (!func_24(uParam0->f_82, 1))
  				{
  					func_362(uParam0, 1, Var0, "_close1", 8, 0);
  				}
  				else if (!func_24(uParam0->f_82, 2))
  				{
  					func_362(uParam0, 2, Var0, "_close2", 8, 0);
  				}
  				else if (!func_24(uParam0->f_82, 4))
  				{
  					func_362(uParam0, 4, Var0, "_close3", 8, 0);
  				}
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 48:
  				if (uParam0->f_115)
  				{
  					StringConCat(&Var0, "_stop2", 24);
  				}
  				else
  				{
  					StringConCat(&Var0, "_stop1", 24);
  				}
  				cVar6 = { Var0 };
  				func_351(&(uParam0->f_86), 4, &cVar6, 0, 1, 0);
  				if (uParam0->f_411 != 9)
  				{
  					func_350(&(uParam0->f_244), uParam0->f_144, &Var0, &cVar6, 8, 0, 0);
  				}
  				else if (!PED::IS_PED_INJURED(uParam0->f_3))
  				{
  					func_268(uParam0->f_3, "TAXI_STOPPED", uParam0->f_145, 4);
  				}
  				func_308(uParam0, 16, 0, 0);
  				func_375(5, &(uParam0->f_57), &(uParam0->f_55), &(uParam0->f_124), Var0, 0);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 74:
  				if (func_363(uParam0))
  				{
  					func_371(uParam0, Var0, func_373(uParam0, 74));
  				}
  				else if (uParam0->f_411 == 9)
  				{
  					if (!PED::IS_PED_INJURED(uParam0->f_3))
  					{
  						func_268(uParam0->f_3, "VEHICLE_FLIPPED", uParam0->f_145, 4);
  					}
  				}
  				else
  				{
  					StringConCat(&Var0, "_roll1", 24);
  					func_361(uParam0, Var0, 8);
  				}
  				func_375(3, &(uParam0->f_57), &(uParam0->f_55), &(uParam0->f_124), Var0, 0);
  				func_308(uParam0, 16, 0, 0);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 70:
  				if (!func_24(uParam0->f_83, 1024))
  				{
  					func_65(&(uParam0->f_83), 1024);
  					func_308(uParam0, 16, 0, 0);
  					StringConCat(&Var0, "_swrv1", 24);
  					func_188(&Var0);
  					func_193(&(uParam0->f_244), uParam0->f_144, &Var0, 8, 0, 0, 0);
  				}
  				else if (!func_24(uParam0->f_83, 2048))
  				{
  					func_65(&(uParam0->f_83), 2048);
  					func_308(uParam0, 16, 0, 0);
  					StringConCat(&Var0, "_swrv2", 24);
  					func_188(&Var0);
  					func_193(&(uParam0->f_244), uParam0->f_144, &Var0, 8, 0, 0, 0);
  				}
  				else if (!func_24(uParam0->f_83, 4096))
  				{
  					func_65(&(uParam0->f_83), 4096);
  					func_308(uParam0, 16, 0, 0);
  					StringConCat(&Var0, "_swrv3", 24);
  					func_188(&Var0);
  					func_193(&(uParam0->f_244), uParam0->f_144, &Var0, 8, 0, 0, 0);
  				}
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 69:
  				if (!func_24(uParam0->f_82, 1024))
  				{
  					func_362(uParam0, 1024, Var0, "_rvrs1", 8, 1);
  					func_22(&(uParam0->f_82), 2048);
  				}
  				else if (!func_24(uParam0->f_82, 2048))
  				{
  					func_362(uParam0, 2048, Var0, "_rvrs2", 8, 1);
  				}
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 67:
  				StringConCat(&Var0, "_ofrd1", 24);
  				cVar6 = { Var0 };
  				func_351(&(uParam0->f_88), 4, &cVar6, 0, 1, 0);
  				func_350(&(uParam0->f_244), uParam0->f_144, &Var0, &cVar6, 8, 0, 0);
  				func_375(16, &(uParam0->f_57), &(uParam0->f_55), &(uParam0->f_124), cVar6, 0);
  				func_308(uParam0, 16, 0, 0);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 68:
  				StringConCat(&Var0, "_ofrdch1", 24);
  				func_193(&(uParam0->f_244), uParam0->f_144, &Var0, 9, 0, 0, 0);
  				func_308(uParam0, 16, 0, 0);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 49:
  				StringConCat(&Var0, "_losPol1", 24);
  				func_374(uParam0, &Var0, 0, 0, 8);
  				func_239(uParam0, 52, 1, 0, 0);
  				break;
  			
  			case 50:
  				if (uParam0->f_115)
  				{
  					StringConCat(&Var0, "_lsPo2", 24);
  				}
  				else
  				{
  					StringConCat(&Var0, "_lsPo1", 24);
  				}
  				if (uParam0->f_411 != 9)
  				{
  					func_374(uParam0, &Var0, 0, 0, 8);
  				}
  				else if (!PED::IS_PED_INJURED(uParam0->f_3))
  				{
  					func_268(uParam0->f_3, "POLICE_PURSUIT_DRIVEN", uParam0->f_145, 4);
  				}
  				func_308(uParam0, 16, 0, 0);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 51:
  				if (func_363(uParam0))
  				{
  					if (uParam0->f_411 == 2)
  					{
  						StringConCat(&Var0, "_copBa1", 24);
  						cVar6 = { Var0 };
  						cVar6 = { Var0 };
  						func_374(uParam0, &Var0, 0, 0, 8);
  						func_239(uParam0, 52, 1, 0, 0);
  						func_308(uParam0, 16, 0, 0);
  					}
  					else
  					{
  						if (uParam0->f_411 == 5 && uParam0->f_410 > 9)
  						{
  							StringConCat(&Var0, "_copBa2", 24);
  						}
  						else
  						{
  							StringConCat(&Var0, "_copBa1", 24);
  						}
  						cVar6 = { Var0 };
  						func_374(uParam0, &Var0, 0, 0, 8);
  						func_308(uParam0, 16, 0, 0);
  					}
  				}
  				else
  				{
  					StringConCat(&Var0, "_copBa1", 24);
  					cVar6 = { Var0 };
  					func_351(&(uParam0->f_85), 6, &cVar6, 1, 1, 0);
  					func_350(&(uParam0->f_244), uParam0->f_144, &Var0, &cVar6, 8, 0, 0);
  					func_308(uParam0, 16, 0, 0);
  					func_273(uParam0, 0, 0);
  				}
  				break;
  			
  			case 53:
  				StringConCat(&Var0, "_evdeP1", 24);
  				func_375(8, &(uParam0->f_57), &(uParam0->f_55), &(uParam0->f_124), Var0, 0);
  				func_374(uParam0, &Var0, 0, 0, 8);
  				func_308(uParam0, 10, 0f, 1);
  				break;
  			
  			case 52:
  				if (PLAYER::GET_PLAYER_WANTED_LEVEL(PLAYER::GET_PLAYER_INDEX()) >= 1)
  				{
  					func_272("TAXI_OBJ_POL", 7500, 1);
  					uParam0->f_417 = 52;
  				}
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 54:
  				StringConCat(&Var0, "_cpFz1", 24);
  				func_188(&Var0);
  				func_374(uParam0, &Var0, 0, 0, 8);
  				break;
  			
  			case 84:
  				if (!func_24(uParam0->f_81, 262144))
  				{
  					func_369(uParam0, 262144, Var0, "_rdCh1", 1, 8);
  				}
  				else if (!func_24(uParam0->f_81, 1048576))
  				{
  					if (uParam0->f_411 == 0 || uParam0->f_411 == 1)
  					{
  						func_369(uParam0, 1048576, Var0, "_rdCh2", 1, 8);
  					}
  					else
  					{
  						func_369(uParam0, 1048576, Var0, "_rdCh2", 0, 8);
  					}
  				}
  				func_375(7, &(uParam0->f_57), &(uParam0->f_55), &(uParam0->f_124), Var0, 0);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 85:
  				if (!func_24(uParam0->f_82, 67108864))
  				{
  					if (uParam0->f_418.f_6)
  					{
  						func_360(uParam0, 67108864, Var0, "_rdLk1", 1, 7);
  					}
  				}
  				else if (!func_24(uParam0->f_82, 134217728))
  				{
  					func_360(uParam0, 134217728, Var0, "_rdFv1", 0, 7);
  				}
  				func_375(6, &(uParam0->f_57), &(uParam0->f_55), &(uParam0->f_124), Var0, 0);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 86:
  				StringConCat(&Var0, "_rdneu1", 24);
  				func_374(uParam0, &Var0, 0, 0, 8);
  				break;
  			
  			case 87:
  				StringConCat(&Var0, "_rdtip1", 24);
  				cVar6 = { Var0 };
  				StringConCat(&cVar6, "_", 24);
  				StringIntConCat(&cVar6, uParam0->f_418.f_3, 24);
  				func_350(&(uParam0->f_244), uParam0->f_144, &Var0, &cVar6, 8, 0, 0);
  				func_308(uParam0, 16, 0, 0);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 100:
  				func_272("TAXI_OBJ_GYB_2", 7500, 1);
  				uParam0->f_417 = 100;
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 47:
  				if (uParam0->f_411 == 1)
  				{
  					StringConCat(&Var0, "_horn", 24);
  					func_374(uParam0, &Var0, 0, 0, 8);
  				}
  				break;
  			
  			case 101:
  				StringConCat(&Var0, "_thank1", 24);
  				if ((uParam0->f_411 == 1 || uParam0->f_411 == 5) || uParam0->f_411 == 0)
  				{
  					func_188(&Var0);
  				}
  				func_65(&(uParam0->f_81), 2097152);
  				if (uParam0->f_411 != 9)
  				{
  					func_374(uParam0, &Var0, 0, 0, 8);
  				}
  				break;
  			
  			case 102:
  				StringConCat(&Var0, "_thank2", 24);
  				if ((uParam0->f_411 == 1 || uParam0->f_411 == 5) || uParam0->f_411 == 0)
  				{
  					func_188(&Var0);
  				}
  				func_65(&(uParam0->f_81), 2097152);
  				if (uParam0->f_411 != 9)
  				{
  					func_374(uParam0, &Var0, 0, 0, 8);
  				}
  				break;
  			
  			case 103:
  				if (uParam0->f_411 == 4)
  				{
  					StringConCat(&Var0, "_pissed1", 24);
  				}
  				else
  				{
  					StringConCat(&Var0, "_thank3", 24);
  				}
  				if ((uParam0->f_411 == 1 || uParam0->f_411 == 5) || uParam0->f_411 == 0)
  				{
  					func_188(&Var0);
  				}
  				func_65(&(uParam0->f_81), 2097152);
  				if (uParam0->f_411 != 9)
  				{
  					func_374(uParam0, &Var0, 0, 0, 8);
  				}
  				break;
  			
  			case 97:
  				if (!func_24(uParam0->f_82, 65536))
  				{
  					if (func_418(uParam0, 11) > uParam0->f_36)
  					{
  						switch (uParam0->f_102)
  						{
  							case 0:
  								StringConCat(&Var0, "_ccba2", 24);
  								break;
  							
  							case 1:
  								StringConCat(&Var0, "_ccba1", 24);
  								break;
  							
  							default:
  								StringConCat(&Var0, "_ccba1", 24);
  								break;
  						}
  						func_188(&Var0);
  						func_366(Var0, uParam1);
  						func_65(&(uParam0->f_82), 65536);
  						func_308(uParam0, 16, 0, 0);
  						func_308(uParam0, 11, 0, 0);
  						func_273(uParam0, 0, 0);
  					}
  				}
  				break;
  			
  			case 98:
  				if (!func_24(uParam0->f_82, 131072))
  				{
  					if (func_418(uParam0, 11) > uParam0->f_36)
  					{
  						StringConCat(&Var0, "_ccbb1", 24);
  						func_188(&Var0);
  						func_366(Var0, uParam1);
  						func_65(&(uParam0->f_82), 131072);
  						func_308(uParam0, 16, 0, 0);
  						func_308(uParam0, 11, 0, 0);
  						func_273(uParam0, 0, 0);
  					}
  				}
  				break;
  			
  			case 99:
  				if (!func_24(uParam0->f_82, 8388608))
  				{
  					StringConCat(&Var0, "_close1", 24);
  					func_65(&(uParam0->f_82), 8388608);
  				}
  				else if (!func_24(uParam0->f_82, 16777216))
  				{
  					StringConCat(&Var0, "_close2", 24);
  					func_65(&(uParam0->f_82), 16777216);
  				}
  				else if (!func_24(uParam0->f_82, 33554432))
  				{
  					StringConCat(&Var0, "_close3", 24);
  					func_65(&(uParam0->f_82), 33554432);
  				}
  				func_366(Var0, uParam1);
  				func_308(uParam0, 16, 0, 0);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 58:
  				if (uParam0->f_411 == 6)
  				{
  					StringConCat(&Var0, "_kill1", 24);
  					cVar6 = { Var0 };
  					func_351(&(uParam0->f_93), 6, &cVar6, 1, 1, 1);
  					func_188(&Var0);
  					func_350(&(uParam0->f_244), uParam0->f_144, &Var0, &cVar6, 8, 0, 0);
  				}
  				else if (uParam0->f_411 == 8)
  				{
  					StringConCat(&Var0, "_cheat1", 24);
  					func_374(uParam0, &Var0, 0, 0, 8);
  				}
  				else
  				{
  					StringConCat(&Var0, "_kill1", 24);
  					func_374(uParam0, &Var0, 0, 0, 8);
  				}
  				func_308(uParam0, 16, 0, 0);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 95:
  				StringConCat(&Var0, "_wndw2", 24);
  				func_366(Var0, uParam1);
  				func_308(uParam0, 16, 0, 0);
  				func_308(uParam0, 11, 0, 0);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 94:
  				StringConCat(&Var0, "_wndw0", 24);
  				func_366(Var0, uParam1);
  				func_308(uParam0, 16, 0, 0);
  				func_308(uParam0, 11, 0, 0);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 96:
  				StringConCat(&Var0, "_wndw1", 24);
  				func_366(Var0, uParam1);
  				func_308(uParam0, 16, 0, 0);
  				func_308(uParam0, 11, 0, 0);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 113:
  				StringConCat(&Var0, "_csite1", 24);
  				func_188(&Var0);
  				func_374(uParam0, &Var0, 0, 0, 8);
  				break;
  			
  			case 119:
  				StringConCat(&Var0, "_fair1", 24);
  				func_188(&Var0);
  				func_374(uParam0, &Var0, 0, 0, 8);
  				break;
  			
  			case 115:
  				StringConCat(&Var0, "_AlCk1", 24);
  				cVar6 = { Var0 };
  				func_351(&(uParam0->f_91), 5, &cVar6, 1, 1, 0);
  				func_350(&(uParam0->f_244), uParam0->f_144, &Var0, &cVar6, 8, 0, 0);
  				func_308(uParam0, 16, 0, 0);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 116:
  				StringConCat(&Var0, "_eggG1", 24);
  				cVar6 = { Var0 };
  				func_351(&(uParam0->f_92), 5, &cVar6, 1, 1, 0);
  				func_350(&(uParam0->f_244), uParam0->f_144, &Var0, &cVar6, 8, 0, 0);
  				func_308(uParam0, 16, 0, 0);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 114:
  				StringConCat(&Var0, "_goons1", 24);
  				func_374(uParam0, &Var0, 0, 0, 8);
  				break;
  			
  			case 59:
  				StringConCat(&Var0, "_oRun1", 24);
  				func_374(uParam0, &Var0, 0, 0, 8);
  				break;
  			
  			case 117:
  				StringConCat(&Var0, "_gotG1", 24);
  				func_374(uParam0, &Var0, 0, 0, 8);
  				break;
  			
  			case 118:
  				StringConCat(&Var0, "_getA1", 24);
  				func_374(uParam0, &Var0, 0, 0, 8);
  				break;
  			
  			case 120:
  				StringConCat(&Var0, "_gnawy1", 24);
  				func_374(uParam0, &Var0, 0, 0, 8);
  				break;
  			
  			case 121:
  				StringConCat(&Var0, "_grl1", 24);
  				func_188(&Var0);
  				func_374(uParam0, &Var0, 0, 0, 8);
  				break;
  			
  			case 122:
  				StringConCat(&Var0, "_figt1", 24);
  				func_374(uParam0, &Var0, 0, 0, 8);
  				break;
  			
  			case 123:
  				StringConCat(&Var0, "_gEgg1", 24);
  				func_374(uParam0, &Var0, 0, 0, 8);
  				break;
  			
  			case 124:
  				StringConCat(&Var0, "_gEgg3", 24);
  				func_374(uParam0, &Var0, 0, 0, 8);
  				break;
  			
  			case 125:
  				StringConCat(&Var0, "_gEgg2", 24);
  				func_374(uParam0, &Var0, 0, 0, 8);
  				break;
  			
  			case 126:
  				StringConCat(&Var0, "_gLeav1", 24);
  				func_374(uParam0, &Var0, 0, 0, 8);
  				break;
  			
  			case 127:
  				StringConCat(&Var0, "_aKill1", 24);
  				func_374(uParam0, &Var0, 0, 0, 8);
  				break;
  			
  			case 129:
  				StringConCat(&Var0, "_gHelp1", 24);
  				func_188(&Var0);
  				func_374(uParam0, &Var0, 0, 0, 8);
  				break;
  			
  			case 130:
  				StringConCat(&Var0, "_gDest1", 24);
  				func_374(uParam0, &Var0, 0, 0, 8);
  				func_239(uParam0, 11, 1, 0, 0);
  				break;
  			
  			case 128:
  				StringConCat(&Var0, "_gKO1", 24);
  				func_374(uParam0, &Var0, 0, 0, 8);
  				break;
  			
  			case 132:
  				StringConCat(&Var0, "_gThank1", 24);
  				func_65(&(uParam0->f_81), 2097152);
  				func_374(uParam0, &Var0, 0, 0, 8);
  				break;
  			
  			case 131:
  				StringConCat(&Var0, "_gDriv1", 24);
  				func_188(&Var0);
  				func_366(Var0, uParam1);
  				func_65(&(uParam0->f_81), 67108864);
  				func_308(uParam0, 16, 0, 0);
  				func_308(uParam0, 11, 0, 0);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 60:
  				StringConCat(&Var0, "_cash1", 24);
  				func_374(uParam0, &Var0, 0, 0, 8);
  				break;
  			
  			case 105:
  				if (!func_24(uParam0->f_81, 33554432) && uParam0->f_411 != 9)
  				{
  					func_369(uParam0, 33554432, Var0, "_noPay1", 1, 8);
  				}
  				else if (uParam0->f_411 == 9)
  				{
  					if (!PED::IS_PED_INJURED(uParam0->f_3))
  					{
  						func_268(uParam0->f_3, "TAXI_NO_PAY", uParam0->f_145, 4);
  					}
  				}
  				func_239(uParam0, 108, 1, 0, 0);
  				break;
  			
  			case 106:
  				StringConCat(&Var0, "_foot", 24);
  				func_193(&(uParam0->f_244), uParam0->f_144, &Var0, 9, 0, 0, 0);
  				func_308(uParam0, 16, 0, 0);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 107:
  				if (!func_24(uParam0->f_81, 268435456))
  				{
  					func_369(uParam0, 268435456, Var0, "_kPay1", 1, 8);
  				}
  				func_239(uParam0, 52, 1, 0, 0);
  				break;
  			
  			case 108:
  				func_272("TAXI_OBJ_RUNOUT", 7500, 1);
  				uParam0->f_417 = 108;
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 109:
  				if (!func_24(uParam0->f_81, 4194304))
  				{
  					if (uParam0->f_411 == 2 || uParam0->f_411 == 6)
  					{
  						func_369(uParam0, 4194304, Var0, "_mPay1", 0, 8);
  					}
  					else if (uParam0->f_411 == 9)
  					{
  						if (!PED::IS_PED_INJURED(uParam0->f_3))
  						{
  							func_268(uParam0->f_3, "APOLOGY_NO_TROUBLE", uParam0->f_145, 4);
  						}
  					}
  					else
  					{
  						func_369(uParam0, 4194304, Var0, "_mPay1", 1, 8);
  					}
  				}
  				func_239(uParam0, 111, 1, 0, 0);
  				break;
  			
  			case 111:
  				func_272("TAXI_OBJ_GETRUN", 7500, 1);
  				uParam0->f_417 = 111;
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 110:
  				StringConCat(&Var0, "_runoff", 24);
  				func_193(&(uParam0->f_244), uParam0->f_144, &Var0, 9, 0, 0, 0);
  				func_308(uParam0, 16, 0, 0);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 141:
  				if (!func_24(uParam0->f_81, 16777216))
  				{
  					func_369(uParam0, 16777216, Var0, "_ret1", 1, 8);
  				}
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 88:
  				func_272("TAXI_TIEFLEE", 7500, 1);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 57:
  				if (!func_24(uParam0->f_98, 536870912))
  				{
  					func_272("TAXI_OBJ_CYI_1B", 7500, 1);
  					func_65(&(uParam0->f_98), 536870912);
  				}
  				uParam0->f_417 = 57;
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 104:
  				StringConCat(&Var0, "_joke1", 24);
  				func_188(&Var0);
  				func_374(uParam0, &Var0, 0, 0, 8);
  				break;
  			
  			case 136:
  				if (uParam0->f_115)
  				{
  					StringConCat(&Var0, "_wronglz", 24);
  				}
  				else if (uParam0->f_116)
  				{
  					StringConCat(&Var0, "_wrong2", 24);
  				}
  				else
  				{
  					StringConCat(&Var0, "_wrong", 24);
  				}
  				func_374(uParam0, &Var0, 0, 0, 8);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 140:
  				StringConCat(&Var0, "_shout", 24);
  				func_374(uParam0, &Var0, 0, 0, 8);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 135:
  				if (uParam0->f_411 == 4)
  				{
  					StringCopy(&Var0, "tm6_jack", 24);
  				}
  				else
  				{
  					StringConCat(&Var0, "_jack", 24);
  				}
  				func_374(uParam0, &Var0, 0, 0, 8);
  				func_273(uParam0, 0, 0);
  				break;
  			
  			case 133:
  				StringConCat(&Var0, "_getCar", 24);
  				func_374(uParam0, &Var0, 1, 0, 8);
  				func_239(uParam0, 134, 1, 0, 0);
  				break;
  			
  			case 134:
  				func_272("TX_VIP", 7500, 0);
  				uParam0->f_417 = 134;
  				func_239(uParam0, 0, 0, 0, 0);
  				func_273(uParam0, 0, 0);
  				break;
  			}
  	}
  }
  
  void func_360(var uParam0, int iParam1, struct<3> Param2, var uParam5, var uParam6, var uParam7, char* sParam8, bool bParam9, int iParam10)
  {
  	func_65(&(uParam0->f_82), iParam1);
  	func_308(uParam0, 16, 0, 0);
  	StringConCat(&Param2, sParam8, 24);
  	if (bParam9)
  	{
  		func_188(&Param2);
  	}
  	func_193(&(uParam0->f_244), uParam0->f_144, &Param2, iParam10, 0, 0, 0);
  }
  
  void func_361(var uParam0, struct<6> Param1, int iParam7)
  {
  	char cVar0[24];
  	
  	cVar0 = { Param1 };
  	if (!func_24(uParam0->f_82, 64))
  	{
  		func_65(&(uParam0->f_82), 64);
  		StringConCat(&cVar0, "_1", 24);
  	}
  	else if (!func_24(uParam0->f_82, 128))
  	{
  		func_65(&(uParam0->f_82), 128);
  		StringConCat(&cVar0, "_2", 24);
  	}
  	else
  	{
  		StringConCat(&cVar0, "_", 24);
  		StringIntConCat(&cVar0, MISC::GET_RANDOM_INT_IN_RANGE(1, 3), 24);
  	}
  	func_350(&(uParam0->f_244), uParam0->f_144, &Param1, &cVar0, iParam7, 0, 0);
  	func_308(uParam0, 16, 0, 0);
  }
  
  void func_362(var uParam0, int iParam1, struct<3> Param2, char[4] cParam5, char[4] cParam6, char[4] cParam7, char* sParam8, int iParam9, bool bParam10)
  {
  	func_65(&(uParam0->f_82), iParam1);
  	func_308(uParam0, 16, 0, 0);
  	StringConCat(&Param2, sParam8, 24);
  	if ((((uParam0->f_411 == 1 || uParam0->f_411 == 0) || uParam0->f_411 == 5) || uParam0->f_411 == 8) || uParam0->f_411 == 2)
  	{
  		if (bParam10)
  		{
  			func_188(&Param2);
  		}
  	}
  	func_193(&(uParam0->f_244), uParam0->f_144, &Param2, iParam9, 0, 0, 0);
  }
  
  int func_363(var uParam0)
  {
  	if ((((((uParam0->f_411 == 2 || uParam0->f_411 == 3) || uParam0->f_411 == 4) || uParam0->f_411 == 5) || uParam0->f_411 == 6) || uParam0->f_411 == 7) || uParam0->f_411 == 8)
  	{
  		return 1;
  	}
  	return 0;
  }
  
  void func_364(var uParam0, int iParam1, struct<3> Param2, char[4] cParam5, char[4] cParam6, char[4] cParam7, char* sParam8, int iParam9)
  {
  	func_65(&(uParam0->f_81), iParam1);
  	func_308(uParam0, 16, 0, 0);
  	StringConCat(&Param2, sParam8, 24);
  	func_193(&(uParam0->f_244), uParam0->f_144, &Param2, iParam9, 0, 0, 0);
  }
  
  void func_365(var uParam0, int iParam1, char* sParam2, int iParam3, bool bParam4, bool bParam5)
  {
  	float fVar0;
  	int iVar1;
  	int iVar2;
  	
  	iVar2 = 0;
  	while (iVar2 < iParam1)
  	{
  		fVar0 = SYSTEM::TO_FLOAT(iVar2);
  		iVar1 = SYSTEM::ROUND(SYSTEM::POW(2f, fVar0));
  		if (!func_287(*uParam0, iVar1))
  		{
  			func_66(uParam0, iVar1);
  			if (bParam5)
  			{
  				StringConCat(sParam2, "_", 24);
  			}
  			StringIntConCat(sParam2, iVar2 + 1, 24);
  			if ((*iParam3)[iVar2])
  			{
  				func_188(sParam2);
  			}
  			if (bParam4)
  			{
  				if (iVar2 == (iParam1 - 1))
  				{
  					*uParam0 = 0;
  				}
  			}
  			return;
  		}
  		iVar2++;
  	}
  }
  
  void func_366(char[24] cParam0, var uParam6)
  {
  	int iVar0;
  	
  	iVar0 = func_367(uParam6);
  	if (iVar0 > -1)
  	{
  		*(uParam6[iVar0 /*8*/]) = { cParam0 };
  		func_65(&((uParam6[iVar0 /*8*/])->f_7), 2);
  	}
  }
  
  int func_367(var uParam0)
  {
  	int iVar0;
  	
  	iVar0 = 0;
  	while (iVar0 < 5)
  	{
  		if (MISC::IS_STRING_NULL_OR_EMPTY(uParam0[iVar0 /*8*/]))
  		{
  			return iVar0;
  		}
  		iVar0++;
  	}
  	return -1;
  }
  
  void func_368(var uParam0, bool bParam1)
  {
  	switch (uParam0->f_411)
  	{
  		case 0:
  			if (bParam1)
  			{
  				func_272("TX_OBJ_NEX_PU", 7500, 1);
  			}
  			else
  			{
  				func_272("TX_OBJ_NEX_DO", 7500, 1);
  			}
  			break;
  		
  		case 1:
  			if (bParam1)
  			{
  				func_272("TX_OBJ_TIE_PU", 7500, 1);
  			}
  			else
  			{
  				func_272("TX_OBJ_TIE_DO", 7500, 1);
  			}
  			break;
  		
  		case 2:
  			if (bParam1)
  			{
  				func_272("TX_OBJ_DL_PU", 7500, 1);
  			}
  			else
  			{
  				func_272("TX_OBJ_DL_DO", 7500, 1);
  			}
  			break;
  		
  		case 3:
  			if (bParam1)
  			{
  				func_272("TX_OBJ_GYB_PU", 7500, 1);
  			}
  			else
  			{
  				func_272("TX_OBJ_GYB_DO", 7500, 1);
  			}
  			break;
  		
  		case 4:
  			if (bParam1)
  			{
  				func_272("TX_OBJ_TTB_PU", 7500, 1);
  			}
  			else
  			{
  				func_272("TX_OBJ_TTB_DO", 7500, 1);
  			}
  			break;
  		
  		case 5:
  			if (bParam1)
  			{
  				func_272("TX_OBJ_CYI_PU", 7500, 1);
  			}
  			else
  			{
  				func_272("TX_OBJ_CYI_DO", 7500, 1);
  			}
  			break;
  		
  		case 6:
  			if (bParam1)
  			{
  				func_272("TX_OBJ_GYN_PU", 7500, 1);
  			}
  			else
  			{
  				func_272("TX_OBJ_GYN_DO", 7500, 1);
  			}
  			break;
  		
  		case 7:
  			if (bParam1)
  			{
  				func_272("TX_OBJ_CC_PU", 7500, 1);
  			}
  			else
  			{
  				func_272("TAXI_OBJ_CC1", 7500, 1);
  			}
  			break;
  		
  		case 8:
  			if (bParam1)
  			{
  				func_272("TX_OBJ_FC_PU", 7500, 1);
  			}
  			else
  			{
  				func_272("TAXI_OBJ_FTC1", 7500, 1);
  			}
  			break;
  		
  		case 9:
  			if (bParam1)
  			{
  				func_272("TX_OBJ_PRO_PU", 7500, 1);
  			}
  			else
  			{
  				func_272("TX_OBJ_PRO_DO", 7500, 1);
  			}
  			break;
  	}
  	if (!bParam1)
  	{
  		uParam0->f_139 = 1;
  	}
  }
  
  void func_369(var uParam0, int iParam1, struct<3> Param2, char[4] cParam5, char[4] cParam6, char[4] cParam7, char* sParam8, bool bParam9, int iParam10)
  {
  	func_65(&(uParam0->f_81), iParam1);
  	func_308(uParam0, 16, 0, 0);
  	StringConCat(&Param2, sParam8, 24);
  	if (bParam9)
  	{
  		func_188(&Param2);
  	}
  	func_193(&(uParam0->f_244), uParam0->f_144, &Param2, iParam10, 0, 0, 0);
  }
  
  int func_370(struct<3> Param0, bool bParam3)
  {
  	int iVar0;
  	
  	iVar0 = HUD::ADD_BLIP_FOR_COORD(Param0);
  	HUD::SET_BLIP_SCALE(iVar0, func_117(NETWORK::NETWORK_IS_GAME_IN_PROGRESS(), 1f, 1f));
  	HUD::SET_BLIP_ROUTE(iVar0, bParam3);
  	return iVar0;
  }
  
  void func_371(var uParam0, char[12] cParam1, char[4] cParam4, char[4] cParam5, char[4] cParam6, char* sParam7)
  {
  	func_308(uParam0, 16, 0, 0);
  	func_308(uParam0, 17, 0f, 1);
  	StringConCat(&cParam1, sParam7, 24);
  	if (!PED::IS_PED_INJURED(uParam0->f_3))
  	{
  		AUDIO::INTERRUPT_CONVERSATION(uParam0->f_3, &cParam1, func_372(uParam0));
  	}
  }
  
  char* func_372(var uParam0)
  {
  	char* sVar0;
  	
  	switch (uParam0->f_411)
  	{
  		case 0:
  			sVar0 = "TaxiFelipe";
  			break;
  		
  		case 1:
  			sVar0 = "TaxiOtis";
  			break;
  		
  		case 2:
  			sVar0 = "TaxiKwak";
  			break;
  		
  		case 3:
  			sVar0 = "TaxiWalter";
  			break;
  		
  		case 4:
  			sVar0 = "TaxiMiranda";
  			break;
  		
  		case 5:
  			sVar0 = "TaxiDerrick";
  			break;
  		
  		case 6:
  			sVar0 = "TaxiAlonzo";
  			break;
  		
  		case 7:
  			sVar0 = "TaxiDarren";
  			break;
  		
  		case 8:
  			sVar0 = "TaxiKeyla";
  			break;
  	}
  	return sVar0;
  }
  
  char* func_373(var uParam0, int iParam1)
  {
  	switch (iParam1)
  	{
  		case 72:
  			switch (uParam0->f_411)
  			{
  				case 0:
  					return "_ACRH";
  				
  				case 1:
  					return "_ACRH";
  				
  				case 2:
  					return "_ACAA";
  				
  				case 3:
  					return "_ACRH";
  				
  				case 4:
  					return "_AEAA";
  				
  				case 5:
  					return "_DKAA";
  				
  				case 6:
  					return "_ACAA";
  				
  				case 7:
  					return "_ACAA";
  				
  				case 8:
  					return "_ACRH";
  				
  				default:
  			}
  			return "_ACRH";
  			break;
  		
  		case 82:
  			switch (uParam0->f_411)
  			{
  				case 0:
  					return "_AHIT";
  				
  				case 1:
  					return "_AHIT";
  				
  				case 2:
  					return "_AEAA";
  				
  				case 3:
  					return "_ADAA";
  				
  				case 4:
  					return "_AFAA";
  				
  				case 5:
  					return "_AFAA";
  				
  				case 6:
  					return "_AEAA";
  				
  				case 7:
  					return "_AHAA";
  				
  				case 8:
  					return "_AEAA";
  				
  				default:
  			}
  			return "_AHIT";
  			break;
  		
  		case 74:
  			switch (uParam0->f_411)
  			{
  				case 0:
  					return "_AROL";
  				
  				case 1:
  					return "_AROL";
  				
  				case 2:
  					return "_AHAA";
  				
  				case 3:
  					return "_AROL";
  				
  				case 4:
  					return "_AGAA";
  				
  				case 5:
  					return "_AROL";
  				
  				case 6:
  					return "_AROL";
  				
  				case 7:
  					return "_AROL";
  				
  				case 8:
  					return "_AROL";
  				
  				default:
  			}
  			return "_AROL";
  			break;
  		
  		case 65:
  			switch (uParam0->f_411)
  			{
  				case 0:
  					return "_ABAA";
  				
  				case 1:
  					return "_FUAA";
  				
  				case 2:
  					return "_AFAA";
  				
  				case 3:
  					return "_DBAA";
  				
  				case 4:
  					return "_DLAA";
  				
  				case 5:
  					return "_DKAA";
  				
  				case 6:
  					if (uParam0->f_115)
  					{
  						return "_EEAA";
  					}
  					else
  					{
  						return "_EFAA";
  					}
  					break;
  				
  				case 7:
  					return "_DBAA";
  				
  				case 8:
  					return "_EFAA";
  				
  				default:
  					return "_AROL";
  			}
  			break;
  		
  		case 66:
  			switch (uParam0->f_411)
  			{
  				case 0:
  					return "_AEAA";
  				
  				case 1:
  					return "_ACAA";
  				
  				case 2:
  					return "_AJAA";
  				
  				case 3:
  					return "_AHAA";
  				
  				case 4:
  					return "_AHAA";
  				
  				case 5:
  					return "_AIAA";
  				
  				case 6:
  					if (uParam0->f_115)
  					{
  						return "_AJAA";
  					}
  					else
  					{
  						return "_AGAA";
  					}
  					break;
  				
  				case 7:
  					return "_AUAA";
  				
  				case 8:
  					return "_AHAA";
  				
  				default:
  					return "_AROL";
  			}
  			break;
  		
  		case 2:
  			switch (uParam0->f_411)
  			{
  				case 0:
  					return "_AAAA";
  				
  				case 1:
  					return "_AAAA";
  				
  				case 2:
  					return "_ADAA";
  				
  				case 3:
  					return "_ABAA";
  				
  				case 4:
  					return "_AAAA";
  				
  				case 5:
  					return "_ABAA";
  				
  				case 6:
  					if (uParam0->f_115)
  					{
  						return "_AHAA";
  					}
  					else
  					{
  						return "_ABAA";
  					}
  					break;
  				
  				case 7:
  					return "_BUAA";
  				
  				case 8:
  					return "_ADAA";
  				
  				default:
  					return "_AAAA";
  			}
  			break;
  	}
  	return "_ACRH";
  }
  
  bool func_374(var uParam0, char* sParam1, int iParam2, bool bParam3, int iParam4)
  {
  	func_308(uParam0, 16, 0, 0);
  	if (bParam3)
  	{
  		func_308(uParam0, 17, 0f, 1);
  	}
  	func_273(uParam0, iParam2, 0);
  	return func_193(&(uParam0->f_244), uParam0->f_144, sParam1, iParam4, 0, 0, 0);
  }
  
  void func_375(int iParam0, var uParam1, var uParam2, var uParam3, char[24] cParam4, bool bParam10)
  {
  	if (iParam0 == 0)
  	{
  		if (func_24(*uParam2, 2))
  		{
  			if (!bParam10)
  			{
  				*uParam1 = (*uParam1 - 2);
  			}
  			else
  			{
  				*uParam1 += 3;
  			}
  			*uParam3 = { cParam4 };
  		}
  	}
  	else if (iParam0 == 8)
  	{
  		if (func_24(*uParam2, 1073741824))
  		{
  			*uParam1 += 2;
  			*uParam3 = { cParam4 };
  		}
  	}
  	else if (iParam0 == 1)
  	{
  		if (func_24(*uParam2, 4))
  		{
  			if (!func_24(*uParam2, 4096))
  			{
  				*uParam1 = (*uParam1 - 1);
  				*uParam3 = { cParam4 };
  			}
  			else
  			{
  				func_22(uParam2, 4096);
  			}
  		}
  		else if (func_24(*uParam2, 8))
  		{
  			*uParam1 += 3;
  			*uParam3 = { cParam4 };
  		}
  	}
  	else if (iParam0 == 5)
  	{
  		if (func_24(*uParam2, 512))
  		{
  			if (!func_24(*uParam2, 4096))
  			{
  				*uParam1 = (*uParam1 - 1);
  				*uParam3 = { cParam4 };
  			}
  			else
  			{
  				func_22(uParam2, 4096);
  			}
  		}
  	}
  	else if (iParam0 == 2)
  	{
  		if (func_24(*uParam2, 16))
  		{
  			if (!func_24(*uParam2, 4096))
  			{
  				*uParam1 = (*uParam1 - 1);
  				*uParam3 = { cParam4 };
  			}
  			else
  			{
  				func_22(uParam2, 4096);
  			}
  		}
  		else if (func_24(*uParam2, 32))
  		{
  			*uParam1 += 3;
  			*uParam3 = { cParam4 };
  		}
  	}
  	else if (iParam0 == 3)
  	{
  		if (func_24(*uParam2, 64))
  		{
  			if (!func_24(*uParam2, 4096))
  			{
  				*uParam1 = (*uParam1 - 2);
  				*uParam3 = { cParam4 };
  			}
  			else
  			{
  				func_22(uParam2, 4096);
  			}
  		}
  		else if (func_24(*uParam2, 128))
  		{
  			*uParam1 += 3;
  			*uParam3 = { cParam4 };
  		}
  	}
  	else if (iParam0 == 4)
  	{
  		if (func_24(*uParam2, 256))
  		{
  			*uParam1 = (*uParam1 - 1);
  			*uParam3 = { cParam4 };
  		}
  	}
  	else if (iParam0 == 6)
  	{
  		if (func_24(*uParam2, 1024))
  		{
  			*uParam1 += 2;
  			*uParam3 = { cParam4 };
  		}
  	}
  	else if (iParam0 == 7)
  	{
  		if (func_24(*uParam2, 2048))
  		{
  			*uParam1 = (*uParam1 - 1);
  			*uParam3 = { cParam4 };
  		}
  	}
  	else if (iParam0 == 9)
  	{
  		if (func_24(*uParam2, 8192))
  		{
  			if (func_24(*uParam2, 2097152))
  			{
  				*uParam1 += 3;
  				*uParam3 = { cParam4 };
  			}
  			else if (func_24(*uParam2, 4194304))
  			{
  				*uParam1 = (*uParam1 - 2);
  				*uParam3 = { cParam4 };
  			}
  		}
  	}
  	else if (iParam0 == 10)
  	{
  		if (func_24(*uParam2, 16384))
  		{
  			if (func_24(*uParam2, 4194304))
  			{
  				*uParam1 += 2;
  				*uParam3 = { cParam4 };
  			}
  			else
  			{
  				*uParam1 = (*uParam1 - 2);
  				*uParam3 = { cParam4 };
  			}
  		}
  	}
  	else if (iParam0 == 11)
  	{
  		if (func_24(*uParam2, 32768))
  		{
  			if (func_24(*uParam2, 2097152))
  			{
  				*uParam1 = (*uParam1 - 2);
  				*uParam3 = { cParam4 };
  			}
  			else if (func_24(*uParam2, 4194304))
  			{
  				*uParam1 += 2;
  				*uParam3 = { cParam4 };
  			}
  		}
  	}
  	else if (iParam0 == 12)
  	{
  		if (func_24(*uParam2, 65536))
  		{
  			if (func_24(*uParam2, 2097152))
  			{
  				*uParam1 = (*uParam1 - 2);
  				*uParam3 = { cParam4 };
  			}
  		}
  	}
  	else if (iParam0 == 13)
  	{
  		if (func_24(*uParam2, 131072))
  		{
  			if (func_24(*uParam2, 2097152))
  			{
  				*uParam1 = (*uParam1 - 2);
  				*uParam3 = { cParam4 };
  			}
  			else if (func_24(*uParam2, 4194304))
  			{
  				*uParam1 += 2;
  				*uParam3 = { cParam4 };
  			}
  		}
  	}
  	else if (iParam0 == 14)
  	{
  		if (func_24(*uParam2, 262144))
  		{
  			if (func_24(*uParam2, 2097152))
  			{
  				*uParam1 = (*uParam1 - 2);
  				*uParam3 = { cParam4 };
  			}
  			else if (func_24(*uParam2, 4194304))
  			{
  				*uParam1 += 2;
  				*uParam3 = { cParam4 };
  			}
  		}
  	}
  	else if (iParam0 == 15)
  	{
  		if (func_24(*uParam2, 524288))
  		{
  			if (func_24(*uParam2, 2097152))
  			{
  				*uParam1 = (*uParam1 - 2);
  				*uParam3 = { cParam4 };
  			}
  			else if (func_24(*uParam2, 4194304))
  			{
  				*uParam1 += 2;
  				*uParam3 = { cParam4 };
  			}
  		}
  	}
  	else if (iParam0 == 16)
  	{
  		if (func_24(*uParam2, 1048576))
  		{
  			if (func_24(*uParam2, 2097152))
  			{
  				*uParam1 = (*uParam1 - 2);
  				*uParam3 = { cParam4 };
  			}
  			else if (func_24(*uParam2, 4194304))
  			{
  				*uParam1 += 2;
  				*uParam3 = { cParam4 };
  			}
  		}
  	}
  	else if (iParam0 == 21)
  	{
  		if (func_24(*uParam2, 8388608))
  		{
  			*uParam1 = (*uParam1 - 2);
  			*uParam3 = { cParam4 };
  		}
  	}
  	else if (iParam0 == 22)
  	{
  		if (func_24(*uParam2, 16777216))
  		{
  			*uParam1 = (*uParam1 - 2);
  			*uParam3 = { cParam4 };
  		}
  	}
  	else if (iParam0 == 23)
  	{
  		if (func_24(*uParam2, 33554432))
  		{
  			*uParam1 += 2;
  			*uParam3 = { cParam4 };
  		}
  	}
  	else if (iParam0 == 17)
  	{
  		if (func_24(*uParam2, 67108864))
  		{
  			if (func_24(*uParam2, 67108864))
  			{
  				*uParam1 += 2;
  				*uParam3 = { cParam4 };
  			}
  		}
  	}
  	else if (iParam0 == 18)
  	{
  		if (func_24(*uParam2, 134217728))
  		{
  			*uParam1 = (*uParam1 - 1);
  			*uParam3 = { cParam4 };
  		}
  	}
  	else if (iParam0 == 20)
  	{
  		if (func_24(*uParam2, 536870912))
  		{
  			*uParam1 = (*uParam1 - 1);
  			*uParam3 = { cParam4 };
  		}
  	}
  	else if (iParam0 == 19)
  	{
  		if (func_24(*uParam2, 268435456))
  		{
  			*uParam1++;
  			*uParam3 = { cParam4 };
  		}
  	}
  	else if (iParam0 == 25)
  	{
  		if (func_24(*uParam2, 32768))
  		{
  			*uParam1 = (*uParam1 - 2);
  			*uParam3 = { cParam4 };
  		}
  	}
  }
  
  int func_376(var uParam0)
  {
  	return uParam0->f_416;
  }
  
  int func_377(char* sParam0)
  {
  	if (!MISC::IS_STRING_NULL(sParam0))
  	{
  		if (func_222(sParam0, 0, 0))
  		{
  			return 1;
  		}
  	}
  	return 0;
  }
  
  int func_378(var uParam0)
  {
  	if (func_191())
  	{
  		return 1;
  	}
  	if (func_177(uParam0, 17))
  	{
  		return 1;
  	}
  	if (func_177(uParam0, 14))
  	{
  		return 1;
  	}
  	if (func_220(uParam0))
  	{
  		return 1;
  	}
  	return 0;
  }
  
  bool func_379(var uParam0, var uParam1)
  {
  	return ((*uParam1 == -1 && uParam0->f_412 == 0) && !func_177(uParam0, 9));
  }
  
  bool func_380(var uParam0)
  {
  	return uParam0->f_117;
  }
  
  void func_381(var uParam0)
  {
  	int iVar0;
  	
  	if (uParam0->f_410 >= 5)
  	{
  		if (ENTITY::DOES_ENTITY_EXIST(uParam0->f_4))
  		{
  			if (Local_343.f_0 > 0 && !func_287(Local_343.f_1[4 /*4*/], 4))
  			{
  				iVar0 = 0;
  				iVar0 = 0;
  				while (iVar0 <= (Local_343.f_0 - 1))
  				{
  					if (func_287(Local_343.f_1[iVar0 /*4*/], 2))
  					{
  						Stack.Push(uParam0);
  						Call_Loc(Local_343.f_1[iVar0 /*4*/].f_2);
  						if (StackVal)
  						{
  							if (!func_287(Local_343.f_1[iVar0 /*4*/], 4))
  							{
  								func_66(&(Local_343.f_1[iVar0 /*4*/]), 4);
  								Local_343.f_1[iVar0 /*4*/].f_1 = MISC::GET_GAME_TIMER();
  							}
  						}
  						else
  						{
  							func_23(&(Local_343.f_1[iVar0 /*4*/]), 12);
  						}
  						if (func_287(Local_343.f_1[iVar0 /*4*/], 4) && !func_287(Local_343.f_1[iVar0 /*4*/], 8))
  						{
  							Stack.Push(uParam0);
  							Stack.Push(Local_343.f_1[iVar0 /*4*/].f_1);
  							Call_Loc(Local_343.f_1[iVar0 /*4*/].f_3);
  							if (StackVal)
  							{
  								func_66(&(Local_343.f_1[iVar0 /*4*/]), 8);
  							}
  						}
  					}
  					iVar0++;
  				}
  			}
  		}
  		else
  		{
  			func_341(uParam0, "Taxi Garbage Collected", 18);
  		}
  	}
  }
  
  void func_382(var uParam0, var uParam1, bool bParam2)
  {
  	if (!func_24(uParam0->f_55, 1))
  	{
  		switch (*uParam1)
  		{
  			case 0:
  				if (!MISC::IS_STRING_NULL_OR_EMPTY(&(uParam0->f_124)) && func_191())
  				{
  					*uParam1++;
  				}
  				break;
  			
  			case 1:
  				if (!func_191())
  				{
  					StringCopy(&(uParam0->f_124), func_210(), 24);
  					uParam0->f_56 = (uParam0->f_56 + uParam0->f_57);
  					if (uParam0->f_56 < 0)
  					{
  						uParam0->f_56 = 0;
  					}
  					uParam0->f_57 = 0;
  					*uParam1 = 0;
  					if (bParam2)
  					{
  					}
  				}
  				break;
  			}
  	}
  }
  
  int func_383(var uParam0, var uParam1)
  {
  	var uVar0;
  	
  	if (!func_177(uParam0, 27))
  	{
  		func_216(uParam0, 27);
  		uParam1->f_3 = 250;
  		uParam1->f_2 = 40f;
  	}
  	if (!uParam0->f_109 && func_418(uParam0, 27) > 5f)
  	{
  		if (func_410(uParam0->f_3, uParam0->f_4, uParam1, &uVar0, 0, 1, 0, 1, 1))
  		{
  			func_308(uParam0, 27, 0, 0);
  			func_308(uParam0, 10, 0, 0);
  			func_408(uParam0, &uVar0, uParam1);
  		}
  		func_405(uParam0);
  	}
  	if (uParam0->f_410 >= 3 && uParam0->f_410 <= 5)
  	{
  		func_384(uParam0);
  	}
  	if ((((!PLAYER::IS_PLAYER_CONTROL_ON(PLAYER::PLAYER_ID()) && (CAM::DOES_CAM_EXIST(*uParam0) && !CAM::IS_CAM_ACTIVE(*uParam0))) && (CAM::DOES_CAM_EXIST(uParam0->f_1) && !CAM::IS_CAM_ACTIVE(uParam0->f_1))) && !HUD::IS_MESSAGE_BEING_DISPLAYED()) && !func_191())
  	{
  		if (func_418(uParam0, 26) > 10f)
  		{
  			func_183(uParam0, 26, 0);
  			PLAYER::SET_PLAYER_CONTROL(PLAYER::PLAYER_ID(), true, 0);
  		}
  	}
  	else if (func_177(uParam0, 26))
  	{
  		func_183(uParam0, 26, 0);
  	}
  	return 0;
  }
  
  void func_384(var uParam0)
  {
  	if (!func_404(uParam0->f_429))
  	{
  		uParam0->f_429 = func_403();
  		func_394(&(uParam0->f_429), 0, 0, MISC::GET_RANDOM_INT_IN_RANGE(4, 7), 0, 0, 0);
  	}
  	else if (func_385(uParam0->f_429))
  	{
  		func_341(uParam0, "Player took too long to make pickup", 9);
  	}
  }
  
  bool func_385(int iParam0)
  {
  	return func_386(func_403(), iParam0);
  }
  
  int func_386(int iParam0, int iParam1)
  {
  	int iVar0;
  	int iVar1;
  	
  	if (!func_404(iParam1) || !func_404(iParam0))
  	{
  		return 1;
  	}
  	iVar0 = func_392(iParam0);
  	iVar1 = func_392(iParam1);
  	if (iVar0 > iVar1)
  	{
  		return 1;
  	}
  	else if (iVar0 < iVar1)
  	{
  		return 0;
  	}
  	iVar0 = func_391(iParam0);
  	iVar1 = func_391(iParam1);
  	if (iVar0 > iVar1)
  	{
  		return 1;
  	}
  	else if (iVar0 < iVar1)
  	{
  		return 0;
  	}
  	iVar0 = func_390(iParam0);
  	iVar1 = func_390(iParam1);
  	if (iVar0 > iVar1)
  	{
  		return 1;
  	}
  	else if (iVar0 < iVar1)
  	{
  		return 0;
  	}
  	iVar0 = func_389(iParam0);
  	iVar1 = func_389(iParam1);
  	if (iVar0 > iVar1)
  	{
  		return 1;
  	}
  	else if (iVar0 < iVar1)
  	{
  		return 0;
  	}
  	iVar0 = func_388(iParam0);
  	iVar1 = func_388(iParam1);
  	if (iVar0 > iVar1)
  	{
  		return 1;
  	}
  	else if (iVar0 < iVar1)
  	{
  		return 0;
  	}
  	iVar0 = func_387(iParam0);
  	iVar1 = func_387(iParam1);
  	if (iVar0 > iVar1)
  	{
  		return 1;
  	}
  	return 0;
  }
  
  int func_387(int iParam0)
  {
  	return SYSTEM::SHIFT_RIGHT(iParam0, 20) & 63;
  }
  
  int func_388(int iParam0)
  {
  	return SYSTEM::SHIFT_RIGHT(iParam0, 14) & 63;
  }
  
  int func_389(int iParam0)
  {
  	return SYSTEM::SHIFT_RIGHT(iParam0, 9) & 31;
  }
  
  int func_390(int iParam0)
  {
  	return SYSTEM::SHIFT_RIGHT(iParam0, 4) & 31;
  }
  
  int func_391(int iParam0)
  {
  	return iParam0 & 15;
  }
  
  var func_392(int iParam0)
  {
  	return (SYSTEM::SHIFT_RIGHT(iParam0, 26) & 31 * func_393(MISC::IS_BIT_SET(iParam0, 31), -1, 1)) + 2011;
  }
  
  int func_393(bool bParam0, int iParam1, int iParam2)
  {
  	if (bParam0)
  	{
  		return iParam1;
  	}
  	return iParam2;
  }
  
  void func_394(var uParam0, int iParam1, int iParam2, int iParam3, int iParam4, int iParam5, int iParam6)
  {
  	int iVar0;
  	int iVar1;
  	int iVar2;
  	int iVar3;
  	int iVar4;
  	int iVar5;
  	int iVar6;
  	
  	iVar0 = func_392(*uParam0);
  	iVar1 = func_391(*uParam0);
  	iVar2 = func_390(*uParam0);
  	iVar3 = func_389(*uParam0);
  	iVar4 = func_388(*uParam0);
  	iVar5 = func_387(*uParam0);
  	if (((((iParam6 == 0 && iParam5 == 0) && iParam4 == 0) && iParam3 == 0) && iParam2 == 0) && iParam1 == 0)
  	{
  		return;
  	}
  	if (iParam1 < 0)
  	{
  		return;
  	}
  	if (iParam2 < 0)
  	{
  		return;
  	}
  	if (iParam3 < 0)
  	{
  		return;
  	}
  	if (iParam4 < 0)
  	{
  		return;
  	}
  	if (iParam5 < 0)
  	{
  		return;
  	}
  	if (iParam6 < 0)
  	{
  		return;
  	}
  	iVar5 = (iVar5 + iParam1);
  	while (iVar5 >= 60)
  	{
  		iParam2++;
  		iVar5 = (iVar5 - 60);
  	}
  	iVar4 = (iVar4 + iParam2);
  	while (iVar4 >= 60)
  	{
  		iParam3++;
  		iVar4 = (iVar4 - 60);
  	}
  	iVar3 = (iVar3 + iParam3);
  	while (iVar3 >= 24)
  	{
  		iParam4++;
  		iVar3 = (iVar3 - 24);
  	}
  	iVar2 = (iVar2 + iParam4);
  	iVar6 = func_402(iVar1, iVar0);
  	while (iVar2 > iVar6)
  	{
  		iVar1++;
  		iVar2 = (iVar2 - iVar6);
  		if (iVar1 > 11)
  		{
  			iVar0++;
  			iVar1 = (iVar1 - 12);
  		}
  		iVar6 = func_402(iVar1, iVar0);
  	}
  	iVar1 = (iVar1 + iParam5);
  	while (iVar1 > 11)
  	{
  		iParam6++;
  		iVar1 = (iVar1 - 12);
  	}
  	iVar0 = (iVar0 + iParam6);
  	func_395(uParam0, iVar5, iVar4, iVar3, iVar2, iVar1, iVar0);
  }
  
  void func_395(var uParam0, int iParam1, int iParam2, int iParam3, int iParam4, int iParam5, int iParam6)
  {
  	func_401(uParam0, iParam1);
  	func_400(uParam0, iParam2);
  	func_399(uParam0, iParam3);
  	func_398(uParam0, iParam5);
  	func_397(uParam0, iParam4);
  	func_396(uParam0, iParam6);
  }
  
  void func_396(var uParam0, int iParam1)
  {
  	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_397(var uParam0, int iParam1)
  {
  	int iVar0;
  	int iVar1;
  	
  	iVar0 = func_391(*uParam0);
  	iVar1 = func_392(*uParam0);
  	if (iParam1 < 1 || iParam1 > func_402(iVar0, iVar1))
  	{
  		return;
  	}
  	*uParam0 = (*uParam0 - *uParam0 & 496);
  	*uParam0 = (*uParam0 || SYSTEM::SHIFT_LEFT(iParam1, 4));
  }
  
  void func_398(var uParam0, int iParam1)
  {
  	if (iParam1 < 0 || iParam1 > 11)
  	{
  		return;
  	}
  	*uParam0 = (*uParam0 - *uParam0 & 15);
  	*uParam0 = (*uParam0 || iParam1);
  }
  
  void func_399(var uParam0, int iParam1)
  {
  	if (iParam1 < 0 || iParam1 > 24)
  	{
  		return;
  	}
  	*uParam0 = (*uParam0 - *uParam0 & 15872);
  	*uParam0 = (*uParam0 || SYSTEM::SHIFT_LEFT(iParam1, 9));
  }
  
  void func_400(var uParam0, int iParam1)
  {
  	if (iParam1 < 0 || iParam1 >= 60)
  	{
  		return;
  	}
  	*uParam0 = (*uParam0 - *uParam0 & 1032192);
  	*uParam0 = (*uParam0 || SYSTEM::SHIFT_LEFT(iParam1, 14));
  }
  
  void func_401(var uParam0, int iParam1)
  {
  	if (iParam1 < 0 || iParam1 >= 60)
  	{
  		return;
  	}
  	*uParam0 = (*uParam0 - *uParam0 & 66060288);
  	*uParam0 = (*uParam0 || SYSTEM::SHIFT_LEFT(iParam1, 20));
  }
  
  int func_402(int iParam0, int iParam1)
  {
  	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;
  }
  
  int func_403()
  {
  	var uVar0;
  	
  	func_401(&uVar0, CLOCK::GET_CLOCK_SECONDS());
  	func_400(&uVar0, CLOCK::GET_CLOCK_MINUTES());
  	func_399(&uVar0, CLOCK::GET_CLOCK_HOURS());
  	func_397(&uVar0, CLOCK::GET_CLOCK_DAY_OF_MONTH());
  	func_398(&uVar0, CLOCK::GET_CLOCK_MONTH());
  	func_396(&uVar0, CLOCK::GET_CLOCK_YEAR());
  	return uVar0;
  }
  
  int func_404(int iParam0)
  {
  	int iVar0;
  	int iVar1;
  	int iVar2;
  	int iVar3;
  	int iVar4;
  	int iVar5;
  	
  	if (iParam0 == -15)
  	{
  		return 0;
  	}
  	iVar0 = func_387(iParam0);
  	if (iVar0 < 0 || iVar0 >= 60)
  	{
  		return 0;
  	}
  	iVar1 = func_388(iParam0);
  	if (iVar1 < 0 || iVar1 >= 60)
  	{
  		return 0;
  	}
  	iVar2 = func_389(iParam0);
  	if (iVar2 < 0 || iVar2 > 23)
  	{
  		return 0;
  	}
  	iVar3 = func_392(iParam0);
  	if ((iVar3 <= 0 || iVar3 > 2043) || iVar3 < 1979)
  	{
  		return 0;
  	}
  	iVar4 = func_391(iParam0);
  	if (iVar4 < 0 || iVar4 > 11)
  	{
  		return 0;
  	}
  	iVar5 = func_390(iParam0);
  	if (iVar5 < 1 || iVar5 > func_402(iVar4, iVar3))
  	{
  		return 0;
  	}
  	return 1;
  }
  
  void func_405(var uParam0)
  {
  	var uVar0;
  	
  	if (uParam0->f_410 < 7 && !uParam0->f_138)
  	{
  		if (((uParam0->f_411 == 9 && func_407()) && !func_218(uParam0)) || ((uParam0->f_411 != 9 && func_277(uParam0, 1)) && !func_218(uParam0)))
  		{
  			uVar0 = func_406(uParam0->f_4);
  			ENTITY::SET_ENTITY_AS_NO_LONGER_NEEDED(&uVar0);
  			uParam0->f_4 = PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), false);
  			ENTITY::SET_ENTITY_AS_MISSION_ENTITY(uParam0->f_4, true, false);
  			func_180(uParam0);
  			func_170(uParam0, 0);
  		}
  	}
  }
  
  var func_406(var uParam0)
  {
  	return uParam0;
  }
  
  int func_407()
  {
  	int iVar0;
  	
  	if (!ENTITY::IS_ENTITY_DEAD(PLAYER::PLAYER_PED_ID(), false))
  	{
  		if (PED::IS_PED_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID(), false))
  		{
  			iVar0 = PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), false);
  			if (VEHICLE::IS_VEHICLE_DRIVEABLE(iVar0, false))
  			{
  				if (VEHICLE::GET_PED_IN_VEHICLE_SEAT(iVar0, -1, false) == PLAYER::PLAYER_PED_ID())
  				{
  					if (VEHICLE::IS_VEHICLE_MODEL(iVar0, func_21()))
  					{
  						return 1;
  					}
  				}
  			}
  		}
  	}
  	return 0;
  }
  
  void func_408(var uParam0, var uParam1, var uParam2)
  {
  	switch (*uParam1)
  	{
  		case 1:
  			if (func_409(uParam0, 0, 1))
  			{
  				func_341(uParam0, "Aggro Aiming", 5);
  			}
  			break;
  		
  		case 4:
  			if (func_409(uParam0, 0, 4))
  			{
  				func_341(uParam0, "Aggro Shot Near", 8);
  			}
  			break;
  		
  		case 8:
  			if (func_409(uParam0, 0, 8))
  			{
  				func_341(uParam0, "Aggro Heard Shot", 8);
  			}
  			break;
  		
  		case 16:
  			if (func_409(uParam0, 1, 1))
  			{
  				func_341(uParam0, "Aggro Attacked", 14);
  			}
  			break;
  		
  		case 32:
  			if (func_409(uParam0, 0, 1))
  			{
  				func_341(uParam0, "Aggro Minor Attacked", 8);
  			}
  			break;
  		
  		case 2:
  			if (!func_24(*uParam2, 2) && func_164(uParam0))
  			{
  				func_341(uParam0, "Aggro Went Wanted", 5);
  			}
  			break;
  	}
  }
  
  int func_409(var uParam0, int iParam1, int iParam2)
  {
  	if (((uParam0->f_107 >= 2 && uParam0->f_410 < 29) || uParam0->f_410 <= 5) || (iParam1 && !uParam0->f_114))
  	{
  		return 1;
  	}
  	else if (!ENTITY::IS_ENTITY_DEAD(uParam0->f_3, false))
  	{
  		if (!ENTITY::IS_ENTITY_OCCLUDED(uParam0->f_3))
  		{
  			if (iParam2 == 4)
  			{
  				func_239(uParam0, 66, 1, 0, 1);
  			}
  			else
  			{
  				func_239(uParam0, 65, 1, 0, 1);
  			}
  		}
  	}
  	return 0;
  }
  
  int func_410(int iParam0, int iParam1, var uParam2, var uParam3, bool bParam4, bool bParam5, bool bParam6, int iParam7, bool bParam8)
  {
  	int iVar0;
  	bool bVar1;
  	
  	iVar0 = PLAYER::PLAYER_PED_ID();
  	if (!ENTITY::IS_ENTITY_DEAD(iVar0, false) && !ENTITY::IS_ENTITY_DEAD(iParam0, false))
  	{
  		if (!func_24(*uParam2, 1))
  		{
  			if (func_416(iParam0, uParam2))
  			{
  				*uParam3 = 1;
  				return 1;
  			}
  		}
  		if (!func_24(*uParam2, 2))
  		{
  			if (PLAYER::GET_PLAYER_WANTED_LEVEL(PLAYER::PLAYER_ID()) > 0)
  			{
  				*uParam3 = 2;
  				return 1;
  			}
  		}
  		if (!func_24(*uParam2, 4))
  		{
  			if (func_414(iVar0, iParam0, uParam2, bParam5))
  			{
  				*uParam3 = 4;
  				return 1;
  			}
  		}
  		if (!func_24(*uParam2, 8))
  		{
  			if (func_413(iVar0, iParam0, uParam2))
  			{
  				*uParam3 = 8;
  				return 1;
  			}
  		}
  		bVar1 = !func_24(*uParam2, 128);
  		if (bParam4)
  		{
  			if (func_411(iParam0, iParam1, 1, bParam6, bVar1, 1))
  			{
  				*uParam3 = 32;
  				return 1;
  			}
  		}
  		else if (!func_24(*uParam2, 16))
  		{
  			if (func_411(iParam0, iParam1, 0, bParam6, bVar1, bParam8))
  			{
  				*uParam3 = 16;
  				return 1;
  			}
  		}
  	}
  	else if (ENTITY::DOES_ENTITY_EXIST(iParam0))
  	{
  		if (iParam7 && ENTITY::HAS_ENTITY_BEEN_DAMAGED_BY_ENTITY(iParam0, iVar0, true))
  		{
  			*uParam3 = 16;
  			return 1;
  		}
  	}
  	return 0;
  }
  
  int func_411(int iParam0, int iParam1, bool bParam2, bool bParam3, bool bParam4, bool bParam5)
  {
  	int iVar0;
  	int iVar1;
  	
  	if (bParam3)
  	{
  		if (!bLocal_79)
  		{
  			iLocal_80 = ENTITY::GET_ENTITY_HEALTH(iParam0);
  			bLocal_79 = true;
  		}
  		iLocal_81 = ENTITY::GET_ENTITY_HEALTH(iParam0);
  		iLocal_82 = (iLocal_80 - iLocal_81);
  		iVar0 = PLAYER::GET_PLAYERS_LAST_VEHICLE();
  		if (!ENTITY::IS_ENTITY_DEAD(iVar0, false))
  		{
  			if (ENTITY::HAS_ENTITY_BEEN_DAMAGED_BY_ENTITY(iParam0, iVar0, true))
  			{
  				if (IntToFloat(iLocal_82) > 100f)
  				{
  					return 1;
  				}
  			}
  		}
  		if (bLocal_79)
  		{
  			if (ENTITY::HAS_ENTITY_BEEN_DAMAGED_BY_ENTITY(iParam0, PLAYER::PLAYER_PED_ID(), true))
  			{
  				if (IntToFloat(iLocal_82) > 100f)
  				{
  					return 1;
  				}
  			}
  		}
  	}
  	else if (ENTITY::HAS_ENTITY_BEEN_DAMAGED_BY_ENTITY(iParam0, PLAYER::PLAYER_PED_ID(), true))
  	{
  		return 1;
  	}
  	if (!bParam3)
  	{
  		iVar1 = PLAYER::GET_PLAYERS_LAST_VEHICLE();
  		if (!ENTITY::IS_ENTITY_DEAD(iVar1, false))
  		{
  			if (ENTITY::HAS_ENTITY_BEEN_DAMAGED_BY_ENTITY(iParam0, iVar1, true))
  			{
  				return 1;
  			}
  		}
  	}
  	if (bParam4)
  	{
  		if (!ENTITY::IS_ENTITY_DEAD(iParam0, false))
  		{
  			if (PED::IS_PED_BEING_JACKED(iParam0))
  			{
  				if (PED::GET_PEDS_JACKER(iParam0) == PLAYER::PLAYER_PED_ID())
  				{
  					return 1;
  				}
  			}
  		}
  	}
  	if (bParam5)
  	{
  		if (PED::IS_PED_IN_MELEE_COMBAT(PLAYER::PLAYER_PED_ID()))
  		{
  			if (ENTITY::IS_ENTITY_AT_COORD(iParam0, ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), true), 10f, 10f, 10f, false, true, 0))
  			{
  				if (PLAYER::HAS_PLAYER_DAMAGED_AT_LEAST_ONE_PED(PLAYER::PLAYER_ID()))
  				{
  					return 1;
  				}
  			}
  		}
  	}
  	if (PED::IS_PED_PERFORMING_STEALTH_KILL(PLAYER::PLAYER_PED_ID()))
  	{
  		if (PED::WAS_PED_KILLED_BY_STEALTH(iParam0))
  		{
  			return 1;
  		}
  	}
  	if (func_412(PLAYER::PLAYER_PED_ID(), iParam0))
  	{
  		return 1;
  	}
  	if (bParam2)
  	{
  		if (PED::IS_PED_RAGDOLL(iParam0) && func_168(iParam0, 1) < 1.5f)
  		{
  			return 1;
  		}
  		else if (PED::IS_PED_IN_ANY_VEHICLE(iParam0, false))
  		{
  			if (ENTITY::IS_ENTITY_TOUCHING_ENTITY(PLAYER::PLAYER_PED_ID(), PED::GET_VEHICLE_PED_IS_IN(iParam0, false)))
  			{
  				return 1;
  			}
  		}
  		else if (ENTITY::IS_ENTITY_TOUCHING_ENTITY(PLAYER::PLAYER_PED_ID(), iParam0))
  		{
  			return 1;
  		}
  		if (!ENTITY::IS_ENTITY_DEAD(iParam1, false))
  		{
  			if (ENTITY::HAS_ENTITY_BEEN_DAMAGED_BY_ENTITY(iParam1, PLAYER::PLAYER_PED_ID(), true))
  			{
  				return 1;
  			}
  		}
  	}
  	return 0;
  }
  
  int func_412(int iParam0, int iParam1)
  {
  	int iVar0;
  	
  	WEAPON::GET_CURRENT_PED_WEAPON(iParam0, &iVar0, true);
  	if (iVar0 == joaat("weapon_petrolcan"))
  	{
  		if (PED::IS_PED_SHOOTING(iParam0))
  		{
  			if (SYSTEM::VDIST(ENTITY::GET_ENTITY_COORDS(iParam0, true), ENTITY::GET_ENTITY_COORDS(iParam1, true)) < 2.5f)
  			{
  				if (PED::IS_PED_FACING_PED(iParam0, iParam1, 180f))
  				{
  					return 1;
  				}
  			}
  		}
  	}
  	return 0;
  }
  
  int func_413(int iParam0, int iParam1, var uParam2)
  {
  	if (WEAPON::IS_PED_ARMED(iParam0, 4))
  	{
  		if (PED::IS_PED_SHOOTING(iParam0) && !WEAPON::IS_PED_CURRENT_WEAPON_SILENCED(iParam0))
  		{
  			if (ENTITY::IS_ENTITY_AT_COORD(iParam1, ENTITY::GET_ENTITY_COORDS(iParam0, true), IntToFloat(uParam2->f_4), IntToFloat(uParam2->f_4), IntToFloat(uParam2->f_4), false, true, 0))
  			{
  				return 1;
  			}
  		}
  	}
  	return 0;
  }
  
  int func_414(int iParam0, int iParam1, var uParam2, bool bParam3)
  {
  	struct<3> Var0;
  	int iVar3;
  	
  	iVar3 = 0;
  	if (!ENTITY::IS_ENTITY_DEAD(iParam1, false))
  	{
  		Var0 = { ENTITY::GET_ENTITY_COORDS(iParam1, true) };
  	}
  	if (MISC::IS_BULLET_IN_AREA(Var0, 4f, true))
  	{
  		return 1;
  	}
  	if (MISC::HAS_BULLET_IMPACTED_IN_AREA(Var0, SYSTEM::TO_FLOAT(uParam2->f_6), true, true))
  	{
  		return 1;
  	}
  	if (WEAPON::IS_PED_ARMED(iParam0, 2))
  	{
  		if (PED::IS_PED_SHOOTING(iParam0))
  		{
  			if (ENTITY::IS_ENTITY_AT_COORD(iParam1, ENTITY::GET_ENTITY_COORDS(iParam0, true), IntToFloat(uParam2->f_6 * 3), IntToFloat(uParam2->f_6 * 3), IntToFloat(uParam2->f_6 * 3), false, true, 0))
  			{
  				if (PED::IS_PED_FACING_PED(ENTITY::GET_PED_INDEX_FROM_ENTITY_INDEX(iParam1), iParam0, 120f) && ENTITY::HAS_ENTITY_CLEAR_LOS_TO_ENTITY(iParam1, iParam0, 17))
  				{
  					return 1;
  				}
  			}
  		}
  		else
  		{
  			if (PED::IS_PED_IN_ANY_VEHICLE(ENTITY::GET_PED_INDEX_FROM_ENTITY_INDEX(iParam1), false))
  			{
  				iVar3 = PED::GET_VEHICLE_PED_IS_IN(ENTITY::GET_PED_INDEX_FROM_ENTITY_INDEX(iParam1), false);
  			}
  			if (PED::IS_PED_PLANTING_BOMB(iParam0) || func_415(iVar3))
  			{
  				if (ENTITY::IS_ENTITY_AT_COORD(iParam1, ENTITY::GET_ENTITY_COORDS(iParam0, true), IntToFloat(uParam2->f_6 * 3), IntToFloat(uParam2->f_6 * 3), IntToFloat(uParam2->f_6 * 3), false, true, 0))
  				{
  					if (PED::IS_PED_FACING_PED(ENTITY::GET_PED_INDEX_FROM_ENTITY_INDEX(iParam1), iParam0, 120f) && ENTITY::HAS_ENTITY_CLEAR_LOS_TO_ENTITY(iParam1, iParam0, 17))
  					{
  						return 1;
  					}
  				}
  			}
  		}
  	}
  	if (bParam3)
  	{
  		if (MISC::IS_PROJECTILE_IN_AREA((Var0.f_0 - IntToFloat(uParam2->f_6)), (Var0.f_1 - IntToFloat(uParam2->f_6)), (Var0.f_2 - IntToFloat(uParam2->f_6)), (Var0.f_0 + IntToFloat(uParam2->f_6)), (Var0.f_1 + IntToFloat(uParam2->f_6)), (Var0.f_2 + IntToFloat(uParam2->f_6)), false))
  		{
  			return 1;
  		}
  	}
  	return 0;
  }
  
  int func_415(int iParam0)
  {
  	int iVar0;
  	int iVar1;
  	
  	if (ENTITY::DOES_ENTITY_EXIST(iParam0))
  	{
  		if (VEHICLE::IS_VEHICLE_DRIVEABLE(iParam0, false))
  		{
  			if (VEHICLE::GET_PED_IN_VEHICLE_SEAT(iParam0, -1, false) != 0)
  			{
  				if (WEAPON::GET_CURRENT_PED_WEAPON(PLAYER::PLAYER_PED_ID(), &iVar0, true))
  				{
  					if (iVar0 == joaat("weapon_stickybomb"))
  					{
  						if (func_169(PLAYER::PLAYER_PED_ID(), iParam0, 1) < 40f)
  						{
  							if (PLAYER::GET_ENTITY_PLAYER_IS_FREE_AIMING_AT(PLAYER::PLAYER_ID(), &iVar1))
  							{
  								if ((ENTITY::IS_ENTITY_A_VEHICLE(iVar1) && ENTITY::GET_VEHICLE_INDEX_FROM_ENTITY_INDEX(iVar1) == iParam0) || (ENTITY::IS_ENTITY_A_PED(iVar1) && ENTITY::GET_PED_INDEX_FROM_ENTITY_INDEX(iVar1) == VEHICLE::GET_PED_IN_VEHICLE_SEAT(iParam0, -1, false)))
  								{
  									if ((PED::IS_PED_ON_FOOT(PLAYER::PLAYER_PED_ID()) && PAD::IS_CONTROL_PRESSED(0, 24)) || (PED::IS_PED_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID(), false) && PAD::IS_CONTROL_PRESSED(0, 69)))
  									{
  										return 1;
  									}
  								}
  							}
  						}
  					}
  				}
  			}
  		}
  	}
  	return 0;
  }
  
  int func_416(int iParam0, var uParam1)
  {
  	if (!ENTITY::IS_ENTITY_DEAD(iParam0, false))
  	{
  		if (WEAPON::IS_PED_ARMED(PLAYER::PLAYER_PED_ID(), 6))
  		{
  			if (PLAYER::IS_PLAYER_FREE_AIMING_AT_ENTITY(PLAYER::PLAYER_ID(), iParam0) || PLAYER::IS_PLAYER_TARGETTING_ENTITY(PLAYER::PLAYER_ID(), iParam0))
  			{
  				if (PED::IS_PED_FACING_PED(iParam0, PLAYER::PLAYER_PED_ID(), 90f))
  				{
  					if (func_168(iParam0, 1) < uParam1->f_2)
  					{
  						if (uParam1->f_1 == 0)
  						{
  							uParam1->f_1 = MISC::GET_GAME_TIMER();
  						}
  						else if ((MISC::GET_GAME_TIMER() - uParam1->f_1) > uParam1->f_3)
  						{
  							return 1;
  						}
  					}
  				}
  			}
  		}
  	}
  	return 0;
  }
  
  void func_417(var uParam0)
  {
  	if (!func_24(uParam0->f_98, 2))
  	{
  		if (VEHICLE::IS_VEHICLE_DRIVEABLE(uParam0->f_4, false))
  		{
  			if (func_10(uParam0->f_4, uParam0->f_17, 1) < 180f)
  			{
  				MISC::CLEAR_AREA_OF_VEHICLES(uParam0->f_17, 25f, false, false, false, false, false, false, 0);
  				func_65(&(uParam0->f_98), 2);
  			}
  		}
  	}
  }
  
  float func_418(var uParam0, int iParam1)
  {
  	if (!func_16(&(uParam0->f_146[iParam1 /*3*/])))
  	{
  		func_217(&(uParam0->f_146[iParam1 /*3*/]));
  	}
  	return func_105(&(uParam0->f_146[iParam1 /*3*/]));
  }
  
  void func_419()
  {
  	func_420(&Local_410);
  	func_437();
  }
  
  void func_420(var uParam0)
  {
  	func_11(0, uParam0, 1);
  	if (uParam0->f_411 != 9)
  	{
  		func_438(2);
  	}
  }
  
  int func_421(var uParam0, bool bParam1)
  {
  	if (bParam1)
  	{
  		return 1;
  	}
  	if ((((!func_191() && func_418(uParam0, 3) > 1f) || uParam0->f_415 == 18) || uParam0->f_415 == 14) || uParam0->f_415 == 15)
  	{
  		if (!ENTITY::IS_ENTITY_DEAD(uParam0->f_3, false))
  		{
  			if (VEHICLE::IS_VEHICLE_DRIVEABLE(uParam0->f_4, false))
  			{
  				if (PED::IS_PED_IN_VEHICLE(uParam0->f_3, uParam0->f_4, false))
  				{
  					if (func_64(uParam0) == 0 || func_287(uParam0->f_85, 32))
  					{
  						if (!VEHICLE::IS_VEHICLE_STOPPED(uParam0->f_4))
  						{
  							func_152(uParam0, 4160, 0);
  						}
  						else
  						{
  							func_152(uParam0, 0, 0);
  						}
  						return 1;
  					}
  					else
  					{
  						func_152(uParam0, 0, 0);
  						return 1;
  					}
  				}
  				else
  				{
  					func_152(uParam0, 0, 0);
  					return 1;
  				}
  			}
  			else
  			{
  				func_152(uParam0, 0, 0);
  				return 1;
  			}
  		}
  		else
  		{
  			return 1;
  		}
  	}
  	else if ((MISC::GET_GAME_TIMER() % 1000) < 50)
  	{
  	}
  	return 0;
  }
  
  void func_422(var uParam0)
  {
  	if (HUD::DOES_BLIP_EXIST(uParam0->f_8))
  	{
  		HUD::REMOVE_BLIP(&(uParam0->f_8));
  	}
  	if (HUD::DOES_BLIP_EXIST(uParam0->f_9))
  	{
  		HUD::REMOVE_BLIP(&(uParam0->f_9));
  	}
  	if (HUD::DOES_BLIP_EXIST(uParam0->f_10))
  	{
  		HUD::REMOVE_BLIP(&(uParam0->f_10));
  	}
  }
  
  int func_423(var uParam0)
  {
  	if (uParam0->f_109 && uParam0->f_410 < 29)
  	{
  		return 1;
  	}
  	return 0;
  }
  
  void func_424()
  {
  	func_426(&Local_410, 1);
  	Local_410.f_410 = 0;
  	func_425(&Local_410, 2, 4);
  	Local_410.f_23 = { 31.3927f, 229.9863f, 108.45f };
  	Local_410.f_33 = 340.5f;
  	Local_410.f_26 = { -1239.992f, -902.0005f, 10.8342f };
  	Local_410.f_34 = 305.2155f;
  	Local_410.f_29 = { -1224.093f, -907.3411f, 11.3263f };
  }
  
  void func_425(var uParam0, int iParam1, int iParam2)
  {
  	uParam0->f_58 = iParam1;
  	uParam0->f_59 = iParam2;
  }
  
  void func_426(var uParam0, int iParam1)
  {
  	func_436(1);
  	func_182();
  	func_7(&(uParam0->f_244));
  	func_435(uParam0);
  	uParam0->f_411 = iParam1;
  	if (!func_24(Global_112915.f_19097, 4))
  	{
  		func_65(&(Global_112915.f_19097), 4);
  	}
  	func_430(uParam0);
  	func_428(uParam0);
  	PED::SET_PED_CONFIG_FLAG(PLAYER::PLAYER_PED_ID(), 32, false);
  	uParam0->f_102 = (func_427(uParam0->f_411) % uParam0->f_101);
  	uParam0->f_80 = 0;
  	uParam0->f_428 = func_2();
  	HUD::REQUEST_ADDITIONAL_TEXT("TAXI", 2);
  }
  
  int func_427(int iParam0)
  {
  	return Global_112915.f_19097.f_39[iParam0];
  }
  
  void func_428(var uParam0)
  {
  	switch (func_64(uParam0))
  	{
  		case 0:
  			func_429(uParam0, "EXC", "Txm2", "Txm2aud");
  			uParam0->f_101 = 2;
  			break;
  		
  		case 1:
  			func_429(uParam0, "TIE", "Txm1", "txm1aud");
  			uParam0->f_101 = 1;
  			break;
  		
  		case 2:
  			func_429(uParam0, "DED", "Txm3", "Txm3aud");
  			uParam0->f_101 = 1;
  			break;
  		
  		case 3:
  			func_429(uParam0, "GYB", "Txm12", "Txm12au");
  			uParam0->f_101 = 2;
  			break;
  		
  		case 4:
  			func_429(uParam0, "TTB", "Txm6", "Txm6aud");
  			uParam0->f_101 = 2;
  			break;
  		
  		case 5:
  			func_429(uParam0, "CUI", "Txm8", "Txm8aud");
  			uParam0->f_101 = 1;
  			break;
  		
  		case 6:
  			func_429(uParam0, "GYN", "Txm9", "Txm9aud");
  			uParam0->f_101 = 1;
  			break;
  		
  		case 7:
  			func_429(uParam0, "TCC", "Txm10", "Txm10au");
  			uParam0->f_101 = 2;
  			break;
  		
  		case 8:
  			func_429(uParam0, "TFC", "Txm4", "Txm4aud");
  			uParam0->f_101 = 1;
  			break;
  		
  		case 9:
  			func_429(uParam0, "PRO", "txmP", "TxmPaud");
  			uParam0->f_101 = 1;
  			break;
  	}
  }
  
  void func_429(var uParam0, char* sParam1, char* sParam2, char* sParam3)
  {
  	uParam0->f_122 = sParam1;
  	uParam0->f_143 = sParam2;
  	uParam0->f_144 = sParam3;
  }
  
  void func_430(var uParam0)
  {
  	int iVar0;
  	
  	switch (uParam0->f_411)
  	{
  		case 0:
  			func_434(uParam0, 3);
  			func_433(uParam0, 14);
  			break;
  		
  		case 1:
  			func_434(uParam0, 14);
  			func_433(uParam0, 8);
  			break;
  		
  		case 2:
  			func_434(uParam0, 8);
  			func_433(uParam0, 7);
  			break;
  		
  		case 3:
  			func_434(uParam0, 15);
  			func_433(uParam0, 6);
  			break;
  		
  		case 4:
  			func_434(uParam0, 0);
  			func_433(uParam0, 3);
  			break;
  		
  		case 5:
  			func_434(uParam0, 6);
  			func_433(uParam0, 7);
  			break;
  		
  		case 6:
  			func_434(uParam0, 8);
  			func_433(uParam0, 15);
  			break;
  		
  		case 7:
  			func_434(uParam0, 8);
  			func_433(uParam0, 14);
  			break;
  		
  		case 8:
  			func_434(uParam0, 7);
  			func_433(uParam0, 15);
  			break;
  		
  		case 9:
  			func_434(uParam0, MISC::GET_RANDOM_INT_IN_RANGE(0, 17));
  			iVar0 = func_432((uParam0->f_418.f_2 + MISC::GET_RANDOM_INT_IN_RANGE(1, 17)), 0, 16);
  			func_433(uParam0, iVar0);
  			func_431(uParam0);
  			uParam0->f_418.f_7 = 1;
  			uParam0->f_418.f_8 = 1;
  			break;
  	}
  }
  
  void func_431(var uParam0)
  {
  	switch (uParam0->f_418.f_2)
  	{
  		case 2:
  		case 8:
  			uParam0->f_418.f_3 = 1;
  			break;
  		
  		case 0:
  		case 3:
  		case 5:
  		case 9:
  		case 15:
  			uParam0->f_418.f_3 = 2;
  			break;
  		
  		case 4:
  		case 10:
  			uParam0->f_418.f_3 = 3;
  			break;
  		
  		case 1:
  		case 6:
  		case 13:
  			uParam0->f_418.f_3 = 4;
  			break;
  		
  		case 11:
  			uParam0->f_418.f_3 = 5;
  			break;
  		
  		case 12:
  		case 14:
  			uParam0->f_418.f_3 = 6;
  			break;
  		
  		case 7:
  			uParam0->f_418.f_3 = 7;
  			break;
  	}
  }
  
  int func_432(int iParam0, int iParam1, int iParam2)
  {
  	int iVar0;
  	int iVar1;
  	int iVar2;
  	int iVar3;
  	
  	if (iParam1 > iParam2)
  	{
  		return -1;
  	}
  	if (iParam0 >= iParam1 && iParam0 <= iParam2)
  	{
  		return iParam0;
  	}
  	iVar0 = 0;
  	if (iParam0 < iParam1)
  	{
  		if (iParam0 < 0)
  		{
  			iVar0 = -iParam0;
  		}
  	}
  	else if (iParam1 < 0)
  	{
  		iVar0 = -iParam1;
  	}
  	iParam0 = (iParam0 + iVar0);
  	iParam1 = (iParam1 + iVar0);
  	iParam2 = (iParam2 + iVar0);
  	iVar1 = (iParam2 - iParam1);
  	if (iParam0 > iParam2)
  	{
  		iVar2 = (iParam0 - iParam2);
  		iVar3 = (iVar2 % iVar1);
  		iParam0 = (iParam1 + iVar3);
  	}
  	else
  	{
  		iVar2 = (iParam1 - iParam0);
  		iVar3 = (iVar2 % iVar1);
  		iParam0 = (iParam2 - iVar3);
  	}
  	return (iParam0 - iVar0);
  }
  
  void func_433(var uParam0, int iParam1)
  {
  	uParam0->f_418.f_1 = iParam1;
  }
  
  void func_434(var uParam0, int iParam1)
  {
  	uParam0->f_418.f_2 = iParam1;
  }
  
  void func_435(var uParam0)
  {
  	uParam0->f_2 = PLAYER::PLAYER_PED_ID();
  	uParam0->f_3 = 0;
  	uParam0->f_4 = 0;
  	uParam0->f_14 = { func_43() };
  	uParam0->f_17 = { func_43() };
  	uParam0->f_35 = 0f;
  	uParam0->f_76 = 0;
  	uParam0->f_49 = 0;
  	uParam0->f_109 = 0;
  	uParam0->f_36 = 0f;
  	uParam0->f_410 = 2;
  	uParam0->f_123 = "TRS_FINDING_LOCATION";
  	func_183(uParam0, 32, 0);
  }
  
  void func_436(bool bParam0)
  {
  	if (bParam0)
  	{
  		StringCopy(&Global_111971, SCRIPT::GET_THIS_SCRIPT_NAME(), 24);
  		Global_111965 = 1;
  	}
  	else
  	{
  		StringCopy(&Global_111971, "NULL", 24);
  		Global_111965 = 0;
  	}
  }
  
  void func_437()
  {
  	if (STREAMING::HAS_ANIM_DICT_LOADED(sLocal_884))
  	{
  		STREAMING::REMOVE_ANIM_DICT(sLocal_884);
  	}
  	if (iLocal_853 != 0)
  	{
  		GRAPHICS::STOP_PARTICLE_FX_LOOPED(iLocal_853, false);
  		iLocal_853 = 0;
  	}
  	AUDIO::RELEASE_SCRIPT_AUDIO_BANK();
  	SCRIPT::TERMINATE_THIS_THREAD();
  }
  
  void func_438(int iParam0)
  {
  	Global_111625.f_22 = iParam0;
  }
  
  