#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;
	var uLocal_21 = 0;
	var uLocal_22 = 0;
	float fLocal_23 = 0f;
	float fLocal_24 = 0f;
	float fLocal_25 = 0f;
	var uLocal_26 = 0;
	var uLocal_27 = 0;
	int iLocal_28 = 0;
	float fLocal_29 = 0f;
	var uLocal_30 = 0;
	var uLocal_31 = 0;
	var uLocal_32 = 0;
	float fLocal_33 = 0f;
	float fLocal_34 = 0f;
	var uLocal_35 = 0;
	var uLocal_36 = 0;
	var uLocal_37 = 0;
	var uLocal_38 = 0;
	var uLocal_39 = 0;
	int iLocal_40 = 0;
	int iLocal_41 = 0;
	int iLocal_42 = 0;
	int iLocal_43 = 0;
	var uLocal_44 = 0;
	var uLocal_45 = 0;
	var uLocal_46 = 0;
	var uLocal_47 = 0;
	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 = 0;
	var uLocal_55 = 0;
	var uLocal_56 = 0;
	var uLocal_57 = 8;
	var uLocal_58 = 0;
	var uLocal_59 = 0;
	var uLocal_60 = 0;
	var uLocal_61 = 0;
	var uLocal_62 = 0;
	var uLocal_63 = 0;
	var uLocal_64 = 0;
	var uLocal_65 = 0;
	var uLocal_66 = 2;
	var uLocal_67 = 0;
	var uLocal_68 = 0;
	var uLocal_69 = 8;
	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;
	var uLocal_77 = 0;
	var uLocal_78 = 8;
	var uLocal_79 = 0;
	var uLocal_80 = 0;
	var uLocal_81 = 0;
	var uLocal_82 = 0;
	var uLocal_83 = 0;
	var uLocal_84 = 0;
	var uLocal_85 = 0;
	var uLocal_86 = 0;
	float fLocal_87 = 0f;
	int iLocal_88 = 0;
	var uLocal_89 = 0;
	var uLocal_90 = 0;
	int iLocal_91 = 0;
	int iLocal_92 = 0;
	struct<194> Local_93 = { 0, 0, 8, 0, 0, -1, -1, -1, -1, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } ;
	var uLocal_287 = 0;
	struct<44> Local_288[32];
	int iLocal_1697 = 0;
	int iLocal_1698[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
	var uLocal_1707[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
	int iLocal_1716[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
	int iLocal_1725 = 0;
	var uLocal_1726 = 0;
	var uLocal_1727 = 0;
	var uLocal_1728 = 0;
	var uLocal_1729 = 0;
	float fLocal_1730 = 0f;
	int iLocal_1731 = 0;
	int iLocal_1732 = 0;
	int iLocal_1733 = 0;
	int iLocal_1734 = 0;
	int iLocal_1735 = 0;
	int iLocal_1736 = 0;
	int iLocal_1737 = 0;
	int iLocal_1738 = 0;
	float fLocal_1739 = 0f;
	float fLocal_1740 = 0f;
	float fLocal_1741 = 0f;
	float fLocal_1742 = 0f;
	float fLocal_1743 = 0f;
	int iLocal_1744 = 0;
	int iLocal_1745 = 0;
	vector3 vLocal_1746[50] = {{ 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f } };
	int iLocal_1897 = 0;
	int iLocal_1898 = 0;
	int iLocal_1899 = 0;
	int iLocal_1900 = 0;
	int iLocal_1901 = 0;
	int iLocal_1902 = 0;
	int iLocal_1903 = 0;
	int iLocal_1904 = 0;
	int iLocal_1905 = 0;
	float fLocal_1906 = 0f;
	var uLocal_1907 = 0;
	var uLocal_1908 = 0;
	float fLocal_1909 = 0f;
	vector3 vLocal_1910 = { 0f, 0f, 0f };
	int iLocal_1913 = 0;
	var uLocal_1914 = 0;
	var uLocal_1915 = 12;
	var uLocal_1916 = 0;
	var uLocal_1917 = 0;
	var uLocal_1918 = 0;
	var uLocal_1919 = 0;
	var uLocal_1920 = 0;
	var uLocal_1921 = 0;
	var uLocal_1922 = 0;
	var uLocal_1923 = 0;
	var uLocal_1924 = 0;
	var uLocal_1925 = 0;
	var uLocal_1926 = 0;
	var uLocal_1927 = 0;
	var uLocal_1928 = 0;
	var uLocal_1929 = 0;
	var uLocal_1930 = 0;
	var uLocal_1931 = 0;
	var uLocal_1932 = 0;
	var uLocal_1933 = 0;
	var uLocal_1934 = 0;
	var uLocal_1935 = 0;
	var uLocal_1936 = 0;
	var uLocal_1937 = 0;
	var uLocal_1938 = 0;
	var uLocal_1939 = 0;
	var uLocal_1940 = 0;
	var uLocal_1941 = 0;
	var uLocal_1942 = 0;
	var uLocal_1943 = 0;
	var uLocal_1944 = 0;
	var uLocal_1945 = 0;
	var uLocal_1946 = 0;
	var uLocal_1947 = 0;
	var uLocal_1948 = 0;
	var uLocal_1949 = 0;
	var uLocal_1950 = 0;
	var uLocal_1951 = 0;
	var uLocal_1952 = 0;
	var uLocal_1953 = 0;
	var uLocal_1954 = 0;
	var uLocal_1955 = 0;
	var uLocal_1956 = 0;
	var uLocal_1957 = 0;
	var uLocal_1958 = 0;
	var uLocal_1959 = 0;
	var uLocal_1960 = 0;
	var uLocal_1961 = 0;
	var uLocal_1962 = 0;
	var uLocal_1963 = 0;
	var uLocal_1964 = 0;
	var uLocal_1965 = 0;
	var uLocal_1966 = 0;
	var uLocal_1967 = 0;
	var uLocal_1968 = 0;
	var uLocal_1969 = 0;
	var uLocal_1970 = 0;
	var uLocal_1971 = 0;
	var uLocal_1972 = 0;
	var uLocal_1973 = 0;
	var uLocal_1974 = 0;
	var uLocal_1975 = 0;
	var uLocal_1976 = 0;
	var uLocal_1977 = 0;
	var uLocal_1978 = 0;
	var uLocal_1979 = 0;
	var uLocal_1980 = 0;
	var uLocal_1981 = 0;
	var uLocal_1982 = 0;
	var uLocal_1983 = 0;
	var uLocal_1984 = 0;
	var uLocal_1985 = 0;
	var uLocal_1986 = 0;
	var uLocal_1987 = 0;
	var uLocal_1988 = 0;
	var uLocal_1989 = 0;
	var uLocal_1990 = 0;
	var uLocal_1991 = 0;
	var uLocal_1992 = 0;
	var uLocal_1993 = 0;
	var uLocal_1994 = 0;
	var uLocal_1995 = 0;
	var uLocal_1996 = 0;
	var uLocal_1997 = 0;
	var uLocal_1998 = 0;
	var uLocal_1999 = 0;
	var uLocal_2000 = 0;
	var uLocal_2001 = 0;
	var uLocal_2002 = 0;
	var uLocal_2003 = 0;
	var uLocal_2004 = 0;
	var uLocal_2005 = 0;
	var uLocal_2006 = 0;
	var uLocal_2007 = 0;
	var uLocal_2008 = 0;
	var uLocal_2009 = 0;
	var uLocal_2010 = 0;
	var uLocal_2011 = 0;
	var uLocal_2012 = 0;
	var uLocal_2013 = 0;
	var uLocal_2014 = 0;
	var uLocal_2015 = 0;
	var uLocal_2016 = 0;
	var uLocal_2017 = 0;
	var uLocal_2018 = 0;
	var uLocal_2019 = 0;
	var uLocal_2020 = 0;
	var uLocal_2021 = 0;
	var uLocal_2022 = 0;
	var uLocal_2023 = 0;
	var uLocal_2024 = 0;
	var uLocal_2025 = 0;
	var uLocal_2026 = 0;
	var uLocal_2027 = 0;
	var uLocal_2028 = 0;
	var uLocal_2029 = 0;
	var uLocal_2030 = 0;
	var uLocal_2031 = 0;
	var uLocal_2032 = 0;
	var uLocal_2033 = 0;
	var uLocal_2034 = 0;
	var uLocal_2035 = 0;
	var uLocal_2036 = 0;
	var uLocal_2037 = 0;
	var uLocal_2038 = 0;
	var uLocal_2039 = 0;
	var uLocal_2040 = 0;
	var uLocal_2041 = 0;
	var uLocal_2042 = 0;
	var uLocal_2043 = 0;
	var uLocal_2044 = 0;
	var uLocal_2045 = 0;
	var uLocal_2046 = 0;
	var uLocal_2047 = 0;
	var uLocal_2048 = 0;
	var uLocal_2049 = 0;
	var uLocal_2050 = 0;
	var uLocal_2051 = 0;
	var uLocal_2052 = 0;
	var uLocal_2053 = 0;
	var uLocal_2054 = 0;
	var uLocal_2055 = 0;
	var uLocal_2056 = 0;
	var uLocal_2057 = 0;
	var uLocal_2058 = 0;
	var uLocal_2059 = 0;
	var uLocal_2060 = 0;
	var uLocal_2061 = 0;
	var uLocal_2062 = 0;
	var uLocal_2063 = 0;
	var uLocal_2064 = 0;
	var uLocal_2065 = 0;
	var uLocal_2066 = 0;
	var uLocal_2067 = 0;
	var uLocal_2068 = 0;
	var uLocal_2069 = 0;
	var uLocal_2070 = 0;
	var uLocal_2071 = 0;
	var uLocal_2072 = 0;
	var uLocal_2073 = 0;
	var uLocal_2074 = 0;
	var uLocal_2075 = 0;
	var uLocal_2076 = 0;
	var uLocal_2077 = 0;
	var uLocal_2078 = 0;
	var uLocal_2079 = 0;
	var uLocal_2080 = 0;
	var uLocal_2081 = 0;
	var uLocal_2082 = 0;
	var uLocal_2083 = 0;
	var uLocal_2084 = 0;
	var uLocal_2085 = 0;
	var uLocal_2086 = 0;
	var uLocal_2087 = 0;
	var uLocal_2088 = 0;
	var uLocal_2089 = 0;
	var uLocal_2090 = 0;
	var uLocal_2091 = 0;
	var uLocal_2092 = 0;
	var uLocal_2093 = 0;
	var uLocal_2094 = 0;
	var uLocal_2095 = 0;
	var uLocal_2096 = 0;
	var uLocal_2097 = 0;
	var uLocal_2098 = 0;
	var uLocal_2099 = 0;
	var uLocal_2100 = 0;
	var uLocal_2101 = 0;
	var uLocal_2102 = 0;
	var uLocal_2103 = 0;
	var uLocal_2104 = 0;
	var uLocal_2105 = 0;
	var uLocal_2106 = 0;
	var uLocal_2107 = 0;
	var uLocal_2108 = 0;
	var uLocal_2109 = 0;
	var uLocal_2110 = 0;
	var uLocal_2111 = 0;
	var uLocal_2112 = 0;
	var uLocal_2113 = 0;
	var uLocal_2114 = 0;
	var uLocal_2115 = 0;
	var uLocal_2116 = 0;
	var uLocal_2117 = 0;
	var uLocal_2118 = 0;
	var uLocal_2119 = 0;
	var uLocal_2120 = 0;
	var uLocal_2121 = 0;
	var uLocal_2122 = 0;
	var uLocal_2123 = 0;
	var uLocal_2124 = 0;
	var uLocal_2125 = 0;
	var uLocal_2126 = 0;
	var uLocal_2127 = 0;
	var uLocal_2128 = 0;
	var uLocal_2129 = 0;
	var uLocal_2130 = 0;
	var uLocal_2131 = 0;
	var uLocal_2132 = 0;
	var uLocal_2133 = 0;
	var uLocal_2134 = 0;
	var uLocal_2135 = 0;
	var uLocal_2136 = 0;
	var uLocal_2137 = 0;
	var uLocal_2138 = 0;
	var uLocal_2139 = 0;
	var uLocal_2140 = 0;
	var uLocal_2141 = 0;
	var uLocal_2142 = 0;
	var uLocal_2143 = 0;
	var uLocal_2144 = 0;
	var uLocal_2145 = 0;
	var uLocal_2146 = 0;
	var uLocal_2147 = 0;
	var uLocal_2148 = 0;
	var uLocal_2149 = 0;
	var uLocal_2150 = 0;
	var uLocal_2151 = 0;
	var uLocal_2152 = 0;
	var uLocal_2153 = 0;
	var uLocal_2154 = 0;
	var uLocal_2155 = 0;
	var uLocal_2156 = 0;
	var uLocal_2157 = 0;
	var uLocal_2158 = 0;
	var uLocal_2159 = 0;
	var uLocal_2160 = 0;
	var uLocal_2161 = 0;
	var uLocal_2162 = 0;
	var uLocal_2163 = 0;
	var uLocal_2164 = 0;
	var uLocal_2165 = 0;
	var uLocal_2166 = 0;
	var uLocal_2167 = 0;
	var uLocal_2168 = 0;
	var uLocal_2169 = 0;
	var uLocal_2170 = 0;
	var uLocal_2171 = 0;
	var uLocal_2172 = 0;
	var uLocal_2173 = 0;
	var uLocal_2174 = 0;
	var uLocal_2175 = 0;
	var uLocal_2176 = 0;
	var uLocal_2177 = 0;
	var uLocal_2178 = 0;
	var uLocal_2179 = 0;
	var uLocal_2180 = 0;
	var uLocal_2181 = 0;
	var uLocal_2182 = 0;
	var uLocal_2183 = 0;
	var uLocal_2184 = 0;
	var uLocal_2185 = 0;
	var uLocal_2186 = 0;
	var uLocal_2187 = 0;
	var uLocal_2188 = 0;
	var uLocal_2189 = 0;
	var uLocal_2190 = 0;
	var uLocal_2191 = 0;
	var uLocal_2192 = 0;
	var uLocal_2193 = 0;
	var uLocal_2194 = 0;
	var uLocal_2195 = 0;
	var uLocal_2196 = 0;
	var uLocal_2197 = 0;
	var uLocal_2198 = 0;
	var uLocal_2199 = 0;
	var uLocal_2200 = 0;
	var uLocal_2201 = 0;
	var uLocal_2202 = 0;
	var uLocal_2203 = 0;
	var uLocal_2204 = 0;
	var uLocal_2205 = 0;
	var uLocal_2206 = 0;
	var uLocal_2207 = 0;
	var uLocal_2208 = 0;
	var uLocal_2209 = 0;
	var uLocal_2210 = 0;
	var uLocal_2211 = 0;
	var uLocal_2212 = 0;
	var uLocal_2213 = 0;
	var uLocal_2214 = 0;
	var uLocal_2215 = 0;
	var uLocal_2216 = 0;
	var uLocal_2217 = 0;
	var uLocal_2218 = 0;
	var uLocal_2219 = 0;
	var uLocal_2220 = 0;
	var uLocal_2221 = 0;
	var uLocal_2222 = 0;
	var uLocal_2223 = 0;
	var uLocal_2224 = 0;
	var uLocal_2225 = 0;
	var uLocal_2226 = 0;
	var uLocal_2227 = 0;
	var uLocal_2228 = 0;
	var uLocal_2229 = 0;
	var uLocal_2230 = 0;
	var uLocal_2231 = 0;
	var uLocal_2232 = 0;
	var uLocal_2233 = 0;
	var uLocal_2234 = 0;
	var uLocal_2235 = 0;
	var uLocal_2236 = 0;
	var uLocal_2237 = 0;
	var uLocal_2238 = 0;
	var uLocal_2239 = 0;
	var uLocal_2240 = 0;
	var uLocal_2241 = 0;
	var uLocal_2242 = 0;
	var uLocal_2243 = 0;
	var uLocal_2244 = 0;
	var uLocal_2245 = 0;
	var uLocal_2246 = 0;
	var uLocal_2247 = 0;
	var uLocal_2248 = 0;
	var uLocal_2249 = 0;
	var uLocal_2250 = 0;
	var uLocal_2251 = 0;
	var uLocal_2252 = 0;
	var uLocal_2253 = 0;
	var uLocal_2254 = 0;
	var uLocal_2255 = 0;
	var uLocal_2256 = 0;
	var uLocal_2257 = 0;
	var uLocal_2258 = 0;
	var uLocal_2259 = 0;
	var uLocal_2260 = 0;
	var uLocal_2261 = 0;
	var uLocal_2262 = 0;
	var uLocal_2263 = 0;
	var uLocal_2264 = 0;
	var uLocal_2265 = 0;
	var uLocal_2266 = 0;
	var uLocal_2267 = 0;
	var uLocal_2268 = 0;
	var uLocal_2269 = 0;
	var uLocal_2270 = 0;
	var uLocal_2271 = 0;
	var uLocal_2272 = 0;
	var uLocal_2273 = 0;
	var uLocal_2274 = 0;
	var uLocal_2275 = 0;
	var uLocal_2276 = 0;
	var uLocal_2277 = 0;
	var uLocal_2278 = 0;
	var uLocal_2279 = 0;
	var uLocal_2280 = 0;
	var uLocal_2281 = 0;
	var uLocal_2282 = 0;
	var uLocal_2283 = 0;
	var uLocal_2284 = 0;
	var uLocal_2285 = 0;
	var uLocal_2286 = 0;
	var uLocal_2287 = 0;
	var uLocal_2288 = 0;
	var uLocal_2289 = 0;
	var uLocal_2290 = 0;
	var uLocal_2291 = 0;
	var uLocal_2292 = 0;
	var uLocal_2293 = 0;
	var uLocal_2294 = 0;
	var uLocal_2295 = 0;
	var uLocal_2296 = 0;
	var uLocal_2297 = 0;
	var uLocal_2298 = 0;
	var uLocal_2299 = 0;
	var uLocal_2300 = 0;
	var uLocal_2301 = 0;
	var uLocal_2302 = 0;
	var uLocal_2303 = 0;
	var uLocal_2304 = 0;
	var uLocal_2305 = 0;
	var uLocal_2306 = 0;
	var uLocal_2307 = 0;
	var uLocal_2308 = 0;
	var uLocal_2309 = 0;
	var uLocal_2310 = 0;
	var uLocal_2311 = 0;
	var uLocal_2312 = 0;
	var uLocal_2313 = 0;
	var uLocal_2314 = 0;
	var uLocal_2315 = 0;
	var uLocal_2316 = 0;
	var uLocal_2317 = 0;
	var uLocal_2318 = 0;
	var uLocal_2319 = 0;
	var uLocal_2320 = 0;
	var uLocal_2321 = 0;
	var uLocal_2322 = 0;
	var uLocal_2323 = 0;
	var uLocal_2324 = 0;
	var uLocal_2325 = 0;
	var uLocal_2326 = 0;
	var uLocal_2327 = 0;
	var uLocal_2328 = 0;
	var uLocal_2329 = 0;
	var uLocal_2330 = 0;
	var uLocal_2331 = 0;
	var uLocal_2332 = 0;
	var uLocal_2333 = 0;
	var uLocal_2334 = 0;
	var uLocal_2335 = 0;
	var uLocal_2336 = 0;
	var uLocal_2337 = 0;
	var uLocal_2338 = 0;
	var uLocal_2339 = 0;
	var uLocal_2340 = 0;
	var uLocal_2341 = 0;
	var uLocal_2342 = 0;
	var uLocal_2343 = 0;
	var uLocal_2344 = 0;
	var uLocal_2345 = 0;
	var uLocal_2346 = 0;
	var uLocal_2347 = 0;
	var uLocal_2348 = 0;
	var uLocal_2349 = 0;
	var uLocal_2350 = 0;
	var uLocal_2351 = 0;
	var uLocal_2352 = 0;
	var uLocal_2353 = 0;
	var uLocal_2354 = 0;
	var uLocal_2355 = 0;
	var uLocal_2356 = 0;
	var uLocal_2357 = 0;
	var uLocal_2358 = 0;
	var uLocal_2359 = 0;
	var uLocal_2360 = 0;
	var uLocal_2361 = 0;
	var uLocal_2362 = 0;
	var uLocal_2363 = 0;
	var uLocal_2364 = 0;
	var uLocal_2365 = 0;
	var uLocal_2366 = 0;
	var uLocal_2367 = 0;
	var uLocal_2368 = 0;
	var uLocal_2369 = 0;
	var uLocal_2370 = 0;
	var uLocal_2371 = 0;
	var uLocal_2372 = 0;
	var uLocal_2373 = 0;
	var uLocal_2374 = 0;
	var uLocal_2375 = 0;
	var uLocal_2376 = 0;
	var uLocal_2377 = 0;
	var uLocal_2378 = 0;
	var uLocal_2379 = 0;
	var uLocal_2380 = 0;
	var uLocal_2381 = 0;
	var uLocal_2382 = 0;
	var uLocal_2383 = 0;
	var uLocal_2384 = 0;
	var uLocal_2385 = 0;
	var uLocal_2386 = 0;
	var uLocal_2387 = 0;
	var uLocal_2388 = 0;
	var uLocal_2389 = 0;
	var uLocal_2390 = 0;
	var uLocal_2391 = 0;
	var uLocal_2392 = 0;
	var uLocal_2393 = 0;
	var uLocal_2394 = 0;
	var uLocal_2395 = 0;
	var uLocal_2396 = 0;
	var uLocal_2397 = 0;
	var uLocal_2398 = 0;
	var uLocal_2399 = 0;
	var uLocal_2400 = 0;
	var uLocal_2401 = 0;
	var uLocal_2402 = 0;
	var uLocal_2403 = 0;
	var uLocal_2404 = 0;
	var uLocal_2405 = 0;
	var uLocal_2406 = 0;
	var uLocal_2407 = 0;
	var uLocal_2408 = 0;
	var uLocal_2409 = 0;
	var uLocal_2410 = 0;
	var uLocal_2411 = 0;
	var uLocal_2412 = 0;
	var uLocal_2413 = 0;
	var uLocal_2414 = 0;
	var uLocal_2415 = 0;
	var uLocal_2416 = 0;
	var uLocal_2417 = 0;
	var uLocal_2418 = 0;
	var uLocal_2419 = 0;
	var uLocal_2420 = 0;
	var uLocal_2421 = 0;
	var uLocal_2422 = 0;
	var uLocal_2423 = 0;
	var uLocal_2424 = 0;
	var uLocal_2425 = 0;
	var uLocal_2426 = 0;
	var uLocal_2427 = 0;
	var uLocal_2428 = 0;
	var uLocal_2429 = 0;
	var uLocal_2430 = 0;
	var uLocal_2431 = 0;
	var uLocal_2432 = 0;
	var uLocal_2433 = 0;
	var uLocal_2434 = 0;
	var uLocal_2435 = 0;
	var uLocal_2436 = 0;
	var uLocal_2437 = 0;
	var uLocal_2438 = 0;
	var uLocal_2439 = 0;
	var uLocal_2440 = 0;
	var uLocal_2441 = 0;
	var uLocal_2442 = 0;
	var uLocal_2443 = 0;
	var uLocal_2444 = 0;
	var uLocal_2445 = 0;
	var uLocal_2446 = 0;
	var uLocal_2447 = 0;
	var uLocal_2448 = 0;
	var uLocal_2449 = 0;
	var uLocal_2450 = 0;
	var uLocal_2451 = 0;
	var uLocal_2452 = 0;
	var uLocal_2453 = 0;
	var uLocal_2454 = 0;
	var uLocal_2455 = 0;
	var uLocal_2456 = 0;
	var uLocal_2457 = 0;
	var uLocal_2458 = 0;
	var uLocal_2459 = 0;
	var uLocal_2460 = 0;
	var uLocal_2461 = 0;
	var uLocal_2462 = 0;
	var uLocal_2463 = 0;
	var uLocal_2464 = 0;
	var uLocal_2465 = 0;
	var uLocal_2466 = 0;
	var uLocal_2467 = 0;
	var uLocal_2468 = 0;
	var uLocal_2469 = 0;
	var uLocal_2470 = 0;
	var uLocal_2471 = 0;
	var uLocal_2472 = 0;
	var uLocal_2473 = 0;
	var uLocal_2474 = 0;
	var uLocal_2475 = 0;
	var uLocal_2476 = 0;
	var uLocal_2477 = 0;
	var uLocal_2478 = 0;
	var uLocal_2479 = 0;
	var uLocal_2480 = 0;
	var uLocal_2481 = 0;
	var uLocal_2482 = 0;
	var uLocal_2483 = 0;
	var uLocal_2484 = 0;
	var uLocal_2485 = 0;
	var uLocal_2486 = 0;
	var uLocal_2487 = 0;
	var uLocal_2488 = 0;
	var uLocal_2489 = 0;
	var uLocal_2490 = 0;
	var uLocal_2491 = 0;
	var uLocal_2492 = 0;
	var uLocal_2493 = 0;
	var uLocal_2494 = 0;
	var uLocal_2495 = 0;
	var uLocal_2496 = 0;
	var uLocal_2497 = 0;
	var uLocal_2498 = 0;
	var uLocal_2499 = 0;
	var uLocal_2500 = 0;
	var uLocal_2501 = 0;
	var uLocal_2502 = 0;
	var uLocal_2503 = 0;
	var uLocal_2504 = 0;
	var uLocal_2505 = 0;
	var uLocal_2506 = 0;
	var uLocal_2507 = 0;
	var uLocal_2508 = 0;
	var uLocal_2509 = 0;
	var uLocal_2510 = 0;
	var uLocal_2511 = 0;
	var uLocal_2512 = 0;
	var uLocal_2513 = 0;
	var uLocal_2514 = 0;
	var uLocal_2515 = 0;
	var uLocal_2516 = 0;
	var uLocal_2517 = 0;
	var uLocal_2518 = 0;
	var uLocal_2519 = 0;
	var uLocal_2520 = 0;
	var uLocal_2521 = 0;
	var uLocal_2522 = 0;
	var uLocal_2523 = 0;
	var uLocal_2524 = 0;
	var uLocal_2525 = 0;
	var uLocal_2526 = 0;
	var uLocal_2527 = 0;
	var uLocal_2528 = 0;
	var uLocal_2529 = 0;
	var uLocal_2530 = 0;
	var uLocal_2531 = 0;
	var uLocal_2532 = 0;
	var uLocal_2533 = 0;
	var uLocal_2534 = 0;
	var uLocal_2535 = 0;
	var uLocal_2536 = 0;
	var uLocal_2537 = 0;
	var uLocal_2538 = 0;
	var uLocal_2539 = 0;
	var uLocal_2540 = 0;
	var uLocal_2541 = 0;
	var uLocal_2542 = 0;
	var uLocal_2543 = 0;
	var uLocal_2544 = 0;
	var uLocal_2545 = 0;
	var uLocal_2546 = 0;
	var uLocal_2547 = 0;
	var uLocal_2548 = 0;
	var uLocal_2549 = 0;
	var uLocal_2550 = 0;
	var uLocal_2551 = 0;
	var uLocal_2552 = 0;
	var uLocal_2553 = 0;
	var uLocal_2554 = 0;
	var uLocal_2555 = 0;
	var uLocal_2556 = 0;
	var uLocal_2557 = 0;
	var uLocal_2558 = 0;
	var uLocal_2559 = 0;
	var uLocal_2560 = 0;
	var uLocal_2561 = 0;
	var uLocal_2562 = 0;
	var uLocal_2563 = 0;
	var uLocal_2564 = 0;
	var uLocal_2565 = 0;
	var uLocal_2566 = 0;
	var uLocal_2567 = 0;
	var uLocal_2568 = 0;
	var uLocal_2569 = 0;
	var uLocal_2570 = 0;
	var uLocal_2571 = 0;
	var uLocal_2572 = 0;
	var uLocal_2573 = 0;
	var uLocal_2574 = 0;
	var uLocal_2575 = 0;
	var uLocal_2576 = 0;
	var uLocal_2577 = 0;
	var uLocal_2578 = 0;
	var uLocal_2579 = 0;
	var uLocal_2580 = 0;
	var uLocal_2581 = 0;
	var uLocal_2582 = 0;
	var uLocal_2583 = 0;
	var uLocal_2584 = 0;
	var uLocal_2585 = 0;
	var uLocal_2586 = 0;
	var uLocal_2587 = 0;
	var uLocal_2588 = 0;
	var uLocal_2589 = 0;
	var uLocal_2590 = 0;
	var uLocal_2591 = 0;
	var uLocal_2592 = 0;
	var uLocal_2593 = 0;
	var uLocal_2594 = 0;
	var uLocal_2595 = 0;
	var uLocal_2596 = 0;
	var uLocal_2597 = 0;
	var uLocal_2598 = 0;
	var uLocal_2599 = 0;
	var uLocal_2600 = 1065353216;
	struct<9> Local_2601 = { 0, 0, 0, 0, 0, 0, 0, 0, 0 } ;
	int iLocal_2610 = 0;
	int iLocal_2611 = 0;
	int iLocal_2612 = 0;
	int iLocal_2613 = 0;
	char* sLocal_2614 = NULL;
	int iLocal_2615 = 0;
	vector3 vLocal_2616 = { 0f, 0f, 0f };
	vector3 vLocal_2619 = { 0f, 0f, 0f };
	vector3 vLocal_2622 = { 0f, 0f, 0f };
	float fLocal_2625 = 0f;
	vector3 vLocal_2626 = { 0f, 0f, 0f };
	int iLocal_2629 = 0;
	int iLocal_2630 = 0;
	float fLocal_2631 = 0f;
	int iLocal_2632 = 0;
	var uLocal_2633 = 16;
	var uLocal_2634 = 0;
	var uLocal_2635 = 0;
	var uLocal_2636 = 0;
	var uLocal_2637 = 0;
	var uLocal_2638 = 0;
	var uLocal_2639 = 0;
	var uLocal_2640 = 0;
	var uLocal_2641 = 0;
	var uLocal_2642 = 0;
	var uLocal_2643 = 0;
	var uLocal_2644 = 0;
	var uLocal_2645 = 0;
	var uLocal_2646 = 0;
	var uLocal_2647 = 0;
	var uLocal_2648 = 0;
	var uLocal_2649 = 0;
	var uLocal_2650 = 0;
	var uLocal_2651 = 0;
	var uLocal_2652 = 0;
	var uLocal_2653 = 0;
	var uLocal_2654 = 0;
	var uLocal_2655 = 0;
	var uLocal_2656 = 0;
	var uLocal_2657 = 0;
	var uLocal_2658 = 0;
	var uLocal_2659 = 0;
	var uLocal_2660 = 0;
	var uLocal_2661 = 0;
	var uLocal_2662 = 0;
	var uLocal_2663 = 0;
	var uLocal_2664 = 0;
	var uLocal_2665 = 0;
	var uLocal_2666 = 0;
	var uLocal_2667 = 0;
	var uLocal_2668 = 0;
	var uLocal_2669 = 0;
	var uLocal_2670 = 0;
	var uLocal_2671 = 0;
	var uLocal_2672 = 0;
	var uLocal_2673 = 0;
	var uLocal_2674 = 0;
	var uLocal_2675 = 0;
	var uLocal_2676 = 0;
	var uLocal_2677 = 0;
	var uLocal_2678 = 0;
	var uLocal_2679 = 0;
	var uLocal_2680 = 0;
	var uLocal_2681 = 0;
	var uLocal_2682 = 0;
	var uLocal_2683 = 0;
	var uLocal_2684 = 0;
	var uLocal_2685 = 0;
	var uLocal_2686 = 0;
	var uLocal_2687 = 0;
	var uLocal_2688 = 0;
	var uLocal_2689 = 0;
	var uLocal_2690 = 0;
	var uLocal_2691 = 0;
	var uLocal_2692 = 0;
	var uLocal_2693 = 0;
	var uLocal_2694 = 0;
	var uLocal_2695 = 0;
	var uLocal_2696 = 0;
	var uLocal_2697 = 0;
	var uLocal_2698 = 0;
	var uLocal_2699 = 0;
	var uLocal_2700 = 0;
	var uLocal_2701 = 0;
	var uLocal_2702 = 0;
	var uLocal_2703 = 0;
	var uLocal_2704 = 0;
	var uLocal_2705 = 0;
	var uLocal_2706 = 0;
	var uLocal_2707 = 0;
	var uLocal_2708 = 0;
	var uLocal_2709 = 0;
	var uLocal_2710 = 0;
	var uLocal_2711 = 0;
	var uLocal_2712 = 0;
	var uLocal_2713 = 0;
	var uLocal_2714 = 0;
	var uLocal_2715 = 0;
	var uLocal_2716 = 0;
	var uLocal_2717 = 0;
	var uLocal_2718 = 0;
	var uLocal_2719 = 0;
	var uLocal_2720 = 0;
	var uLocal_2721 = 0;
	var uLocal_2722 = 0;
	var uLocal_2723 = 0;
	var uLocal_2724 = 0;
	var uLocal_2725 = 0;
	var uLocal_2726 = 0;
	var uLocal_2727 = 0;
	var uLocal_2728 = 0;
	var uLocal_2729 = 0;
	var uLocal_2730 = 0;
	var uLocal_2731 = 0;
	var uLocal_2732 = 0;
	var uLocal_2733 = 0;
	var uLocal_2734 = 0;
	var uLocal_2735 = 0;
	var uLocal_2736 = 0;
	var uLocal_2737 = 0;
	var uLocal_2738 = 0;
	var uLocal_2739 = 0;
	var uLocal_2740 = 0;
	var uLocal_2741 = 0;
	var uLocal_2742 = 0;
	var uLocal_2743 = 0;
	var uLocal_2744 = 0;
	var uLocal_2745 = 0;
	var uLocal_2746 = 0;
	var uLocal_2747 = 0;
	var uLocal_2748 = 0;
	var uLocal_2749 = 0;
	var uLocal_2750 = 0;
	var uLocal_2751 = 0;
	var uLocal_2752 = 0;
	var uLocal_2753 = 0;
	var uLocal_2754 = 0;
	var uLocal_2755 = 0;
	var uLocal_2756 = 0;
	var uLocal_2757 = 0;
	var uLocal_2758 = 0;
	var uLocal_2759 = 0;
	var uLocal_2760 = 0;
	var uLocal_2761 = 0;
	var uLocal_2762 = 0;
	var uLocal_2763 = 0;
	var uLocal_2764 = 0;
	var uLocal_2765 = 0;
	var uLocal_2766 = 0;
	var uLocal_2767 = 0;
	var uLocal_2768 = 0;
	var uLocal_2769 = 0;
	var uLocal_2770 = 0;
	var uLocal_2771 = 0;
	var uLocal_2772 = 0;
	var uLocal_2773 = 0;
	var uLocal_2774 = 0;
	var uLocal_2775 = 0;
	var uLocal_2776 = 0;
	var uLocal_2777 = 0;
	var uLocal_2778 = 0;
	var uLocal_2779 = 0;
	var uLocal_2780 = 0;
	var uLocal_2781 = 0;
	var uLocal_2782 = 0;
	var uLocal_2783 = 0;
	var uLocal_2784 = 0;
	var uLocal_2785 = 0;
	var uLocal_2786 = 0;
	var uLocal_2787 = 0;
	var uLocal_2788 = 0;
	var uLocal_2789 = 0;
	var uLocal_2790 = 0;
	var uLocal_2791 = 0;
	var uLocal_2792 = 0;
	var uLocal_2793 = 0;
	var uLocal_2794 = 0;
	var uLocal_2795 = 0;
	var uLocal_2796 = 0;
	var uLocal_2797 = 0;
	int iLocal_2798 = 0;
	int iLocal_2799 = 0;
	struct<20> Local_2800 = { 0, -1, -1, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, -1, 0, 0, -1 } ;
#endregion

void __EntryFunction__()//Position - 0x0
{
	iLocal_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_23 = 80f;
	fLocal_24 = 140f;
	fLocal_25 = 180f;
	iLocal_28 = 3;
	fLocal_29 = 0f;
	fLocal_33 = -0.0375f;
	fLocal_34 = 0.17f;
	iLocal_40 = 1;
	iLocal_41 = 65;
	iLocal_42 = 49;
	iLocal_43 = 64;
	fLocal_87 = ((0.05f + 0.275f) - 0.01f);
	iLocal_91 = ui::_0x4A9923385BDB9DAD();
	iLocal_92 = ui::_get_blip_info_id_iterator();
	iLocal_1737 = joaat("prop_taxi_meter_2");
	fLocal_1739 = 1f;
	fLocal_1740 = (0.4f * fLocal_1739);
	fLocal_1741 = (0.6f * fLocal_1739);
	fLocal_1742 = 0.201f;
	fLocal_1743 = 0.351f;
	iLocal_1744 = 1076369579;
	iLocal_1745 = 1076631591;
	iLocal_1902 = 1;
	iLocal_1904 = iLocal_1903;
	fLocal_1906 = 1.2f;
	fLocal_1909 = system::to_float(iLocal_1903);
	iLocal_2613 = 1;
	sLocal_2614 = controls::_get_control_action_name(0, 218, true);
	iLocal_2615 = unk::_get_ui_language_id();
	vLocal_2616 = { -0.01f, 0.6f, 0.24f };
	vLocal_2619 = { -5f, 0f, 0f };
	vLocal_2622 = { 0f, -0.25f, 0.55f };
	fLocal_2625 = 50f;
	vLocal_2626 = { -0.3f, 1f, 0.35f };
	fLocal_2631 = 99999f;
	if (network::network_is_game_in_progress())
	{
		if (!func_350(Local_2800))
		{
			func_348();
		}
	}
	while (true)
	{
		func_347();
		if (func_337())
		{
			func_348();
		}
		if (network::network_is_in_tutorial_session())
		{
			if (func_336())
			{
				if (network::_0x638A3A81733086DB() != network::_0x3B39236746714134(player::player_id()))
				{
					func_348();
				}
			}
			else
			{
				func_348();
			}
		}
		else if (network::_0x638A3A81733086DB() != -1)
		{
			func_348();
		}
		switch (func_335(network::participant_id_to_int()))
		{
			case 0:
				Local_288[network::participant_id_to_int() /*44*/] = 1;
				if (func_334() == 4)
				{
					Local_288[network::participant_id_to_int() /*44*/] = 3;
				}
				break;
			
			case 1:
				if (func_334() == 1)
				{
					func_308();
					func_36();
				}
				else if (func_334() == 4)
				{
					Local_288[network::participant_id_to_int() /*44*/] = 3;
				}
				break;
			
			case 3:
				func_34(&(Local_93.f_193));
				if (func_33(&(Local_93.f_193)))
				{
					Local_288[network::participant_id_to_int() /*44*/] = 4;
				}
				break;
			
			case 2:
				Local_288[network::participant_id_to_int() /*44*/] = 4;
			
			case 4:
				func_348();
				break;
		}
		if (network::network_is_host_of_this_script())
		{
			switch (func_334())
			{
				case 0:
					Local_93 = 1;
					break;
				
				case 1:
					func_4();
					func_3();
					if (func_1())
					{
						Local_93 = 4;
					}
					break;
				
				case 4:
					break;
				}
		}
	}
}

bool func_1()//Position - 0x29F
{
	if (func_2())
	{
		return true;
	}
	return false;
}

bool func_2()//Position - 0x2B3
{
	return false;
}

void func_3()//Position - 0x2BC
{
	switch (Local_93.f_191)
	{
		case 0:
			Local_93.f_191 = 1;
			break;
		
		case 1:
			break;
		
		case 2:
		case 3:
		case 4:
			break;
	}
}

void func_4()//Position - 0x2F9
{
	if (iLocal_2798 < network::_network_get_num_participants_host())
	{
		func_25();
		iLocal_2798++;
	}
	else
	{
		func_5();
		gameplay::set_bit(&(Local_93.f_2[iLocal_2799 /*23*/].f_6), 0);
		gameplay::set_bit(&(Local_93.f_2[iLocal_2799 /*23*/].f_6), 2);
		Local_93.f_188 = 0;
		iLocal_2799++;
		if (iLocal_2799 >= 8)
		{
			iLocal_2798 = 0;
			iLocal_2799 = 0;
		}
	}
}

void func_5()//Position - 0x35B
{
	int iVar0;
	
	iVar0 = iLocal_2799;
	func_18(iVar0);
	func_6(iVar0);
}

void func_6(int iParam0)//Position - 0x374
{
	vector3 vVar0;
	
	if (!network::network_is_host_of_this_script())
	{
		return;
	}
	if (Local_93.f_2[iParam0 /*23*/].f_7 != 11 && !gameplay::is_bit_set(Local_93.f_2[iParam0 /*23*/].f_6, 4))
	{
		if (gameplay::is_bit_set(Local_93.f_2[iParam0 /*23*/].f_6, 0))
		{
			func_17(iParam0, 11);
			func_16(iParam0, 0);
		}
		else if (func_15(Local_93.f_2[iParam0 /*23*/].f_1) || !func_13(Local_93.f_2[iParam0 /*23*/]))
		{
			func_17(iParam0, 11);
			func_16(iParam0, 0);
		}
		else if (!ped::is_ped_in_vehicle(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), network::net_to_veh(Local_93.f_2[iParam0 /*23*/]), 0))
		{
			func_17(iParam0, 11);
			func_16(iParam0, 0);
		}
	}
	if (!func_15(Local_93.f_2[iParam0 /*23*/].f_1) && func_13(Local_93.f_2[iParam0 /*23*/]))
	{
		vVar0 = { entity::get_entity_coords(network::net_to_veh(Local_93.f_2[iParam0 /*23*/]), 1) };
		switch (Local_93.f_2[iParam0 /*23*/].f_7)
		{
			case 0:
				if (vehicle::get_vehicle_number_of_passengers(network::net_to_veh(Local_93.f_2[iParam0 /*23*/])) > 0)
				{
					func_17(iParam0, 4);
				}
				break;
			
			case 1:
				if (Local_93.f_2[iParam0 /*23*/].f_2 != -1)
				{
					if (func_12(vVar0, Local_288[Local_93.f_2[iParam0 /*23*/].f_2 /*44*/].f_4.f_26, 45f))
					{
						if (!func_11(Local_288[Local_93.f_2[iParam0 /*23*/].f_2 /*44*/].f_4.f_26, 0f, 0f, 0f, 0))
						{
							func_17(iParam0, 2);
						}
					}
					else if (network::network_is_participant_active(player::int_to_participantindex(Local_93.f_2[iParam0 /*23*/].f_2)))
					{
						if (func_10(network::network_get_player_index(player::int_to_participantindex(Local_93.f_2[iParam0 /*23*/].f_2)), 1, 1))
						{
							if (func_12(vVar0, entity::get_entity_coords(player::get_player_ped(network::network_get_player_index(player::int_to_participantindex(Local_93.f_2[iParam0 /*23*/].f_2))), 1), 5f))
							{
								func_17(iParam0, 2);
							}
						}
					}
				}
				else
				{
					func_17(iParam0, 8);
				}
				if (vehicle::get_vehicle_number_of_passengers(network::net_to_veh(Local_93.f_2[iParam0 /*23*/])) > 0)
				{
					func_17(iParam0, 4);
				}
				break;
			
			case 2:
				if (Local_93.f_2[iParam0 /*23*/].f_2 != -1)
				{
					if (gameplay::is_bit_set(Local_288[Local_93.f_2[iParam0 /*23*/].f_2 /*44*/].f_4.f_2, 21))
					{
						if (!func_9(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), -272084098, 1))
						{
							if (!func_9(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), -1817882002, 1))
							{
								if (vehicle::is_vehicle_stopped(network::net_to_veh(Local_93.f_2[iParam0 /*23*/])))
								{
									func_17(iParam0, 3);
								}
							}
						}
						else if (network::network_is_participant_active(player::int_to_participantindex(Local_93.f_2[iParam0 /*23*/].f_2)))
						{
							if (func_10(network::network_get_player_index(player::int_to_participantindex(Local_93.f_2[iParam0 /*23*/].f_2)), 1, 1))
							{
								if (func_12(vVar0, entity::get_entity_coords(player::get_player_ped(network::network_get_player_index(player::int_to_participantindex(Local_93.f_2[iParam0 /*23*/].f_2))), 1), 5f))
								{
									if (vehicle::is_vehicle_stopped(network::net_to_veh(Local_93.f_2[iParam0 /*23*/])) || vehicle::is_vehicle_stopped_at_traffic_lights(network::net_to_veh(Local_93.f_2[iParam0 /*23*/])))
									{
										func_17(iParam0, 3);
									}
									else if (!func_12(vVar0, Local_288[Local_93.f_2[iParam0 /*23*/].f_2 /*44*/].f_4.f_26, 10f))
									{
										func_17(iParam0, 3);
									}
								}
							}
						}
					}
				}
				else
				{
					func_17(iParam0, 8);
				}
				if (gameplay::is_bit_set(Local_93.f_2[iParam0 /*23*/].f_6, 2))
				{
					func_17(iParam0, 8);
				}
				if (vehicle::get_vehicle_number_of_passengers(network::net_to_veh(Local_93.f_2[iParam0 /*23*/])) > 0)
				{
					func_17(iParam0, 4);
				}
				break;
			
			case 3:
				if (gameplay::is_bit_set(Local_93.f_2[iParam0 /*23*/].f_6, 2))
				{
					func_17(iParam0, 8);
				}
				if (vehicle::get_vehicle_number_of_passengers(network::net_to_veh(Local_93.f_2[iParam0 /*23*/])) > 0)
				{
					func_17(iParam0, 4);
				}
				break;
			
			case 4:
				if (vehicle::get_vehicle_number_of_passengers(network::net_to_veh(Local_93.f_2[iParam0 /*23*/])) <= 0)
				{
					func_17(iParam0, 8);
				}
				else if (Local_93.f_2[iParam0 /*23*/].f_3 != -1)
				{
					if (!func_11(Local_93.f_2[iParam0 /*23*/].f_8, 0f, 0f, 0f, 0))
					{
						func_17(iParam0, 5);
					}
				}
				break;
			
			case 5:
				if (Local_93.f_2[iParam0 /*23*/].f_3 != -1)
				{
					if (!func_11(Local_288[Local_93.f_2[iParam0 /*23*/].f_3 /*44*/].f_4.f_30, 0f, 0f, 0f, 0))
					{
						if (func_8(iParam0))
						{
							if (vehicle::is_vehicle_stopped(network::net_to_veh(Local_93.f_2[iParam0 /*23*/])) || entity::get_entity_speed(network::net_to_veh(Local_93.f_2[iParam0 /*23*/])) < 2f)
							{
								func_17(iParam0, 6);
							}
						}
					}
				}
				if (vehicle::get_vehicle_number_of_passengers(network::net_to_veh(Local_93.f_2[iParam0 /*23*/])) <= 0)
				{
					func_17(iParam0, 8);
				}
				break;
			
			case 6:
				if (vehicle::get_vehicle_number_of_passengers(network::net_to_veh(Local_93.f_2[iParam0 /*23*/])) <= 0)
				{
					func_17(iParam0, 8);
				}
				else
				{
					func_7(iParam0, 1);
				}
				break;
			
			case 7:
				if (vehicle::get_vehicle_number_of_passengers(network::net_to_veh(Local_93.f_2[iParam0 /*23*/])) <= 0)
				{
					func_17(iParam0, 8);
				}
				break;
			
			case 8:
				func_16(iParam0, 0);
				if (vehicle::get_vehicle_number_of_passengers(network::net_to_veh(Local_93.f_2[iParam0 /*23*/])) > 0)
				{
					gameplay::clear_bit(&(Local_93.f_2[iParam0 /*23*/].f_6), 3);
					if (Local_93.f_2[iParam0 /*23*/].f_3 != -1)
					{
						gameplay::clear_bit(&(Local_288[Local_93.f_2[iParam0 /*23*/].f_3 /*44*/].f_4.f_2), 20);
					}
					func_17(iParam0, 4);
				}
				break;
			
			case 9:
			case 10:
				func_7(iParam0, 0);
				break;
			
			case 11:
				func_16(iParam0, 0);
				break;
			}
	}
	if (!network::network_does_network_id_exist(Local_93.f_2[iParam0 /*23*/]) && !network::network_does_network_id_exist(Local_93.f_2[iParam0 /*23*/].f_1))
	{
		if ((gameplay::is_bit_set(Local_93.f_190, iParam0) && !gameplay::is_bit_set(Local_93.f_190, iParam0 + 8)) && Local_93.f_2[iParam0 /*23*/].f_2 == -1)
		{
			if (Local_93.f_189 > 0)
			{
				Local_93.f_189 = (Local_93.f_189 - 1);
				gameplay::clear_bit(&(Local_93.f_190), iParam0);
				gameplay::set_bit(&(Local_93.f_190), iParam0 + 8);
			}
		}
		if (Local_93.f_2[iParam0 /*23*/].f_3 != -1)
		{
			Local_93.f_2[iParam0 /*23*/].f_3 = -1;
		}
		if (Local_93.f_2[iParam0 /*23*/].f_4 != -1)
		{
			Local_93.f_2[iParam0 /*23*/].f_4 = -1;
		}
	}
}

void func_7(int iParam0, int iParam1)//Position - 0x9B8
{
	int iVar0;
	int iVar1;
	int iVar2;
	
	if (!func_15(Local_93.f_2[iParam0 /*23*/].f_1) && func_13(Local_93.f_2[iParam0 /*23*/]))
	{
		if (network::network_has_control_of_network_id(Local_93.f_2[iParam0 /*23*/].f_1))
		{
			if (vehicle::get_vehicle_number_of_passengers(network::net_to_veh(Local_93.f_2[iParam0 /*23*/])) > 0)
			{
				if (vehicle::get_ped_in_vehicle_seat(network::net_to_veh(Local_93.f_2[iParam0 /*23*/]), -1) == network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1))
				{
					iVar0 = vehicle::get_vehicle_max_number_of_passengers(network::net_to_veh(Local_93.f_2[iParam0 /*23*/]));
					iVar1 = 0;
					iVar1 = 0;
					while (iVar1 < iVar0)
					{
						if (iVar1 != -1)
						{
							iVar2 = vehicle::get_ped_in_vehicle_seat(network::net_to_veh(Local_93.f_2[iParam0 /*23*/]), iVar1);
							if (entity::does_entity_exist(iVar2))
							{
								if (!ped::is_ped_injured(iVar2))
								{
									if (!func_9(iVar2, -828834893, 1) && !func_9(iVar2, 451360105, 1))
									{
										if (iParam1)
										{
											ai::task_leave_any_vehicle(iVar2, 0, 0);
										}
										else
										{
											ai::task_leave_any_vehicle(iVar2, 0, 64);
										}
									}
								}
							}
						}
						iVar1++;
					}
				}
			}
		}
	}
}

bool func_8(int iParam0)//Position - 0xABA
{
	if (Local_93.f_2[iParam0 /*23*/].f_3 != -1)
	{
		if (entity::is_entity_at_coord(network::net_to_ent(Local_93.f_2[iParam0 /*23*/]), Local_288[Local_93.f_2[iParam0 /*23*/].f_3 /*44*/].f_4.f_30, 45f, 45f, 20f, false, true, 0) || gameplay::is_bit_set(Local_288[Local_93.f_2[iParam0 /*23*/].f_3 /*44*/].f_4.f_2, 20))
		{
			gameplay::set_bit(&(Local_288[Local_93.f_2[iParam0 /*23*/].f_3 /*44*/].f_4.f_2), 20);
			if (ai::get_script_task_status(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), 242628503) == 7)
			{
				return true;
			}
		}
	}
	return false;
}

bool func_9(int iParam0, int iParam1, int iParam2)//Position - 0xB62
{
	int iVar0;
	
	iVar0 = ai::get_script_task_status(iParam0, iParam1);
	if (iVar0 == 1 || iVar0 == 0)
	{
		return true;
	}
	else if (!iParam2)
	{
		if (iVar0 == 2 || iVar0 == 3)
		{
			return true;
		}
	}
	return false;
}

bool func_10(int iParam0, int iParam1, int iParam2)//Position - 0xBA8
{
	var uVar0;
	
	uVar0 = iParam0;
	if (network::network_is_player_active(iParam0))
	{
		if (iParam1)
		{
			if (!player::is_player_playing(iParam0))
			{
				return false;
			}
		}
		if (iParam2)
		{
			if (!Global_2428492.f_3[uVar0])
			{
				return false;
			}
		}
		return true;
	}
	return false;
}

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

int func_12(vector3 vParam0, vector3 vParam3, float fParam6)//Position - 0xC33
{
	return system::vdist2(vParam0, vParam3) <= (fParam6 * fParam6);
}

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

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

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

void func_16(int iParam0, int iParam1)//Position - 0xCC5
{
	if ((Local_93.f_2[iParam0 /*23*/].f_2 != -1 || !func_11(Local_93.f_2[iParam0 /*23*/].f_8, 0f, 0f, 0f, 0)) || iParam1)
	{
		if (Local_93.f_2[iParam0 /*23*/].f_2 != -1)
		{
			gameplay::clear_bit(&(Local_288[Local_93.f_2[iParam0 /*23*/].f_2 /*44*/].f_1), 0);
			gameplay::clear_bit(&(Local_93.f_192), Local_93.f_2[iParam0 /*23*/].f_2);
			Local_93.f_2[iParam0 /*23*/].f_2 = -1;
			Local_93.f_187 = (Local_93.f_187 - 1);
		}
		Local_93.f_2[iParam0 /*23*/].f_8 = { 0f, 0f, 0f };
		Local_93.f_2[iParam0 /*23*/].f_11 = 0f;
		Local_93.f_2[iParam0 /*23*/].f_22 = 0;
		Local_93.f_2[iParam0 /*23*/].f_19 = 0;
		gameplay::clear_bit(&(Local_93.f_2[iParam0 /*23*/].f_6), 3);
		iLocal_1716[iParam0] = 0;
	}
}

void func_17(int iParam0, int iParam1)//Position - 0xD91
{
	Local_93.f_2[iParam0 /*23*/].f_7 = iParam1;
}

void func_18(int iParam0)//Position - 0xDA5
{
	if (!network::network_does_network_id_exist(Local_93.f_2[iParam0 /*23*/]))
	{
		if (Local_93.f_2[iParam0 /*23*/].f_2 != -1)
		{
			if (network::network_is_participant_active(player::int_to_participantindex(Local_93.f_2[iParam0 /*23*/].f_2)))
			{
				if (!func_24(Local_288[Local_93.f_2[iParam0 /*23*/].f_2 /*44*/].f_4.f_21))
				{
					if (!gameplay::is_point_obscured_by_a_mission_entity(Local_288[Local_93.f_2[iParam0 /*23*/].f_2 /*44*/].f_4.f_21, 3f, 3f, 3f, 0))
					{
						if (func_19(iParam0, Local_288[Local_93.f_2[iParam0 /*23*/].f_2 /*44*/].f_4.f_21, Local_288[Local_93.f_2[iParam0 /*23*/].f_2 /*44*/].f_4.f_24, 0))
						{
							func_17(iParam0, 1);
						}
					}
				}
			}
		}
	}
	if (func_13(Local_93.f_2[iParam0 /*23*/]))
	{
		Local_93.f_188++;
	}
	if (Local_93.f_2[iParam0 /*23*/].f_2 != -1)
	{
		if (!network::network_is_participant_active(player::int_to_participantindex(Local_93.f_2[iParam0 /*23*/].f_2)))
		{
			gameplay::clear_bit(&(Local_93.f_192), Local_93.f_2[iParam0 /*23*/].f_2);
			Local_93.f_2[iParam0 /*23*/].f_2 = -1;
			Local_93.f_187 = (Local_93.f_187 - 1);
		}
	}
	if (Local_93.f_2[iParam0 /*23*/].f_3 != -1)
	{
		if (!network::network_is_participant_active(player::int_to_participantindex(Local_93.f_2[iParam0 /*23*/].f_3)))
		{
			Local_93.f_2[iParam0 /*23*/].f_3 = -1;
		}
	}
}

bool func_19(var uParam0, vector3 vParam1, float fParam4, int iParam5)//Position - 0xEEA
{
	if (func_23(Global_2460486.f_744) && func_23(Global_2460486.f_745))
	{
		if (!network::network_does_network_id_exist(Local_93.f_2[uParam0 /*23*/]))
		{
			if (func_22(&(Local_93.f_2[uParam0 /*23*/]), Global_2460486.f_744, vParam1, fParam4, 1, 1, 1, 0, 1, 1))
			{
				if (iParam5)
				{
					entity::set_entity_heading(network::net_to_veh(Local_93.f_2[uParam0 /*23*/]), fParam4);
					entity::set_entity_coords(network::net_to_veh(Local_93.f_2[uParam0 /*23*/]), entity::get_offset_from_entity_in_world_coords(network::net_to_veh(Local_93.f_2[uParam0 /*23*/]), 2f, 0f, 0f), 1, false, 0, 1);
				}
				vehicle::set_vehicle_on_ground_properly(network::net_to_veh(Local_93.f_2[uParam0 /*23*/]));
				vehicle::set_vehicle_has_been_owned_by_player(network::net_to_veh(Local_93.f_2[uParam0 /*23*/]), 1);
				vehicle::set_vehicle_automatically_attaches(network::net_to_veh(Local_93.f_2[uParam0 /*23*/]), false, 0);
				vehicle::_0x25367DE49D64CF16(network::net_to_veh(Local_93.f_2[uParam0 /*23*/]), 1);
				network::set_network_id_can_migrate(Local_93.f_2[uParam0 /*23*/], true);
			}
		}
		if (!network::network_does_network_id_exist(Local_93.f_2[uParam0 /*23*/].f_1))
		{
			if (func_21(&(Local_93.f_2[uParam0 /*23*/].f_1), Local_93.f_2[uParam0 /*23*/], 25, Global_2460486.f_745, -1, 1, 1, 1))
			{
				vehicle::set_vehicle_forward_speed(network::net_to_veh(Local_93.f_2[uParam0 /*23*/]), 5f);
				ped::set_blocking_of_non_temporary_events(network::net_to_ped(Local_93.f_2[uParam0 /*23*/].f_1), true);
				streaming::set_model_as_no_longer_needed(Global_2460486.f_744);
				streaming::set_model_as_no_longer_needed(Global_2460486.f_745);
				entity::_0x3910051CCECDB00C(network::net_to_veh(Local_93.f_2[uParam0 /*23*/]), false);
				ped::set_ped_get_out_upside_down_vehicle(network::net_to_ped(Local_93.f_2[uParam0 /*23*/].f_1), 1);
				ped::set_ped_config_flag(network::net_to_ped(Local_93.f_2[uParam0 /*23*/].f_1), 29, true);
				ped::set_ped_config_flag(network::net_to_ped(Local_93.f_2[uParam0 /*23*/].f_1), 251, true);
				ped::set_ped_can_be_dragged_out(network::net_to_ped(Local_93.f_2[uParam0 /*23*/].f_1), 0);
				ped::set_ped_combat_attributes(network::net_to_ped(Local_93.f_2[uParam0 /*23*/].f_1), 5, false);
				ped::set_ped_combat_attributes(network::net_to_ped(Local_93.f_2[uParam0 /*23*/].f_1), 17, true);
				ped::set_ped_flee_attributes(network::net_to_ped(Local_93.f_2[uParam0 /*23*/].f_1), 512, false);
				entity::set_entity_health(network::net_to_ped(Local_93.f_2[uParam0 /*23*/].f_1), system::round((200f * Global_262145.f_151)));
				func_20(&uLocal_2633, 8, network::net_to_ped(Local_93.f_2[uParam0 /*23*/].f_1), "FM_TAXI", 0, 1);
				network::set_network_id_can_migrate(Local_93.f_2[uParam0 /*23*/].f_1, true);
			}
		}
	}
	if (!network::network_does_network_id_exist(Local_93.f_2[uParam0 /*23*/]) || !network::network_does_network_id_exist(Local_93.f_2[uParam0 /*23*/].f_1))
	{
		return false;
	}
	gameplay::clear_bit(&(Local_93.f_2[uParam0 /*23*/].f_6), 4);
	return true;
}

void func_20(var uParam0, int iParam1, int iParam2, char* sParam3, int iParam4, int iParam5)//Position - 0x116A
{
	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_69489)
	{
		if (!ped::is_ped_injured(iParam2))
		{
			if ((uParam0[iParam1 /*10*/])->f_8 == 0)
			{
				ped::set_ped_can_play_ambient_anims(iParam2, 0);
			}
			else
			{
				ped::set_ped_can_play_ambient_anims(iParam2, 1);
			}
		}
		if (!ped::is_ped_injured(iParam2))
		{
			if ((uParam0[iParam1 /*10*/])->f_9 == 0)
			{
				ped::set_ped_can_use_auto_conversation_lookat(iParam2, 0);
			}
			else
			{
				ped::set_ped_can_use_auto_conversation_lookat(iParam2, 1);
			}
		}
	}
}

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

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

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

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

void func_25()//Position - 0x1358
{
	int iVar0;
	int iVar1;
	int iVar2;
	int iVar3;
	
	iVar0 = iLocal_2798;
	if (network::network_is_participant_active(player::int_to_participantindex(iVar0)))
	{
		iVar1 = network::network_get_player_index(player::int_to_participantindex(iVar0));
		iVar2 = player::get_player_ped(iVar1);
		if (!func_10(iVar1, 1, 1))
		{
			iVar3 = 0;
			while (iVar3 < 8)
			{
				if (Local_93.f_2[iVar3 /*23*/].f_2 == iVar0)
				{
					func_16(iVar3, 0);
				}
				if (Local_93.f_2[iVar3 /*23*/].f_3 == iVar0)
				{
					func_32(iVar3);
					Local_93.f_2[iVar3 /*23*/].f_3 = -1;
					if (func_31(&uLocal_1728))
					{
						func_30(&uLocal_1728);
					}
				}
				iVar3++;
			}
		}
		else
		{
			if (!gameplay::is_bit_set(Local_93.f_192, iVar0) && gameplay::is_bit_set(Local_288[iVar0 /*44*/].f_1, 0))
			{
				if (func_29())
				{
					func_28(iVar0);
					gameplay::set_bit(&(Local_93.f_192), iVar0);
				}
				else
				{
					gameplay::clear_bit(&(Local_288[iVar0 /*44*/].f_1), 0);
				}
			}
			iVar3 = 0;
			while (iVar3 < 8)
			{
				if (gameplay::is_bit_set(Local_288[iVar0 /*44*/].f_4.f_2, 18))
				{
					if (Local_93.f_2[iVar3 /*23*/].f_2 != -1)
					{
						func_16(iVar3, 0);
					}
					gameplay::clear_bit(&(Local_288[iVar0 /*44*/].f_4.f_2), 18);
				}
				if (gameplay::is_bit_set(Local_288[iVar0 /*44*/].f_4.f_3, iVar3))
				{
					if (Local_93.f_2[iVar3 /*23*/].f_7 != 11)
					{
						if (Local_93.f_2[iVar3 /*23*/].f_7 != 9)
						{
							if (Local_93.f_2[iVar3 /*23*/].f_7 != 10)
							{
								Local_93.f_2[iVar3 /*23*/].f_4 = iVar0;
								func_17(iVar3, 9);
								func_16(iVar3, 1);
							}
						}
					}
				}
				if (!func_15(Local_93.f_2[iVar3 /*23*/].f_1) && func_13(Local_93.f_2[iVar3 /*23*/]))
				{
					if (Local_93.f_2[iVar3 /*23*/].f_3 == -1)
					{
						if (Local_288[iVar0 /*44*/].f_4.f_1 == iVar3 && Local_93.f_2[iVar3 /*23*/].f_7 == 8)
						{
							func_17(iVar3, 3);
							if (Local_93.f_2[iVar3 /*23*/].f_2 == -1)
							{
								Local_93.f_2[iVar3 /*23*/].f_2 = iVar0;
							}
							Local_288[iVar0 /*44*/].f_4.f_1 = -1;
						}
						if (gameplay::is_bit_set(Local_288[iVar0 /*44*/].f_3, (0 + iVar3)))
						{
							if ((Local_93.f_2[iVar3 /*23*/].f_7 == 8 || Local_93.f_2[iVar3 /*23*/].f_7 == 1) || Local_93.f_2[iVar3 /*23*/].f_7 == 2)
							{
								func_17(iVar3, 3);
							}
						}
						if ((((func_27(iVar1, network::net_to_veh(Local_93.f_2[iVar3 /*23*/])) && Local_93.f_2[iVar3 /*23*/].f_7 != 6) && Local_93.f_2[iVar3 /*23*/].f_7 != 9) && Local_93.f_2[iVar3 /*23*/].f_7 != 10) && Local_93.f_2[iVar3 /*23*/].f_7 != 11)
						{
							gameplay::clear_bit(&(Local_93.f_2[iVar3 /*23*/].f_6), 0);
							gameplay::clear_bit(&(Local_93.f_2[iVar3 /*23*/].f_6), 2);
							if (Local_93.f_2[iVar3 /*23*/].f_2 != -1)
							{
								gameplay::clear_bit(&(Local_93.f_192), Local_93.f_2[iVar3 /*23*/].f_2);
								Local_93.f_2[iVar3 /*23*/].f_2 = -1;
								Local_93.f_187 = (Local_93.f_187 - 1);
							}
							Local_93.f_2[iVar3 /*23*/].f_3 = iVar0;
						}
						else if (entity::is_entity_at_entity(iVar2, network::net_to_veh(Local_93.f_2[iVar3 /*23*/]), 120f, 120f, 120f, 0, 1, 0))
						{
							if (Local_93.f_2[iVar3 /*23*/].f_2 == -1)
							{
								gameplay::clear_bit(&(Local_93.f_2[iVar3 /*23*/].f_6), 2);
							}
							else if (Local_93.f_2[iVar3 /*23*/].f_2 == iVar0)
							{
								gameplay::clear_bit(&(Local_93.f_2[iVar3 /*23*/].f_6), 2);
							}
							gameplay::clear_bit(&(Local_93.f_2[iVar3 /*23*/].f_6), 0);
						}
						else if (entity::is_entity_at_entity(iVar2, network::net_to_veh(Local_93.f_2[iVar3 /*23*/]), 300f, 300f, 300f, 0, 1, 0))
						{
							gameplay::clear_bit(&(Local_93.f_2[iVar3 /*23*/].f_6), 0);
						}
						if (player::get_player_wanted_level(iVar1) > 0)
						{
							if (Local_93.f_2[iVar3 /*23*/].f_2 == iVar0)
							{
								gameplay::set_bit(&(Local_93.f_2[iVar3 /*23*/].f_6), 2);
							}
						}
					}
					else if (Local_93.f_2[iVar3 /*23*/].f_3 == iVar0)
					{
						if (!func_27(iVar1, network::net_to_veh(Local_93.f_2[iVar3 /*23*/])))
						{
							func_16(iVar3, 1);
							Local_93.f_2[iVar3 /*23*/].f_3 = -1;
						}
						else
						{
							if (Local_93.f_2[iVar3 /*23*/].f_7 == 5 || Local_93.f_2[iVar3 /*23*/].f_7 == 7)
							{
								if (!gameplay::is_bit_set(Local_93.f_2[iVar3 /*23*/].f_6, 3) && gameplay::is_bit_set(Local_288[iVar0 /*44*/].f_4.f_2, 3))
								{
									gameplay::set_bit(&(Local_93.f_2[iVar3 /*23*/].f_6), 3);
									gameplay::clear_bit(&(Local_288[iVar0 /*44*/].f_4.f_2), 4);
									gameplay::clear_bit(&(Local_288[iVar0 /*44*/].f_4.f_2), 5);
									func_17(iVar3, 5);
								}
								else if (gameplay::is_bit_set(Local_288[iVar0 /*44*/].f_4.f_2, 4))
								{
									gameplay::clear_bit(&(Local_288[iVar0 /*44*/].f_4.f_2), 4);
									func_17(iVar3, 7);
								}
								else if (Local_93.f_2[iVar3 /*23*/].f_7 == 7)
								{
									if (gameplay::is_bit_set(Local_288[iVar0 /*44*/].f_4.f_2, 5))
									{
										gameplay::clear_bit(&(Local_288[iVar0 /*44*/].f_4.f_2), 5);
										func_17(iVar3, 5);
									}
								}
							}
							if ((Local_93.f_2[iVar3 /*23*/].f_7 == 5 || Local_93.f_2[iVar3 /*23*/].f_7 == 7) || Local_93.f_2[iVar3 /*23*/].f_7 == 4)
							{
								if (Local_93.f_2[iVar3 /*23*/].f_19 != Local_288[iVar0 /*44*/].f_4.f_15)
								{
									Local_93.f_2[iVar3 /*23*/].f_8 = { Local_288[iVar0 /*44*/].f_4.f_5 };
									Local_93.f_2[iVar3 /*23*/].f_11 = Local_288[iVar0 /*44*/].f_4.f_14;
									Local_93.f_2[iVar3 /*23*/].f_19 = Local_288[iVar0 /*44*/].f_4.f_15;
									func_17(iVar3, 5);
									gameplay::clear_bit(&(Local_288[iVar0 /*44*/].f_4.f_2), 20);
								}
							}
						}
						gameplay::clear_bit(&(Local_93.f_2[iVar3 /*23*/].f_6), 0);
						gameplay::clear_bit(&(Local_93.f_2[iVar3 /*23*/].f_6), 2);
					}
					if (Local_288[iVar0 /*44*/].f_4.f_19 == iVar3 && Local_93.f_2[iVar3 /*23*/].f_22 == 0)
					{
						if (Local_288[iVar0 /*44*/].f_4.f_18 != 0)
						{
							Local_93.f_2[iVar3 /*23*/].f_22 = Local_288[iVar0 /*44*/].f_4.f_18;
							Local_288[network::participant_id_to_int() /*44*/].f_4.f_19 = -1;
							Local_288[iVar0 /*44*/].f_4.f_18 = 0;
						}
					}
					else if (gameplay::is_bit_set(Local_288[iVar0 /*44*/].f_4.f_2, 6))
					{
						Local_93.f_2[iVar3 /*23*/].f_22 = 0;
						Local_288[iVar0 /*44*/].f_4.f_19 = -1;
						gameplay::clear_bit(&(Local_288[iVar0 /*44*/].f_4.f_2), 6);
					}
				}
				else if (gameplay::is_bit_set(Local_288[iVar0 /*44*/].f_1, 0) || Local_93.f_2[iVar3 /*23*/].f_2 == iVar0)
				{
					gameplay::clear_bit(&(Local_93.f_2[iVar3 /*23*/].f_6), 0);
					gameplay::clear_bit(&(Local_93.f_2[iVar3 /*23*/].f_6), 2);
				}
				else
				{
					if (network::network_does_network_id_exist(Local_93.f_2[iVar3 /*23*/].f_1))
					{
						func_26(&(Local_93.f_2[iVar3 /*23*/].f_1));
					}
					if (network::network_does_network_id_exist(Local_93.f_2[iVar3 /*23*/]))
					{
						func_26(&(Local_93.f_2[iVar3 /*23*/]));
					}
					if (Local_93.f_2[iVar3 /*23*/].f_2 == -1)
					{
						func_16(iVar3, 0);
					}
					if (Local_93.f_2[iVar3 /*23*/].f_3 != -1)
					{
						func_16(iVar3, 1);
						Local_93.f_2[iVar3 /*23*/].f_3 = -1;
					}
				}
				iVar3++;
			}
		}
	}
}

void func_26(var uParam0)//Position - 0x1A80
{
	int iVar0;
	
	if (network::network_does_entity_exist_with_network_id(*uParam0))
	{
		iVar0 = network::net_to_ent(*uParam0);
		entity::set_entity_as_no_longer_needed(&iVar0);
	}
}

bool func_27(int iParam0, int iParam1)//Position - 0x1AA4
{
	int iVar0;
	int iVar1;
	int iVar2;
	
	iVar1 = vehicle::get_vehicle_max_number_of_passengers(iParam1) + 1;
	if (!entity::is_entity_dead(iParam1, 0))
	{
		iVar0 = 0;
		while (iVar0 < iVar1)
		{
			if (!vehicle::is_vehicle_seat_free(iParam1, (iVar0 - 1)))
			{
				iVar2 = vehicle::get_ped_in_vehicle_seat(iParam1, (iVar0 - 1));
				if (!ped::is_ped_injured(iVar2))
				{
					if (ped::is_ped_a_player(iVar2))
					{
						if (player::get_player_ped(iParam0) == iVar2)
						{
							return true;
						}
					}
				}
			}
			iVar0++;
		}
	}
	return false;
}

void func_28(int iParam0)//Position - 0x1B11
{
	int iVar0;
	
	iVar0 = 0;
	while (iVar0 < 8)
	{
		if (Local_93.f_2[iVar0 /*23*/].f_2 == -1 && !network::network_does_network_id_exist(Local_93.f_2[iVar0 /*23*/]))
		{
			Local_93.f_2[iVar0 /*23*/].f_2 = iParam0;
			Local_93.f_187++;
			Local_93.f_189++;
			gameplay::set_bit(&(Local_93.f_190), iVar0);
			gameplay::clear_bit(&(Local_93.f_190), iVar0 + 8);
			gameplay::clear_bit(&(Local_288[iParam0 /*44*/].f_1), 0);
			gameplay::set_bit(&(Local_93.f_2[iVar0 /*23*/].f_6), 4);
			return;
		}
		iVar0++;
	}
}

bool func_29()//Position - 0x1BA3
{
	if (Local_93.f_187 >= 8 || Local_93.f_188 >= 8)
	{
		return false;
	}
	return true;
}

void func_30(var uParam0)//Position - 0x1BC7
{
	uParam0->f_1 = 0;
}

var func_31(var uParam0)//Position - 0x1BD4
{
	return uParam0->f_1;
}

void func_32(int iParam0)//Position - 0x1BE0
{
	int iVar0;
	vector3 vVar1;
	
	Local_288[network::participant_id_to_int() /*44*/].f_4.f_4 = vLocal_1746[iLocal_1732 /*3*/];
	if (ui::does_blip_exist(Local_288[network::participant_id_to_int() /*44*/].f_4.f_4))
	{
	}
	iVar0 = 0;
	while (iVar0 < 50)
	{
		vLocal_1746[iVar0 /*3*/] = { vVar1 };
		iVar0++;
	}
	iLocal_1731 = 0;
}

bool func_33(var uParam0)//Position - 0x1C35
{
	if (uParam0->f_1)
	{
		if (gameplay::absi(network::get_time_difference(network::get_network_time(), *uParam0)) >= 1000)
		{
			return true;
		}
	}
	return false;
}

void func_34(var uParam0)//Position - 0x1C5E
{
	if (!uParam0->f_1)
	{
		if (network::network_is_host_of_this_script())
		{
			func_35(uParam0, 0, 0);
		}
	}
}

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

void func_36()//Position - 0x1CC2
{
	int iVar0;
	
	gameplay::clear_bit(&(Global_2460486.f_743), 1);
	func_307();
	func_306();
	func_287(iLocal_2632);
	func_207();
	func_182(iLocal_2632);
	func_181(iLocal_2632);
	func_179(iLocal_2632);
	if (iLocal_2629 != iLocal_2632)
	{
		func_182(iLocal_2629);
		func_181(iLocal_2629);
		func_179(iLocal_2629);
	}
	iLocal_2632++;
	if (iLocal_2632 == 8)
	{
		fLocal_2631 = 99999f;
		iLocal_2629 = iLocal_2630;
		iLocal_2632 = 0;
	}
	func_43(iLocal_2629);
	if (func_10(player::player_id(), 1, 1))
	{
		if (!ped::is_ped_in_any_vehicle(player::player_ped_id(), 0))
		{
			iVar0 = 0;
			while (iVar0 < 8)
			{
				if (Local_93.f_2[iVar0 /*23*/].f_3 == network::participant_id_to_int())
				{
					func_37(1, 1, 1);
				}
				iVar0++;
			}
			func_37(0, 0, 0);
		}
	}
	else
	{
		if (network::network_is_participant_active(network::participant_id()))
		{
			iVar0 = 0;
			while (iVar0 < 8)
			{
				if (Local_93.f_2[iVar0 /*23*/].f_3 == network::participant_id_to_int())
				{
					func_37(1, 1, 1);
				}
				iVar0++;
			}
		}
		func_37(1, 1, 0);
	}
}

void func_37(int iParam0, int iParam1, int iParam2)//Position - 0x1DD1
{
	int iVar0;
	vector3 vVar1;
	
	if (((((((Local_288[network::participant_id_to_int() /*44*/].f_4 != -1 || !func_11(Local_288[network::participant_id_to_int() /*44*/].f_4.f_5, 0f, 0f, 0f, 0)) || iLocal_1904 != iLocal_1903) || Local_288[network::participant_id_to_int() /*44*/].f_4.f_18 != 0) || Local_288[network::participant_id_to_int() /*44*/].f_4.f_19 != -1) || gameplay::is_bit_set(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2, 10)) || gameplay::is_bit_set(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2, 17)) || iParam2)
	{
		gameplay::clear_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2), 2);
		gameplay::clear_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2), 3);
		gameplay::clear_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2), 4);
		gameplay::clear_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2), 5);
		gameplay::clear_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2), 7);
		gameplay::clear_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2), 10);
		gameplay::clear_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2), 11);
		gameplay::clear_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2), 12);
		gameplay::clear_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2), 13);
		gameplay::clear_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2), 14);
		gameplay::clear_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2), 20);
		gameplay::clear_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2), 21);
		gameplay::clear_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2), 22);
		gameplay::clear_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2), 23);
		gameplay::clear_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2), 24);
		gameplay::clear_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2), 25);
		Local_288[network::participant_id_to_int() /*44*/].f_4.f_5 = { 0f, 0f, 0f };
		Local_288[network::participant_id_to_int() /*44*/].f_4.f_14 = 0f;
		Local_288[network::participant_id_to_int() /*44*/].f_4.f_15 = 0;
		Local_288[network::participant_id_to_int() /*44*/].f_4 = -1;
		Local_288[network::participant_id_to_int() /*44*/].f_4.f_1 = -1;
		Local_288[network::participant_id_to_int() /*44*/].f_4.f_34 = -1;
		Local_288[network::participant_id_to_int() /*44*/].f_4.f_26 = { 0f, 0f, 0f };
		Local_288[network::participant_id_to_int() /*44*/].f_4.f_29 = 0f;
		Local_288[network::participant_id_to_int() /*44*/].f_4.f_30 = { 0f, 0f, 0f };
		Local_288[network::participant_id_to_int() /*44*/].f_4.f_33 = 0f;
		Local_288[network::participant_id_to_int() /*44*/].f_4.f_35 = -1;
		Local_288[network::participant_id_to_int() /*44*/].f_4.f_36 = { 0f, 0f, 0f };
		iVar0 = 0;
		while (iVar0 < 50)
		{
			vLocal_1746[iVar0 /*3*/] = { vVar1 };
			iVar0++;
		}
		iLocal_1732 = 0;
		iLocal_1734 = 0;
		iLocal_1735 = 0;
		iLocal_1899 = false;
		Global_100207 = 0;
		fLocal_1909 = system::to_float(iLocal_1903);
		iLocal_1904 = iLocal_1903;
		iLocal_1905 = iLocal_1903;
		func_30(&uLocal_1907);
		fLocal_1906 = fLocal_1906;
		vLocal_1910 = { entity::get_entity_coords(player::player_ped_id(), 0) };
		Local_288[network::participant_id_to_int() /*44*/].f_4.f_18 = 0;
		Local_288[network::participant_id_to_int() /*44*/].f_4.f_19 = -1;
		func_40(1, -1);
		cam::set_cinematic_button_active(true);
		streaming::remove_anim_dict("ODDJOBS@TAXI@DRIVER");
		Local_288[network::participant_id_to_int() /*44*/].f_4.f_4 = 0;
		func_30(&uLocal_1726);
	}
	if (iParam0 == 1)
	{
		Local_288[network::participant_id_to_int() /*44*/].f_4.f_21 = { 0f, 0f, 0f };
		Local_288[network::participant_id_to_int() /*44*/].f_4.f_24 = 0f;
		Local_288[network::participant_id_to_int() /*44*/].f_4.f_26 = { 0f, 0f, 0f };
		Local_288[network::participant_id_to_int() /*44*/].f_4.f_29 = 0f;
	}
	if (gameplay::is_bit_set(Global_2460486.f_743, 2))
	{
		gameplay::clear_bit(&(Global_2460486.f_743), 2);
	}
	if (ui::is_named_rendertarget_registered("taxi"))
	{
		ui::release_named_rendertarget("taxi");
	}
	if (entity::does_entity_exist(iLocal_1736))
	{
		object::delete_object(&iLocal_1736);
		streaming::set_model_as_no_longer_needed(iLocal_1737);
	}
	if (cam::does_cam_exist(iLocal_2612))
	{
		cam::set_cam_active(iLocal_2612, false);
		cam::destroy_cam(iLocal_2612, 0);
		cam::render_script_cams(false, false, 3000, 1, 0, 0);
		func_38();
	}
	if (iLocal_2611 == 0)
	{
		iLocal_2611 = 1;
	}
	if (iParam1 == 1 && Local_288[network::participant_id_to_int() /*44*/].f_1 != 0)
	{
		Local_288[network::participant_id_to_int() /*44*/].f_1 = 0;
	}
}

void func_38()//Position - 0x21E7
{
	func_39(4, 0, -1);
	ui::unlock_minimap_position();
	ui::unlock_minimap_angle();
	ui::set_radar_zoom(0);
	cam::set_follow_vehicle_cam_zoom_level(iLocal_2613);
	graphics::set_particle_fx_cam_inside_vehicle(0);
}

void func_39(int iParam0, int iParam1, int iParam2)//Position - 0x220F
{
	switch (iParam0)
	{
		case 5:
			if (iParam2 > -1)
			{
				Global_1338622.f_137[iParam2] = iParam1;
			}
			break;
		
		default:
			if (iParam1)
			{
				gameplay::set_bit(&(Global_1338622.f_947), iParam0);
			}
			else
			{
				gameplay::clear_bit(&(Global_1338622.f_947), iParam0);
			}
			break;
	}
}

void func_40(int iParam0, int iParam1)//Position - 0x225E
{
	var uVar0;
	
	if (!func_42(&uVar0, 0, iParam1))
	{
		return;
	}
	if (Global_17257.f_7862)
	{
		ui::reset_hud_component_values(15);
		Global_17257.f_7862 = 0;
	}
	ui::_0x55598D21339CB998(0f);
	if (Global_17257.f_5498[uVar0])
	{
		ui::clear_additional_text(9, false);
		Global_17257.f_5498[uVar0] = 0;
	}
	if (Global_17257.f_5484[uVar0])
	{
		graphics::set_streamed_texture_dict_as_no_longer_needed("CommonMenu");
		Global_17257.f_5484[uVar0] = 0;
	}
	if (Global_17257.f_5491[uVar0])
	{
		graphics::set_streamed_texture_dict_as_no_longer_needed("MPShopSale");
		Global_17257.f_5491[uVar0] = 0;
	}
	if (iParam0)
	{
		func_41(&(Global_17257.f_5530[uVar0 /*10*/]));
		Global_17257.f_5591[uVar0] = 0;
	}
	else
	{
		Global_17257.f_5591[uVar0] = 0;
	}
}

void func_41(int iParam0)//Position - 0x231A
{
	if (iParam0->f_9 != 0)
	{
		if (graphics::has_scaleform_movie_loaded(*iParam0))
		{
			graphics::set_scaleform_movie_as_no_longer_needed(iParam0);
		}
		*iParam0 = 0;
		iParam0->f_9 = 0;
	}
}

bool func_42(var uParam0, int iParam1, int iParam2)//Position - 0x2343
{
	char cVar0[64];
	int iVar16;
	int iVar17;
	int iVar18;
	
	if (iParam2 == -1)
	{
		if (network::network_is_game_in_progress() && network::network_get_this_script_is_network_script())
		{
			iParam2 = network::_0x638A3A81733086DB();
		}
	}
	StringCopy(&cVar0, script::get_this_script_name(), 64);
	StringIntConCat(&cVar0, iParam2, 64);
	iVar16 = gameplay::get_hash_key(&cVar0);
	iVar18 = -1;
	iVar17 = 0;
	while (iVar17 < 6)
	{
		if (Global_17257.f_5591[iVar17] == iVar16)
		{
			*uParam0 = iVar17;
			return true;
		}
		else if (Global_17257.f_5591[iVar17] == 0)
		{
			iVar18 = iVar17;
		}
		iVar17++;
	}
	if (iParam1)
	{
		if (iVar18 != -1)
		{
			Global_17257.f_5591[iVar18] = iVar16;
			*uParam0 = iVar18;
			return true;
		}
	}
	return false;
}

void func_43(int iParam0)//Position - 0x23E0
{
	if (func_10(player::player_id(), 1, 1))
	{
		if (!func_15(Local_93.f_2[iParam0 /*23*/].f_1) && func_13(Local_93.f_2[iParam0 /*23*/]))
		{
			if (ped::is_ped_in_vehicle(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), network::net_to_veh(Local_93.f_2[iParam0 /*23*/]), 0))
			{
				func_173(iParam0);
				func_166(iParam0);
				func_49(iParam0);
			}
			else
			{
				func_44(iParam0);
			}
		}
		else
		{
			func_44(iParam0);
		}
	}
	else
	{
		func_44(iParam0);
	}
}

void func_44(int iParam0)//Position - 0x2467
{
	if (gameplay::is_bit_set(iLocal_1697, (0 + iParam0)))
	{
		gameplay::clear_bit(&iLocal_1697, (0 + iParam0));
		if (func_31(&uLocal_1728))
		{
			func_30(&uLocal_1728);
		}
		if (func_48("TXM_H02"))
		{
			ui::clear_help(1);
		}
	}
	if (gameplay::is_bit_set(Local_288[network::participant_id_to_int() /*44*/].f_3, (0 + iParam0)))
	{
		if (!ped::is_ped_in_any_vehicle(player::player_ped_id(), 0))
		{
			ai::clear_ped_tasks(player::player_ped_id());
			iLocal_1900 = 0;
		}
		gameplay::clear_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_3), (0 + iParam0));
	}
	func_46(&(uLocal_1707[iParam0]));
	if (Local_288[network::participant_id_to_int() /*44*/].f_4 == iParam0)
	{
		func_37(1, 1, 0);
	}
	func_45(iParam0);
}

void func_45(int iParam0)//Position - 0x2512
{
	if (ui::does_blip_exist(iLocal_1698[iParam0]))
	{
		ui::remove_blip(&(iLocal_1698[iParam0]));
		gameplay::clear_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2), 12);
	}
}

void func_46(var uParam0)//Position - 0x2546
{
	int iVar0;
	
	if (*uParam0 == -1)
	{
		return;
	}
	iVar0 = func_47(*uParam0);
	if (iVar0 == -1)
	{
		*uParam0 = -1;
		return;
	}
	if (iVar0 > -1 && iVar0 < 6)
	{
		if (Global_36411[iVar0 /*32*/])
		{
			Global_36411[iVar0 /*32*/].f_7 = 1;
			*uParam0 = -1;
			return;
		}
	}
	*uParam0 = -1;
}

int func_47(int iParam0)//Position - 0x259D
{
	int iVar0;
	
	if (iParam0 < 0)
	{
		return -1;
	}
	iVar0 = 0;
	iVar0 = 0;
	while (iVar0 < 6)
	{
		if (Global_36411[iVar0 /*32*/].f_1 == iParam0)
		{
			return iVar0;
		}
		iVar0++;
	}
	return -1;
}

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

void func_49(int iParam0)//Position - 0x25EB
{
	if ((ped::is_ped_in_vehicle(player::player_ped_id(), network::net_to_veh(Local_93.f_2[iParam0 /*23*/]), 0) && !ped::is_ped_jacking(player::player_ped_id())) && !ped::is_ped_being_jacked(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1)))
	{
		streaming::request_anim_dict("ODDJOBS@TAXI@DRIVER");
		if (func_165(iParam0) && streaming::has_anim_dict_loaded("ODDJOBS@TAXI@DRIVER"))
		{
			if (Local_93.f_2[iParam0 /*23*/].f_7 == 6)
			{
				if (cam::does_cam_exist(iLocal_2612))
				{
					cam::set_cam_active(iLocal_2612, false);
					cam::destroy_cam(iLocal_2612, 0);
					cam::render_script_cams(false, false, 3000, 1, 0, 0);
					func_38();
				}
				if (vehicle::is_vehicle_stopped(network::net_to_veh(Local_93.f_2[iParam0 /*23*/])))
				{
					func_147(iParam0);
				}
			}
			else
			{
				if ((player::get_player_wanted_level(player::player_id()) > 0 || Local_93.f_2[iParam0 /*23*/].f_7 == 9) || Local_93.f_2[iParam0 /*23*/].f_7 == 10)
				{
					func_7(iParam0, 0);
				}
				func_86(iParam0);
			}
			if (Local_288[network::participant_id_to_int() /*44*/].f_4 != iParam0)
			{
				Local_288[network::participant_id_to_int() /*44*/].f_4 = iParam0;
				gameplay::set_bit(&(Global_2460486.f_743), 2);
			}
			func_80(iParam0);
			func_79(iParam0);
		}
		func_55(iParam0);
		controls::_0x7F4724035FDCA1DD(0);
		controls::_0x7F4724035FDCA1DD(1);
		controls::_0x7F4724035FDCA1DD(2);
		func_54();
		func_53();
		ped::set_ped_combat_attributes(player::player_ped_id(), 2, false);
		controls::disable_control_action(0, 99, 1);
		controls::disable_control_action(0, 100, 1);
		controls::disable_control_action(0, 25, 1);
		controls::disable_control_action(0, 73, 1);
		controls::disable_control_action(0, 200, 1);
		func_52();
		if (Local_93.f_2[iParam0 /*23*/].f_3 == network::participant_id_to_int())
		{
			ped::set_ped_reset_flag(player::player_ped_id(), 376, true);
		}
		if (func_51() || func_50(0))
		{
			controls::disable_control_action(0, 75, 1);
		}
	}
	else if (Local_288[network::participant_id_to_int() /*44*/].f_4 == iParam0)
	{
		if (player::is_player_control_on(player::player_id()))
		{
			if (player::get_player_wanted_level(player::player_id()) == 0)
			{
				if ((Local_93.f_2[iParam0 /*23*/].f_7 != 9 && Local_93.f_2[iParam0 /*23*/].f_7 != 10) && !gameplay::is_bit_set(Local_288[network::participant_id_to_int() /*44*/].f_4.f_3, iParam0))
				{
					func_147(iParam0);
				}
			}
			else
			{
				gameplay::set_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_4.f_3), iParam0);
			}
		}
		func_37(1, 1, 0);
		func_32(iParam0);
		if (func_31(&uLocal_1728))
		{
			func_30(&uLocal_1728);
		}
	}
}

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

var func_51()//Position - 0x289F
{
	return Global_68058;
}

void func_52()//Position - 0x28AB
{
	Global_2469052.f_258 = 1;
}

void func_53()//Position - 0x28BB
{
	Global_2460486.f_4391 = 0;
}

void func_54()//Position - 0x28CB
{
	gameplay::set_bit(&Global_2284, 4);
}

void func_55(int iParam0)//Position - 0x28DB
{
	char* sVar0;
	
	if (func_69())
	{
		if (graphics::has_scaleform_movie_loaded(iLocal_1913))
		{
			if (Local_93.f_2[iParam0 /*23*/].f_3 == network::participant_id_to_int())
			{
				sVar0 = controls::_get_control_action_name(2, 218, true);
				if (!gameplay::are_strings_equal(sLocal_2614, sVar0))
				{
					sLocal_2614 = sVar0;
					iLocal_2610 = 1;
				}
			}
			if (iLocal_2610 == 1)
			{
				Local_2601 = { func_68() };
				func_66(&uLocal_1914);
				func_65(0, 75, "TXM_EXIT", &uLocal_1914, 0, 344);
				if (Local_93.f_2[iParam0 /*23*/].f_3 == network::participant_id_to_int())
				{
					if (Local_93.f_2[iParam0 /*23*/].f_7 != 6)
					{
						if (Global_100207 == 1 || iLocal_1899 == 1)
						{
							if (iLocal_1731 > 1)
							{
								func_65(2, 218, "TXM_CDES", &uLocal_1914, 0, 344);
							}
						}
						if (!iLocal_1899)
						{
							if (Local_288[network::participant_id_to_int() /*44*/].f_4.f_15 != vLocal_1746[iLocal_1732 /*3*/])
							{
								func_65(0, 176, "TXM_SLCT", &uLocal_1914, 0, 344);
							}
						}
						else if (Local_93.f_2[iParam0 /*23*/].f_7 == 5)
						{
							if (!gameplay::is_bit_set(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2, 4))
							{
								func_65(0, 177, "TXM_STOP", &uLocal_1914, 0, 344);
							}
							if (iLocal_1897)
							{
								func_65(0, 176, "TXM_SLCT", &uLocal_1914, 0, 344);
							}
							if (!gameplay::is_bit_set(Local_93.f_2[iParam0 /*23*/].f_6, 3) && !gameplay::is_bit_set(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2, 3))
							{
								if (Local_93.f_2[iParam0 /*23*/].f_7 == 5)
								{
									func_65(0, 179, "TXM_HURY", &uLocal_1914, 0, 344);
								}
							}
						}
						else if (Local_93.f_2[iParam0 /*23*/].f_7 == 7)
						{
							if (!gameplay::is_bit_set(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2, 5))
							{
								func_65(0, 177, "TXM_STRT", &uLocal_1914, 0, 344);
							}
							if (iLocal_1897)
							{
								func_65(0, 176, "TXM_SLCT", &uLocal_1914, 0, 344);
							}
						}
						if (controls::_is_input_disabled(2))
						{
							func_65(2, 199, "SPEC_PAUSE", &uLocal_1914, 0, 344);
						}
					}
				}
				iLocal_2610 = 0;
			}
			ui::set_text_render_id(ui::get_default_script_rendertarget_render_id());
			graphics::_0xC6372ECD45D73BCD(0);
			func_64(1);
			func_63(1);
			func_56(&iLocal_1913, &Local_2601, &uLocal_1914, func_62(&uLocal_1914));
		}
		else
		{
			iLocal_1913 = unk_0x67D02A194A2FC2BD("instructional_buttons");
		}
	}
	else
	{
		graphics::set_scaleform_movie_as_no_longer_needed(&iLocal_1913);
		iLocal_2610 = 1;
	}
}

void func_56(int iParam0, var uParam1, var uParam2, int iParam3)//Position - 0x2B0B
{
	int iVar0;
	int iVar1;
	int iVar2;
	int iVar3;
	int iVar4;
	int iVar5;
	
	if (iParam3 == 1 || controls::_0x6CD79468A1E595C6(2))
	{
		*uParam2 = 0;
		if (graphics::has_scaleform_movie_loaded(*iParam0))
		{
			if (gameplay::is_pc_version())
			{
				graphics::_push_scaleform_movie_function(*iParam0, "TOGGLE_MOUSE_BUTTONS");
				graphics::_push_scaleform_movie_function_parameter_bool(false);
				graphics::_pop_scaleform_movie_function_void();
			}
			graphics::_push_scaleform_movie_function(*iParam0, "CLEAR_ALL");
			graphics::_pop_scaleform_movie_function_void();
		}
		func_61(uParam2);
	}
	if (Global_1318755 < 2)
	{
		func_63(1);
	}
	if (*uParam2 == 0)
	{
		if (!graphics::has_scaleform_movie_loaded(*iParam0))
		{
			*iParam0 = unk_0x67D02A194A2FC2BD("instructional_buttons");
		}
		if (graphics::has_scaleform_movie_loaded(*iParam0))
		{
			graphics::call_scaleform_movie_method(*iParam0, "CLEAR_ALL");
			if (gameplay::is_pc_version())
			{
				graphics::_push_scaleform_movie_function(*iParam0, "TOGGLE_MOUSE_BUTTONS");
				graphics::_push_scaleform_movie_function_parameter_bool(true);
				graphics::_pop_scaleform_movie_function_void();
			}
			iVar0 = 0;
			iVar0 = 0;
			while (iVar0 < uParam2->f_680)
			{
				if (gameplay::is_bit_set(uParam2->f_676, iVar0))
				{
					graphics::_push_scaleform_movie_function(*iParam0, "SET_DATA_SLOT");
					graphics::_push_scaleform_movie_function_parameter_int(iVar0);
					if (!gameplay::is_bit_set(uParam2->f_677, iVar0))
					{
						iVar1 = uParam2->f_1[iVar0 /*56*/].f_53;
						iVar2 = uParam2->f_1[iVar0 /*56*/].f_54;
						iVar3 = uParam2->f_1[iVar0 /*56*/].f_55;
						func_60(controls::_get_control_action_name(iVar1, iVar2, true));
						if (iVar3 < 344)
						{
							func_60(controls::_get_control_action_name(iVar1, iVar3, true));
						}
					}
					else
					{
						iVar4 = uParam2->f_1[iVar0 /*56*/].f_53;
						iVar5 = uParam2->f_1[iVar0 /*56*/].f_54;
						func_60(controls::_0x80C2FD58D720C801(iVar4, iVar5, true));
					}
					if (gameplay::is_bit_set(uParam2->f_674, iVar0))
					{
						graphics::_begin_text_component(&(uParam2->f_1[iVar0 /*56*/].f_32));
						if (uParam2->f_681 == iVar0)
						{
							ui::add_text_component_substring_time(uParam2->f_1[iVar0 /*56*/].f_36, 70);
						}
						else
						{
							ui::add_text_component_integer(uParam2->f_1[iVar0 /*56*/].f_36);
						}
						graphics::_end_text_component();
					}
					else if (gameplay::is_bit_set(uParam2->f_675, iVar0))
					{
						graphics::_begin_text_component(&(uParam2->f_1[iVar0 /*56*/].f_32));
						ui::add_text_component_substring_player_name(&(uParam2->f_1[iVar0 /*56*/].f_37));
						graphics::_end_text_component();
					}
					else
					{
						func_59(&(uParam2->f_1[iVar0 /*56*/].f_32));
					}
					if (gameplay::is_pc_version())
					{
						if (gameplay::is_bit_set(uParam2->f_678, iVar0))
						{
							graphics::_push_scaleform_movie_function_parameter_bool(true);
							graphics::_push_scaleform_movie_function_parameter_int(uParam2->f_1[iVar0 /*56*/].f_54);
						}
						else
						{
							graphics::_push_scaleform_movie_function_parameter_bool(false);
							graphics::_push_scaleform_movie_function_parameter_int(344);
						}
					}
					graphics::_pop_scaleform_movie_function_void();
				}
				else
				{
					graphics::_push_scaleform_movie_function(*iParam0, "SET_DATA_SLOT");
					graphics::_push_scaleform_movie_function_parameter_int(iVar0);
					func_60(&(uParam2->f_1[iVar0 /*56*/]));
					if (!gameplay::is_string_null_or_empty(&(uParam2->f_1[iVar0 /*56*/].f_16)))
					{
						func_60(&(uParam2->f_1[iVar0 /*56*/].f_16));
					}
					if (gameplay::is_bit_set(uParam2->f_674, iVar0))
					{
						graphics::_begin_text_component(&(uParam2->f_1[iVar0 /*56*/].f_32));
						if (uParam2->f_681 == iVar0)
						{
							ui::add_text_component_substring_time(uParam2->f_1[iVar0 /*56*/].f_36, 70);
						}
						else
						{
							ui::add_text_component_integer(uParam2->f_1[iVar0 /*56*/].f_36);
						}
						graphics::_end_text_component();
					}
					else if (gameplay::is_bit_set(uParam2->f_675, iVar0))
					{
						graphics::_begin_text_component(&(uParam2->f_1[iVar0 /*56*/].f_32));
						ui::add_text_component_substring_player_name(&(uParam2->f_1[iVar0 /*56*/].f_37));
						graphics::_end_text_component();
					}
					else
					{
						func_59(&(uParam2->f_1[iVar0 /*56*/].f_32));
					}
					if (gameplay::is_pc_version())
					{
						graphics::_push_scaleform_movie_function_parameter_bool(false);
						graphics::_push_scaleform_movie_function_parameter_int(344);
					}
					graphics::_pop_scaleform_movie_function_void();
				}
				iVar0++;
			}
			graphics::_push_scaleform_movie_function(*iParam0, "SET_MAX_WIDTH");
			graphics::_push_scaleform_movie_function_parameter_float(uParam2->f_686);
			graphics::_pop_scaleform_movie_function_void();
			graphics::_push_scaleform_movie_function(*iParam0, "DRAW_INSTRUCTIONAL_BUTTONS");
			graphics::_push_scaleform_movie_function_parameter_int(0);
			graphics::_pop_scaleform_movie_function_void();
			*uParam2 = 1;
		}
	}
	uParam2->f_682 = 0.05f;
	uParam2->f_683 = 0.045f;
	uParam2->f_684 = 0f;
	uParam2->f_685 = 0f;
	if (*uParam2 == 1)
	{
		func_58(*iParam0, uParam1);
	}
	func_57();
}

void func_57()//Position - 0x2E80
{
	ui::hide_hud_component_this_frame(7);
	ui::hide_hud_component_this_frame(6);
	ui::hide_hud_component_this_frame(8);
	ui::hide_hud_component_this_frame(9);
}

void func_58(int iParam0, var uParam1)//Position - 0x2E9E
{
	graphics::draw_scaleform_movie_fullscreen(iParam0, uParam1->f_4, uParam1->f_5, uParam1->f_6, uParam1->f_7, 0);
}

void func_59(char* sParam0)//Position - 0x2EBD
{
	graphics::_begin_text_component(sParam0);
	graphics::_end_text_component();
}

void func_60(char* sParam0)//Position - 0x2ECF
{
	graphics::_0xE83A3E3557A56640(sParam0);
}

void func_61(var uParam0)//Position - 0x2EDD
{
	uParam0->f_679 = 0;
}

var func_62(var uParam0)//Position - 0x2EEB
{
	return uParam0->f_679;
}

void func_63(int iParam0)//Position - 0x2EF8
{
	Global_1318755 = iParam0;
}

void func_64(int iParam0)//Position - 0x2F06
{
	Global_1339940.f_932 = iParam0;
}

void func_65(int iParam0, int iParam1, char* sParam2, var uParam3, int iParam4, int iParam5)//Position - 0x2F17
{
	int iVar0;
	
	if (uParam3->f_680 >= 12)
	{
		return;
	}
	iVar0 = uParam3->f_680;
	StringCopy(&(uParam3->f_1[iVar0 /*56*/].f_32), sParam2, 16);
	gameplay::set_bit(&(uParam3->f_676), iVar0);
	uParam3->f_1[iVar0 /*56*/].f_53 = iParam0;
	uParam3->f_1[iVar0 /*56*/].f_54 = iParam1;
	uParam3->f_1[iVar0 /*56*/].f_55 = iParam5;
	if (iParam4)
	{
		gameplay::set_bit(&(uParam3->f_678), iVar0);
		if (iParam5 < 344)
		{
		}
	}
	uParam3->f_680++;
}

void func_66(var uParam0)//Position - 0x2F94
{
	func_67(uParam0);
	uParam0->f_679 = 1;
}

void func_67(var uParam0)//Position - 0x2FA8
{
	int iVar0;
	
	*uParam0 = 0;
	iVar0 = 0;
	iVar0 = 0;
	while (iVar0 < 12)
	{
		StringCopy(&(uParam0->f_1[iVar0 /*56*/]), "", 64);
		StringCopy(&(uParam0->f_1[iVar0 /*56*/].f_16), "", 64);
		StringCopy(&(uParam0->f_1[iVar0 /*56*/].f_32), "", 16);
		uParam0->f_1[iVar0 /*56*/].f_36 = 0;
		StringCopy(&(uParam0->f_1[iVar0 /*56*/].f_37), "", 64);
		uParam0->f_1[iVar0 /*56*/].f_53 = 2;
		uParam0->f_1[iVar0 /*56*/].f_54 = 344;
		uParam0->f_1[iVar0 /*56*/].f_55 = 344;
		iVar0++;
	}
	uParam0->f_674 = 0;
	uParam0->f_675 = 0;
	uParam0->f_676 = 0;
	uParam0->f_678 = 0;
	uParam0->f_677 = 0;
	uParam0->f_679 = 0;
	uParam0->f_680 = 0;
	uParam0->f_682 = 0f;
	uParam0->f_683 = 0f;
	uParam0->f_684 = 0f;
	uParam0->f_685 = 0f;
	uParam0->f_686 = 1f;
}

struct<9> func_68()//Position - 0x307C
{
	struct<9> Var0;
	
	Var0 = 0.5f;
	Var0.f_1 = 0.5f;
	Var0.f_2 = 1f;
	Var0.f_3 = 1f;
	Var0.f_4 = 255;
	Var0.f_5 = 255;
	Var0.f_6 = 255;
	Var0.f_7 = 200;
	Var0.f_8 = 0f;
	return Var0;
}

bool func_69()//Position - 0x30C0
{
	if (!func_10(player::player_id(), 1, 1))
	{
		return false;
	}
	if (!func_74(1, 1))
	{
		return false;
	}
	if (func_73())
	{
		return false;
	}
	if (func_51())
	{
		return false;
	}
	if (!ped::is_ped_sitting_in_any_vehicle(player::player_ped_id()))
	{
		return false;
	}
	if (player::get_player_wanted_level(player::player_id()) > 0)
	{
		return false;
	}
	if (func_72(0))
	{
		return false;
	}
	if (!func_70())
	{
		return false;
	}
	return true;
}

bool func_70()//Position - 0x3137
{
	if (func_71() == 0)
	{
		return true;
	}
	return false;
}

var func_71()//Position - 0x314C
{
	return Global_1312466.f_18;
}

int func_72(int iParam0)//Position - 0x315A
{
	if (iParam0)
	{
		return (Global_17118.f_4 && Global_17118.f_104 == 4);
	}
	return Global_17118.f_4;
}

int func_73()//Position - 0x3183
{
	return Global_91330.f_297 > 0;
}

bool func_74(int iParam0, int iParam1)//Position - 0x3194
{
	if (ui::is_pause_menu_active())
	{
		return false;
	}
	if (iParam0 == 1)
	{
		if (func_78())
		{
			return false;
		}
	}
	if (func_77())
	{
		return false;
	}
	if (iParam1 == 1)
	{
		if (func_50(0))
		{
			return false;
		}
	}
	if (func_76(8, -1))
	{
		return false;
	}
	if (player::is_system_ui_being_displayed())
	{
		return false;
	}
	if (func_75())
	{
		return false;
	}
	if (Global_52930)
	{
		return false;
	}
	if (Global_68058)
	{
		return false;
	}
	if (ui::is_warning_message_active())
	{
		return false;
	}
	if (Global_1315839)
	{
		return false;
	}
	if (Global_1573691)
	{
		return false;
	}
	return true;
}

var func_75()//Position - 0x3230
{
	return Global_1315913;
}

int func_76(int iParam0, int iParam1)//Position - 0x323C
{
	switch (iParam0)
	{
		case 5:
			if (iParam1 > -1)
			{
				return Global_1338622.f_203[iParam1];
			}
			break;
	}
	return gameplay::is_bit_set(Global_1338622.f_949, iParam0);
}

int func_77()//Position - 0x3277
{
	return Global_1587523[player::player_id() /*444*/].f_180 != 0;
}

int func_78()//Position - 0x328E
{
	return gameplay::get_game_timer() <= Global_17257.f_5745 + 100;
}

void func_79(int iParam0)//Position - 0x32A3
{
	if (!gameplay::is_bit_set(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2, 11))
	{
		if (Local_288[network::participant_id_to_int() /*44*/].f_4.f_18 == 0)
		{
			if (ped::is_ped_shooting(player::player_ped_id()))
			{
				Local_288[network::participant_id_to_int() /*44*/].f_4.f_18 = 26;
				Local_288[network::participant_id_to_int() /*44*/].f_4.f_19 = iParam0;
				gameplay::set_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2), 11);
			}
		}
	}
}

void func_80(int iParam0)//Position - 0x330F
{
	if (iLocal_1899)
	{
		if (func_85(&uLocal_1907, 10000, 0))
		{
			if (gameplay::is_bit_set(Local_93.f_2[iParam0 /*23*/].f_6, 3) || gameplay::is_bit_set(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2, 3))
			{
				fLocal_1909 = (fLocal_1909 + (fLocal_1906 * 1.5f));
			}
			else
			{
				fLocal_1909 = (fLocal_1909 + fLocal_1906);
			}
			func_30(&uLocal_1907);
		}
		if (gameplay::get_distance_between_coords(entity::get_entity_coords(player::player_ped_id(), 0), vLocal_1910, 0) > 50f)
		{
			if (gameplay::is_bit_set(Local_93.f_2[iParam0 /*23*/].f_6, 3) || gameplay::is_bit_set(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2, 3))
			{
				fLocal_1909 = (fLocal_1909 + (fLocal_1906 * 1.5f));
			}
			else
			{
				fLocal_1909 = (fLocal_1909 + fLocal_1906);
			}
			func_30(&uLocal_1907);
			vLocal_1910 = { entity::get_entity_coords(player::player_ped_id(), 0) };
		}
		iLocal_1904 = system::ceil(fLocal_1909);
		if (iLocal_1904 > 5000)
		{
			iLocal_1904 = 5000;
		}
		if (iLocal_1904 != iLocal_1905)
		{
			graphics::_push_scaleform_movie_function(iLocal_1738, "SET_TAXI_PRICE");
			graphics::_push_scaleform_movie_function_parameter_int(iLocal_1904);
			graphics::_pop_scaleform_movie_function_void();
			iLocal_1905 = iLocal_1904;
			func_83("\ntaxiService currentJourneyPrice = ");
			func_81(iLocal_1904);
			func_83("\n");
		}
	}
}

void func_81(int iParam0)//Position - 0x3446
{
	func_82(iParam0);
}

void func_82(int iParam0)//Position - 0x3454
{
	if (iParam0 > 0)
	{
	}
}

void func_83(char* sParam0)//Position - 0x3462
{
	func_84(sParam0);
}

void func_84(char* sParam0)//Position - 0x3470
{
	if (gameplay::are_strings_equal(sParam0, sParam0))
	{
	}
}

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

void func_86(int iParam0)//Position - 0x34E1
{
	if (Local_93.f_2[iParam0 /*23*/].f_3 == network::participant_id_to_int())
	{
		if (network::network_does_network_id_exist(Local_93.f_2[iParam0 /*23*/]) && network::network_does_network_id_exist(Local_93.f_2[iParam0 /*23*/].f_1))
		{
			if (network::network_has_control_of_network_id(Local_93.f_2[iParam0 /*23*/]) && network::network_has_control_of_network_id(Local_93.f_2[iParam0 /*23*/].f_1))
			{
				network::set_network_id_can_migrate(Local_93.f_2[iParam0 /*23*/], false);
				network::set_network_id_can_migrate(Local_93.f_2[iParam0 /*23*/].f_1, false);
				if (gameplay::is_bit_set(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2, 10))
				{
					func_139(iParam0);
					func_112(iParam0);
				}
				if (func_111(iParam0))
				{
					func_87(iParam0);
					iLocal_2610 = 1;
				}
			}
			else
			{
				if (network::network_has_control_of_network_id(Local_93.f_2[iParam0 /*23*/]))
				{
					network::set_network_id_can_migrate(Local_93.f_2[iParam0 /*23*/], false);
				}
				else if (network::network_request_control_of_network_id(Local_93.f_2[iParam0 /*23*/]))
				{
				}
				if (network::network_has_control_of_network_id(Local_93.f_2[iParam0 /*23*/].f_1))
				{
					network::set_network_id_can_migrate(Local_93.f_2[iParam0 /*23*/].f_1, false);
				}
			}
		}
	}
	else
	{
		cam::set_cinematic_button_active(true);
		if (cam::does_cam_exist(iLocal_2612))
		{
			cam::set_cam_active(iLocal_2612, false);
			cam::destroy_cam(iLocal_2612, 0);
			cam::render_script_cams(false, false, 3000, 1, 0, 0);
			func_38();
		}
	}
}

void func_87(int iParam0)//Position - 0x361B
{
	int iVar0;
	int iVar1;
	int iVar2;
	int iVar3;
	int iVar4;
	var uVar5;
	vector3 vVar6;
	int iVar9;
	int iVar10;
	var uVar11;
	vector3 vVar12;
	
	if (!iLocal_1735)
	{
		iVar0 = func_110();
		iLocal_1734 = iVar0;
		iLocal_1716[iParam0] = 0;
		iLocal_1735 = 1;
	}
	if (func_96(iParam0))
	{
		iVar1 = 0;
		graphics::_push_scaleform_movie_function(iLocal_1738, "CLEAR_TAXI_DISPLAY");
		graphics::_pop_scaleform_movie_function_void();
		iVar1 = 0;
		while (iVar1 < iLocal_1731)
		{
			if (!ui::does_blip_exist(vLocal_1746[iVar1 /*3*/]))
			{
				iLocal_2611 = 1;
				iLocal_1716[iParam0] = 0;
				return;
			}
			if (func_95(vLocal_1746[iVar1 /*3*/]) == -1)
			{
				iLocal_2611 = 1;
				iLocal_1716[iParam0] = 0;
				return;
			}
			if (func_94(ui::get_blip_coords(vLocal_1746[iVar1 /*3*/]), 0f, 0f, 0f, 1056964608, 0))
			{
				iLocal_2611 = 1;
				iLocal_1716[iParam0] = 0;
				return;
			}
			graphics::_push_scaleform_movie_function(iLocal_1738, "ADD_TAXI_DESTINATION");
			graphics::_push_scaleform_movie_function_parameter_int(iVar1);
			graphics::_push_scaleform_movie_function_parameter_int(ui::get_blip_sprite(vLocal_1746[iVar1 /*3*/]));
			ui::get_hud_colour(ui::get_blip_hud_colour(vLocal_1746[iVar1 /*3*/]), &iVar2, &iVar3, &iVar4, &uVar5);
			graphics::_push_scaleform_movie_function_parameter_int(iVar2);
			graphics::_push_scaleform_movie_function_parameter_int(iVar3);
			graphics::_push_scaleform_movie_function_parameter_int(iVar4);
			iVar9 = func_92(vLocal_1746[iVar1 /*3*/]);
			if (iVar9 == -1)
			{
				graphics::_begin_text_component("STRING");
				ui::add_text_component_substring_blip_name(vLocal_1746[iVar1 /*3*/]);
				graphics::_end_text_component();
			}
			else
			{
				graphics::_begin_text_component("STRING");
				ui::_add_text_component_item_string(func_90(iVar9));
				graphics::_end_text_component();
			}
			if (ui::get_blip_info_id_type(vLocal_1746[iVar1 /*3*/]) == 2)
			{
				if (!ped::is_ped_injured(entity::get_ped_index_from_entity_index(ui::get_blip_info_id_entity_index(vLocal_1746[iVar1 /*3*/]))))
				{
					vVar6 = { entity::get_entity_coords(entity::get_ped_index_from_entity_index(ui::get_blip_info_id_entity_index(vLocal_1746[iVar1 /*3*/])), 1) };
				}
			}
			else if (ui::get_blip_info_id_type(vLocal_1746[iVar1 /*3*/]) == 1)
			{
				if (vehicle::is_vehicle_driveable(ui::get_blip_info_id_entity_index(vLocal_1746[iVar1 /*3*/]), 0))
				{
					vVar6 = { entity::get_entity_coords(ui::get_blip_info_id_entity_index(vLocal_1746[iVar1 /*3*/]), 1) };
				}
			}
			else
			{
				vVar6 = { ui::get_blip_coords(vLocal_1746[iVar1 /*3*/]) };
			}
			func_59(zone::get_name_of_zone(vVar6));
			if (((func_95(vLocal_1746[iVar1 /*3*/]) == 40 || func_95(vLocal_1746[iVar1 /*3*/]) == 357) || func_95(vLocal_1746[iVar1 /*3*/]) == 475) || func_95(vLocal_1746[iVar1 /*3*/]) == 473)
			{
				iVar10 = 0;
				while (iVar10 < 6)
				{
					uVar11 = func_88(iVar10, -1);
					if (func_11(vVar6, Global_1049163[uVar11 /*1924*/].f_3[0 /*3*/], 0))
					{
						graphics::_begin_text_component("STRTNM1");
						ui::_add_text_component_item_string(&(Global_1049163[uVar11 /*1924*/].f_16));
						graphics::_end_text_component();
						func_59("");
					}
					iVar10++;
				}
			}
			else if (vLocal_1746[iVar1 /*3*/].f_2 == 0)
			{
				if (vLocal_1746[iVar1 /*3*/].f_1 != 0)
				{
					graphics::_begin_text_component("STRTNM1");
					ui::_add_text_component_substring_localized(vLocal_1746[iVar1 /*3*/].f_1);
					graphics::_end_text_component();
					func_59("");
				}
			}
			else
			{
				graphics::_begin_text_component("STRTNM2");
				ui::_add_text_component_substring_localized(vLocal_1746[iVar1 /*3*/].f_1);
				ui::_add_text_component_substring_localized(vLocal_1746[iVar1 /*3*/].f_2);
				graphics::_end_text_component();
			}
			if ((iLocal_2615 == 8 || iLocal_2615 == 9) || iLocal_2615 == 10)
			{
				graphics::_push_scaleform_movie_function_parameter_bool(true);
			}
			else
			{
				graphics::_push_scaleform_movie_function_parameter_bool(false);
			}
			graphics::_pop_scaleform_movie_function_void();
			if (iLocal_1899)
			{
				if (Local_288[network::participant_id_to_int() /*44*/].f_4.f_15 == vLocal_1746[iVar1 /*3*/])
				{
					iLocal_1732 = iVar1;
				}
			}
			else if (ui::does_blip_exist(Local_288[network::participant_id_to_int() /*44*/].f_4.f_4))
			{
				if (Local_288[network::participant_id_to_int() /*44*/].f_4.f_4 == vLocal_1746[iVar1 /*3*/])
				{
					iLocal_1732 = iVar1;
				}
			}
			iVar1++;
		}
		if (iLocal_1899)
		{
			graphics::_push_scaleform_movie_function(iLocal_1738, "SHOW_TAXI_DESTINATION");
			graphics::_pop_scaleform_movie_function_void();
			graphics::_push_scaleform_movie_function(iLocal_1738, "HIGHLIGHT_DESTINATION");
			graphics::_push_scaleform_movie_function_parameter_int(iLocal_1732);
			graphics::_pop_scaleform_movie_function_void();
		}
		else
		{
			graphics::_push_scaleform_movie_function(iLocal_1738, "SET_TAXI_PRICE");
			graphics::_push_scaleform_movie_function_parameter_int(iLocal_1904);
			if ((iLocal_2615 == 8 || iLocal_2615 == 9) || iLocal_2615 == 10)
			{
				graphics::_push_scaleform_movie_function_parameter_bool(true);
			}
			else
			{
				graphics::_push_scaleform_movie_function_parameter_bool(false);
			}
			graphics::_pop_scaleform_movie_function_void();
			graphics::_push_scaleform_movie_function(iLocal_1738, "SHOW_TAXI_DESTINATION");
			graphics::_pop_scaleform_movie_function_void();
			graphics::_push_scaleform_movie_function(iLocal_1738, "HIGHLIGHT_DESTINATION");
			graphics::_push_scaleform_movie_function_parameter_int(iLocal_1732);
			graphics::_pop_scaleform_movie_function_void();
		}
		if (ui::does_blip_exist(vLocal_1746[iLocal_1732 /*3*/]))
		{
			vVar12 = { ui::get_blip_coords(vLocal_1746[iLocal_1732 /*3*/]) };
			if ((!func_24(vVar12) && cam::does_cam_exist(iLocal_2612)) && cam::is_cam_active(iLocal_2612))
			{
				ui::lock_minimap_position(vVar12.x, vVar12.y);
			}
		}
		iLocal_2611 = 0;
		gameplay::set_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2), 10);
	}
}

int func_88(int iParam0, int iParam1)//Position - 0x3A8E
{
	var uVar0;
	
	uVar0 = iParam1;
	if (iParam1 == -1)
	{
		uVar0 = func_89();
	}
	if (iParam0 == 0)
	{
		return Global_1347762[uVar0];
	}
	else if (iParam0 == 99)
	{
		return Global_2492986[uVar0];
	}
	else if (iParam0 >= 1)
	{
		if (iParam0 >= 6)
		{
			return 0;
		}
		return Global_2492924[(iParam0 - 1) /*6*/][uVar0];
	}
	return 0;
}

var func_89()//Position - 0x3AF1
{
	return Global_1312747;
}

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

char* func_91(int iParam0)//Position - 0x3E0A
{
	switch (iParam0)
	{
		case -1:
			return "S_N_EM";
			break;
		
		case 0:
			return "S_H_01";
			break;
		
		case 1:
			return "S_H_02";
			break;
		
		case 2:
			return "S_H_03";
			break;
		
		case 3:
			return "S_H_04";
			break;
		
		case 4:
			return "S_H_05";
			break;
		
		case 5:
			return "S_H_06";
			break;
		
		case 6:
			return "S_H_07";
			break;
		
		case 7:
			return "S_CL_01";
			break;
		
		case 8:
			return "S_CL_02";
			break;
		
		case 9:
			return "S_CL_03";
			break;
		
		case 10:
			return "S_CL_04";
			break;
		
		case 11:
			return "S_CL_05";
			break;
		
		case 12:
			return "S_CL_06";
			break;
		
		case 13:
			return "S_CL_07";
			break;
		
		case 14:
			return "S_CM_01";
			break;
		
		case 15:
			return "S_CM_03";
			break;
		
		case 16:
			return "S_CM_04";
			break;
		
		case 17:
			return "S_CM_05";
			break;
		
		case 18:
			return "S_CH_01";
			break;
		
		case 19:
			return "S_CH_02";
			break;
		
		case 20:
			return "S_CH_03";
			break;
		
		case 21:
			return "S_CA_01";
			break;
		
		case 22:
			return "S_T_01";
			break;
		
		case 23:
			return "S_T_02";
			break;
		
		case 24:
			return "S_T_03";
			break;
		
		case 25:
			return "S_T_04";
			break;
		
		case 26:
			return "S_T_05";
			break;
		
		case 27:
			return "S_T_06";
			break;
		
		case 28:
			return "S_G_01";
			break;
		
		case 29:
			return "S_G_02";
			break;
		
		case 30:
			return "S_G_03";
			break;
		
		case 31:
			return "S_G_04";
			break;
		
		case 32:
			return "S_G_05";
			break;
		
		case 33:
			return "S_G_06";
			break;
		
		case 34:
			return "S_G_07";
			break;
		
		case 35:
			return "S_G_08";
			break;
		
		case 36:
			return "S_G_09";
			break;
		
		case 37:
			return "S_G_10";
			break;
		
		case 38:
			return "S_G_11";
			break;
		
		case 39:
			return "S_MO_01";
			break;
		
		case 40:
			return "S_MO_05";
			break;
		
		case 41:
			return "S_MO_06";
			break;
		
		case 42:
			return "S_MO_07";
			break;
		
		case 43:
			return "S_MO_08";
			break;
		
		case 44:
			return "S_MO_09";
			break;
	}
	return "SHOP_NAME_EMPTY";
}

int func_92(int iParam0)//Position - 0x40FE
{
	int iVar0;
	int iVar1;
	var uVar2;
	
	iVar0 = 0;
	while (iVar0 < 45)
	{
		iVar1 = iVar0;
		uVar2 = func_93(iVar1);
		if (Global_25433[uVar2 /*23*/].f_19 == iParam0)
		{
			return iVar1;
		}
		iVar0++;
	}
	return -1;
}

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

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

int func_95(int iParam0)//Position - 0x444E
{
	int iVar0;
	
	if (ui::does_blip_exist(iParam0))
	{
		iVar0 = ui::get_blip_sprite(iParam0);
	}
	return iVar0;
}

bool func_96(var uParam0)//Position - 0x4469
{
	int iVar0;
	int iVar1;
	vector3 vVar2;
	
	switch (iLocal_1716[uParam0])
	{
		case 0:
			func_32(uParam0);
			break;
		
		case 1:
			func_97(uParam0, iLocal_91, 0);
			func_97(uParam0, 77, 0);
			func_97(uParam0, 79, 0);
			func_97(uParam0, 293, 0);
			func_97(uParam0, iLocal_92, 0);
			func_97(uParam0, 225, 0);
			func_97(uParam0, 348, 0);
			break;
		
		case 2:
			func_97(uParam0, 110, 1);
			break;
		
		case 3:
			func_97(uParam0, 119, 1);
			func_97(uParam0, 103, 1);
			break;
		
		case 4:
			func_97(uParam0, 122, 1);
			func_97(uParam0, 109, 1);
			break;
		
		case 5:
			func_97(uParam0, 311, 1);
			func_97(uParam0, 90, 1);
			break;
		
		case 6:
			func_97(uParam0, 304, 1);
			break;
		
		case 7:
			func_97(uParam0, 310, 1);
			break;
		
		case 8:
			func_97(uParam0, 309, 1);
			break;
		
		case 9:
			func_97(uParam0, 176, 1);
			break;
		
		case 10:
			func_97(uParam0, 305, 1);
			break;
		
		case 11:
			func_97(uParam0, 84, 1);
			break;
		
		case 12:
			func_97(uParam0, 94, 1);
			break;
		
		case 13:
			func_97(uParam0, 52, 1);
			break;
		
		case 14:
			func_97(uParam0, 135, 1);
			break;
		
		case 15:
			func_97(uParam0, 40, 0);
			func_97(uParam0, 357, 0);
			func_97(uParam0, 475, 0);
			func_97(uParam0, 473, 0);
			break;
		
		case 16:
			func_97(uParam0, 121, 1);
			break;
		
		case 17:
			func_97(uParam0, 71, 1);
			break;
		
		case 18:
			func_97(uParam0, 72, 1);
			break;
		
		case 19:
			func_97(uParam0, 446, 1);
			break;
		
		case 20:
			func_97(uParam0, 73, 1);
			break;
		
		case 21:
			func_97(uParam0, 75, 1);
			break;
		
		case 22:
			iLocal_1734 = func_110();
			if (ui::does_blip_exist(vLocal_1746[iLocal_1732 /*3*/]))
			{
				iVar0 = 0;
				while (iVar0 < 50)
				{
					if (ui::does_blip_exist(vLocal_1746[iVar0 /*3*/]))
					{
						if (vLocal_1746[iLocal_1732 /*3*/] == vLocal_1746[iVar0 /*3*/])
						{
							if (func_11(ui::get_blip_coords(vLocal_1746[iLocal_1732 /*3*/]), ui::get_blip_coords(vLocal_1746[iVar0 /*3*/]), 0))
							{
								vVar2 = { ui::get_blip_coords(vLocal_1746[iVar0 /*3*/]) };
								if ((!func_24(vVar2) && cam::does_cam_exist(iLocal_2612)) && cam::is_cam_active(iLocal_2612))
								{
									ui::lock_minimap_position(vVar2.x, vVar2.y);
								}
								iLocal_1732 = iVar0;
								iVar0 = 50;
								iVar1 = 1;
							}
						}
					}
					iVar0++;
				}
				if (iVar1 == 0)
				{
					iLocal_1732 = 0;
				}
			}
			else
			{
				iLocal_1732 = 0;
			}
			break;
	}
	if (iLocal_1716[uParam0] >= 22)
	{
		return true;
	}
	else
	{
		iLocal_1716[uParam0]++;
	}
	return false;
}

void func_97(var uParam0, int iParam1, int iParam2)//Position - 0x476C
{
	vector3 vVar0;
	int iVar3;
	int iVar4;
	vector3 vVar5;
	int iVar8;
	
	iVar4 = ui::get_first_blip_info_id(iParam1);
	while (ui::does_blip_exist(iVar4))
	{
		if (iLocal_1731 < 50)
		{
			if (func_109(iVar4))
			{
				if (func_108(vVar0))
				{
					if (!func_107(&iVar4))
					{
						iVar3 = false;
						switch (iParam1)
						{
							case 77:
							case 79:
							case 293:
							case 225:
							case 348:
							case 90:
							case 109:
							case 122:
							case 119:
							case 311:
							case 103:
							case 279:
							case 304:
							case 310:
							case 309:
							case 38:
							case 176:
							case 305:
							case 84:
							case 94:
							case 126:
							case 52:
							case 99:
							case 102:
							case 135:
							case 136:
							case 40:
							case 357:
							case 110:
							case 121:
							case 71:
							case 72:
							case 446:
							case 73:
							case 111:
							case 75:
							case 475:
							case 473:
							case default:
						}
						iVar3 = true;
						vVar5 = { ui::get_blip_coords(iVar4) };
						if (Global_1587523[player::player_id() /*444*/] == 16)
						{
							if (iParam1 == 110)
							{
								if (vVar5.y < 200f)
								{
									iVar3 = true;
								}
								else
								{
									iVar3 = false;
								}
							}
						}
						if (iParam1 == iLocal_92)
						{
							iVar3 = true;
						}
						if (func_11(vVar5, 0f, 0f, 0f, 0))
						{
							iVar3 = false;
						}
						else if (entity::is_entity_at_coord(player::player_ped_id(), vVar5, 250f, 250f, 250f, false, true, 0))
						{
							iVar3 = false;
						}
						else if (iParam1 != iLocal_92)
						{
							iVar8 = 0;
							while (iVar8 < 1)
							{
								if (func_106(vVar5, Global_2460486.f_233[iVar8 /*3*/], 200f, 1) && !func_11(Global_2460486.f_233[iVar8 /*3*/], 0f, 0f, 0f, 0))
								{
									iVar3 = false;
								}
								iVar8++;
							}
						}
						if (iVar3)
						{
							iVar3 = false;
							if (func_109(iVar4))
							{
								if ((((ui::get_blip_info_id_type(iVar4) == 4 || ui::get_blip_info_id_type(iVar4) == 5) || ui::get_blip_info_id_type(iVar4) == 1) || ui::get_blip_info_id_type(iVar4) == 6) || ui::get_blip_info_id_type(iVar4) == 3)
								{
									iVar3 = true;
								}
							}
							if (iVar3)
							{
								if (func_109(iVar4))
								{
									func_105(uParam0, &iVar4, &vVar0);
									func_98(vVar0, iParam2, uParam0);
								}
							}
						}
					}
				}
			}
		}
		iVar4 = ui::get_next_blip_info_id(iParam1);
	}
}

void func_98(vector3 vParam0, int iParam3, var uParam4)//Position - 0x49F8
{
	int iVar0;
	int iVar1;
	
	iVar0 = 0;
	iVar1 = 0;
	iVar0 = 0;
	while (iVar0 < 50)
	{
		if (func_95(vLocal_1746[iVar0 /*3*/]) == func_95(vParam0.x))
		{
			iVar1 = iVar0;
			iVar0 = 50;
		}
		else if (iVar0 == iLocal_1731)
		{
			iVar1 = iVar0;
			iVar0 = 50;
		}
		iVar0++;
	}
	iVar0 = 0;
	iVar0 = 0;
	while (iVar0 < 50)
	{
		if (iVar0 < iVar1)
		{
			iVar0 = iVar1;
		}
		if (iVar0 < iLocal_1731)
		{
			if (func_95(vLocal_1746[iVar0 /*3*/]) == func_95(vParam0.x))
			{
				if (func_102(vParam0, vLocal_1746[iVar0 /*3*/]))
				{
					if (iParam3)
					{
						func_101(vParam0, iVar0, uParam4);
						iVar0 = 50;
						return;
					}
					else
					{
						func_99(vParam0, iVar0, uParam4);
						iLocal_1731++;
						iVar0 = 50;
						return;
					}
				}
				else if (iParam3)
				{
					iVar0 = 50;
					return;
				}
				else
				{
					func_99(vParam0, iVar0, uParam4);
					iLocal_1731++;
					iVar0 = 50;
					return;
				}
			}
			else
			{
				func_99(vParam0, iVar0, uParam4);
				iLocal_1731++;
				iVar0 = 50;
				return;
			}
		}
		else
		{
			func_99(vParam0, iVar0, uParam4);
			iLocal_1731++;
			iVar0 = 50;
			return;
		}
		iVar0++;
	}
}

void func_99(vector3 vParam0, int iParam3, var uParam4)//Position - 0x4B38
{
	func_83("INSERT_NEW_DESTINATION_TO_LIST - start \n");
	func_100(iParam3);
	vLocal_1746[iParam3 /*3*/] = { vParam0 };
	if (func_95(vLocal_1746[iParam3 /*3*/]) == ui::_get_blip_info_id_iterator())
	{
		if (Local_93.f_2[uParam4 /*23*/].f_3 != -1)
		{
			Local_288[Local_93.f_2[uParam4 /*23*/].f_3 /*44*/].f_4.f_35 = iParam3;
			Local_288[Local_93.f_2[uParam4 /*23*/].f_3 /*44*/].f_4.f_36 = { ui::get_blip_coords(vLocal_1746[iParam3 /*3*/]) };
		}
	}
}

void func_100(int iParam0)//Position - 0x4BB3
{
	int iVar0;
	vector3 vVar1;
	
	func_83("SHIFT_LIST_DOWN_1_PLACE_FROM_POSITION - start, position = ");
	func_81(iParam0);
	func_83("\n");
	iVar0 = 49;
	while (iVar0 > iParam0)
	{
		vVar1 = { vLocal_1746[(iVar0 - 1) /*3*/] };
		vLocal_1746[iVar0 /*3*/] = { vVar1 };
		iVar0 = (iVar0 - 1);
	}
}

void func_101(vector3 vParam0, int iParam3, var uParam4)//Position - 0x4C01
{
	func_83("REPLACE_LIST_DESTINATION_WITH_NEW_DESTINATION - start \n");
	vLocal_1746[iParam3 /*3*/] = { vParam0 };
	if (func_95(vLocal_1746[iParam3 /*3*/]) == ui::_get_blip_info_id_iterator())
	{
		if (Local_93.f_2[uParam4 /*23*/].f_3 != -1)
		{
			Local_288[Local_93.f_2[uParam4 /*23*/].f_3 /*44*/].f_4.f_35 = iParam3;
			Local_288[Local_93.f_2[uParam4 /*23*/].f_3 /*44*/].f_4.f_36 = { ui::get_blip_coords(vLocal_1746[iParam3 /*3*/]) };
		}
	}
}

bool func_102(int iParam0, var uParam1, var uParam2, int iParam3, var uParam4, var uParam5)//Position - 0x4C76
{
	if (func_103(iParam0) < func_103(iParam3))
	{
		return true;
	}
	return false;
}

float func_103(int iParam0)//Position - 0x4C93
{
	vector3 vVar0;
	
	vVar0 = { 0f, 0f, 1E+07f };
	if (player::is_player_playing(player::player_id()))
	{
		if (ui::does_blip_exist(iParam0))
		{
			vVar0 = { func_104(iParam0) - entity::get_entity_coords(player::player_ped_id(), 1) };
		}
	}
	return system::vmag(vVar0);
}

Vector3 func_104(int iParam0)//Position - 0x4CD6
{
	vector3 vVar0;
	int iVar3;
	int iVar4;
	int iVar5;
	int iVar6;
	int iVar7;
	
	vVar0 = { 0f, 0f, 0f };
	iVar7 = ui::get_blip_info_id_type(iParam0);
	if (iVar7 == 1)
	{
		iVar3 = ui::get_blip_info_id_entity_index(iParam0);
		if (vehicle::is_vehicle_driveable(iVar3, 0))
		{
			vVar0 = { entity::get_entity_coords(iVar3, 1) };
		}
	}
	else if (iVar7 == 2)
	{
		iVar4 = entity::get_ped_index_from_entity_index(ui::get_blip_info_id_entity_index(iParam0));
		if (!ped::is_ped_injured(iVar4))
		{
			vVar0 = { entity::get_entity_coords(iVar4, 1) };
		}
	}
	else if (iVar7 == 3)
	{
		iVar5 = entity::get_object_index_from_entity_index(ui::get_blip_info_id_entity_index(iParam0));
		if (entity::does_entity_exist(iVar5))
		{
			vVar0 = { entity::get_entity_coords(iVar5, 1) };
		}
	}
	else if (iVar7 == 4)
	{
		vVar0 = { ui::get_blip_coords(iParam0) };
	}
	else if (iVar7 == 6)
	{
		iVar6 = ui::get_blip_info_id_pickup_index(iParam0);
		if (object::does_pickup_exist(iVar6))
		{
			vVar0 = { object::get_pickup_coords(iVar6) };
		}
	}
	else if (iVar7 == 5)
	{
		vVar0 = { ui::get_blip_coords(iParam0) };
	}
	return vVar0;
}

void func_105(var uParam0, int iParam1, var uParam2)//Position - 0x4DB1
{
	*uParam2 = *iParam1;
	if (!*uParam2 == Global_100190)
	{
		pathfind::get_street_name_at_coord(func_104(*uParam2), &(uParam2->f_1), &(uParam2->f_2));
	}
	else
	{
		pathfind::get_street_name_at_coord(Local_93.f_2[uParam0 /*23*/].f_8, &(uParam2->f_1), &(uParam2->f_2));
	}
}

int func_106(vector3 vParam0, vector3 vParam3, float fParam6, int iParam7)//Position - 0x4DF9
{
	return gameplay::get_distance_between_coords(vParam0, vParam3, iParam7) <= fParam6;
}

bool func_107(int iParam0)//Position - 0x4E12
{
	if (!ui::does_blip_exist(*iParam0))
	{
		return true;
	}
	if (Global_100187 == *iParam0)
	{
		return true;
	}
	if (ui::get_blip_colour(*iParam0) == 39)
	{
		return true;
	}
	if (func_11(ui::get_blip_coords(*iParam0), 0f, 0f, 0f, 0))
	{
		return true;
	}
	if (func_95(*iParam0) == -1)
	{
		return true;
	}
	return false;
}

bool func_108(int iParam0, var uParam1, var uParam2)//Position - 0x4E6D
{
	float fVar0;
	
	if (!func_95(iParam0) == iLocal_91)
	{
		fVar0 = func_103(iParam0);
		if (fVar0 > 40f)
		{
			return true;
		}
	}
	else
	{
		return true;
	}
	return false;
}

bool func_109(int iParam0)//Position - 0x4EA1
{
	int iVar0;
	
	if (ui::does_blip_exist(iParam0))
	{
		iVar0 = ui::get_blip_info_id_display(iParam0);
		if (!iVar0 == 0 && !iVar0 == 1)
		{
			return true;
		}
	}
	return false;
}

int func_110()//Position - 0x4ED1
{
	int iVar0;
	
	iVar0 = ui::get_number_of_active_blips();
	if (gameplay::is_bit_set(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2, 12))
	{
		iVar0 = (iVar0 - 1);
	}
	return iVar0;
}

int func_111(int iParam0)//Position - 0x4EFD
{
	vector3 vVar0;
	int iVar3;
	int iVar4;
	int iVar5;
	
	if (system::timerb() > 500)
	{
		iVar4 = unk::_get_ui_language_id();
		if (iLocal_2615 != iVar4)
		{
			if ((iLocal_2615 == 8 || iLocal_2615 == 9) || iLocal_2615 == 10)
			{
				if ((iVar4 != 8 && iVar4 != 9) && iVar4 != 10)
				{
					iLocal_2615 = iVar4;
					iLocal_2611 = 1;
					iLocal_1716[iParam0] = 0;
					system::settimerb(0);
				}
			}
			else if ((iVar4 == 8 || iVar4 == 9) || iVar4 == 10)
			{
				iLocal_2615 = iVar4;
				iLocal_2611 = 1;
				iLocal_1716[iParam0] = 0;
				system::settimerb(0);
			}
		}
		if (!iLocal_2611)
		{
			iVar5 = func_110();
			if (iLocal_1734 != iVar5)
			{
				iLocal_2611 = 1;
				iLocal_1716[iParam0] = 0;
				iLocal_1734 = iVar5;
				system::settimerb(0);
			}
		}
		if (!iLocal_2611)
		{
			if (Local_93.f_2[iParam0 /*23*/].f_3 != -1)
			{
				if (Local_288[Local_93.f_2[iParam0 /*23*/].f_3 /*44*/].f_4.f_35 == -1)
				{
					iVar3 = ui::get_first_blip_info_id(ui::_get_blip_info_id_iterator());
					if (ui::does_blip_exist(iVar3))
					{
						vVar0 = { ui::get_blip_coords(iVar3) };
						if (system::vdist(vVar0, entity::get_entity_coords(player::player_ped_id(), 1)) > 250f)
						{
							iLocal_2611 = 1;
							iLocal_1716[iParam0] = 0;
							Local_288[Local_93.f_2[iParam0 /*23*/].f_3 /*44*/].f_4.f_35 = -1;
							Local_288[Local_93.f_2[iParam0 /*23*/].f_3 /*44*/].f_4.f_36 = { 0f, 0f, 0f };
							system::settimerb(0);
						}
					}
				}
				else if (ui::does_blip_exist(vLocal_1746[Local_288[Local_93.f_2[iParam0 /*23*/].f_3 /*44*/].f_4.f_35 /*3*/]))
				{
					if (func_95(vLocal_1746[Local_288[Local_93.f_2[iParam0 /*23*/].f_3 /*44*/].f_4.f_35 /*3*/]) == ui::_get_blip_info_id_iterator())
					{
						vVar0 = { ui::get_blip_coords(vLocal_1746[Local_288[Local_93.f_2[iParam0 /*23*/].f_3 /*44*/].f_4.f_35 /*3*/]) };
						if (!func_11(vVar0, Local_288[Local_93.f_2[iParam0 /*23*/].f_3 /*44*/].f_4.f_36, 0))
						{
							iLocal_2611 = 1;
							iLocal_1716[iParam0] = 0;
							Local_288[Local_93.f_2[iParam0 /*23*/].f_3 /*44*/].f_4.f_35 = -1;
							Local_288[Local_93.f_2[iParam0 /*23*/].f_3 /*44*/].f_4.f_36 = { 0f, 0f, 0f };
							system::settimerb(0);
						}
					}
					else
					{
						iLocal_2611 = 1;
						iLocal_1716[iParam0] = 0;
						Local_288[Local_93.f_2[iParam0 /*23*/].f_3 /*44*/].f_4.f_35 = -1;
						Local_288[Local_93.f_2[iParam0 /*23*/].f_3 /*44*/].f_4.f_36 = { 0f, 0f, 0f };
						system::settimerb(0);
					}
				}
				else
				{
					iLocal_2611 = 1;
					iLocal_1716[iParam0] = 0;
					Local_288[Local_93.f_2[iParam0 /*23*/].f_3 /*44*/].f_4.f_35 = -1;
					Local_288[Local_93.f_2[iParam0 /*23*/].f_3 /*44*/].f_4.f_36 = { 0f, 0f, 0f };
					system::settimerb(0);
				}
			}
		}
		system::settimerb(0);
	}
	return iLocal_2611;
}

void func_112(int iParam0)//Position - 0x51BE
{
	int iVar0;
	var uVar1;
	var uVar2;
	var uVar3;
	
	if (func_69())
	{
		if (iLocal_2611 == 0)
		{
			func_138(&iVar0, &uVar1, &uVar2, &uVar3, 0);
			if (controls::_is_input_disabled(2))
			{
				controls::set_input_exclusive(2, 241);
				controls::set_input_exclusive(2, 242);
				controls::set_input_exclusive(2, 180);
				controls::set_input_exclusive(2, 181);
			}
			if (iVar0 > 28 || controls::is_disabled_control_just_pressed(2, 180))
			{
				if (!iLocal_1900)
				{
					func_136();
					system::settimera(0);
					iLocal_1900 = 1;
				}
			}
			else
			{
				iLocal_1900 = 0;
			}
			if (iVar0 < -28 || controls::is_control_just_pressed(2, 181))
			{
				if (!iLocal_1901)
				{
					func_134();
					system::settimera(0);
					iLocal_1901 = 1;
				}
			}
			else
			{
				iLocal_1901 = 0;
			}
		}
		if (!iLocal_1899)
		{
			if (iLocal_1731 > 0)
			{
				cam::set_cinematic_button_active(true);
				if (iLocal_2611 == 0)
				{
					if (controls::is_control_just_pressed(0, 176))
					{
						if (ui::does_blip_exist(vLocal_1746[iLocal_1732 /*3*/]))
						{
							if (func_133(ui::get_blip_coords(vLocal_1746[iLocal_1732 /*3*/])))
							{
								iLocal_1902 = 0;
								Local_288[network::participant_id_to_int() /*44*/].f_4.f_15 = { vLocal_1746[iLocal_1732 /*3*/] };
								Local_288[network::participant_id_to_int() /*44*/].f_4.f_5 = { ui::get_blip_coords(Local_288[network::participant_id_to_int() /*44*/].f_4.f_15) };
								vLocal_1910 = { entity::get_entity_coords(player::player_ped_id(), 0) };
								func_30(&uLocal_1907);
								func_80(iParam0);
								iLocal_1899 = true;
								if (iLocal_2613 != 5)
								{
									cam::set_follow_vehicle_cam_zoom_level(iLocal_2613);
								}
								iLocal_1902 = 0;
								iLocal_1897 = false;
								iLocal_1898 = 1;
								iLocal_2610 = 1;
								func_115(2, iParam0);
								gameplay::clear_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2), 4);
								gameplay::clear_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2), 20);
								gameplay::clear_bit(&(Local_93.f_2[iParam0 /*23*/].f_6), 3);
							}
							else
							{
								func_115(27, iParam0);
							}
						}
					}
				}
			}
			if (!gameplay::is_bit_set(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2, 7) && iLocal_1899 == 0)
			{
				iLocal_2610 = 1;
				func_115(1, iParam0);
				gameplay::set_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2), 7);
			}
		}
		else
		{
			cam::set_cinematic_button_active(false);
			if (!gameplay::is_bit_set(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2, 4) && Local_93.f_2[iParam0 /*23*/].f_7 == 5)
			{
				if (controls::is_control_just_pressed(0, 177))
				{
					gameplay::set_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2), 4);
					gameplay::clear_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2), 5);
					iLocal_2610 = 1;
					func_115(24, iParam0);
				}
			}
			else if (!gameplay::is_bit_set(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2, 5) && Local_93.f_2[iParam0 /*23*/].f_7 == 7)
			{
				if (controls::is_control_just_pressed(0, 177))
				{
					gameplay::set_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2), 5);
					gameplay::clear_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2), 4);
					iLocal_2610 = 1;
					func_115(25, iParam0);
				}
			}
			if (!gameplay::is_bit_set(Local_93.f_2[iParam0 /*23*/].f_6, 3) && !gameplay::is_bit_set(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2, 3))
			{
				if (Local_93.f_2[iParam0 /*23*/].f_7 == 5 && !gameplay::is_bit_set(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2, 4))
				{
					controls::disable_control_action(0, 99, 1);
					controls::disable_control_action(0, 100, 1);
					if (controls::is_control_just_pressed(0, 179))
					{
						func_115(20, iParam0);
						func_114(iParam0, 0, 0);
						iLocal_2610 = 1;
						gameplay::set_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2), 3);
					}
				}
			}
			if (iLocal_1897)
			{
				if (func_113())
				{
					if (iLocal_2611 == 0)
					{
						if (controls::is_control_just_pressed(0, 176))
						{
							if (ui::does_blip_exist(vLocal_1746[iLocal_1732 /*3*/]))
							{
								if (func_133(ui::get_blip_coords(vLocal_1746[iLocal_1732 /*3*/])))
								{
									func_115(9, iParam0);
									if (iLocal_2613 != 5)
									{
										cam::set_follow_vehicle_cam_zoom_level(iLocal_2613);
									}
									iLocal_1902 = 0;
									iLocal_1897 = false;
									iLocal_1898 = 1;
									Local_288[network::participant_id_to_int() /*44*/].f_4.f_15 = { vLocal_1746[iLocal_1732 /*3*/] };
									Local_288[network::participant_id_to_int() /*44*/].f_4.f_5 = { ui::get_blip_coords(Local_288[network::participant_id_to_int() /*44*/].f_4.f_15) };
									Local_288[network::participant_id_to_int() /*44*/].f_4.f_30 = { 0f, 0f, 0f };
									Local_288[network::participant_id_to_int() /*44*/].f_4.f_33 = 0f;
									Local_288[network::participant_id_to_int() /*44*/].f_4.f_34 = -1;
									gameplay::clear_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2), 4);
									gameplay::clear_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2), 20);
									func_114(iParam0, 0, 0);
									system::settimera(0);
									iLocal_2610 = 1;
								}
								else
								{
									func_115(27, iParam0);
								}
							}
						}
					}
				}
				if (system::timera() > 5000)
				{
					if (iLocal_2613 != 5)
					{
						cam::set_follow_vehicle_cam_zoom_level(iLocal_2613);
					}
					iLocal_1902 = 0;
					iLocal_1897 = false;
					iLocal_1898 = 1;
				}
			}
			else if (!iLocal_1898)
			{
				if (system::timera() > 0)
				{
					if (iLocal_2613 != 5)
					{
						cam::set_follow_vehicle_cam_zoom_level(iLocal_2613);
					}
					iLocal_1897 = false;
					iLocal_1902 = 0;
					iLocal_1898 = 1;
				}
			}
		}
	}
	else
	{
		cam::set_cinematic_button_active(true);
	}
	ui::set_text_render_id(iLocal_1733);
	graphics::_set_2d_layer(4);
	graphics::_0xC6372ECD45D73BCD(1);
	if (vehicle::is_vehicle_driveable(network::net_to_veh(Local_93.f_2[iParam0 /*23*/]), 0))
	{
		graphics::draw_scaleform_movie(iLocal_1738, fLocal_1742, fLocal_1743, fLocal_1740, fLocal_1741, 0, 0, 0, 255, 0);
	}
}

bool func_113()//Position - 0x56AE
{
	if (cam::does_cam_exist(iLocal_2612))
	{
		if (cam::is_cam_active(iLocal_2612))
		{
			return true;
		}
	}
	if (iLocal_1897 || !iLocal_1898)
	{
		return true;
	}
	return false;
}

void func_114(int iParam0, int iParam1, int iParam2)//Position - 0x56E3
{
	if (network::network_does_network_id_exist(Local_93.f_2[iParam0 /*23*/].f_1))
	{
		if (network::network_has_control_of_network_id(Local_93.f_2[iParam0 /*23*/].f_1))
		{
			if (!ped::is_ped_injured(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1)))
			{
				if (iParam2)
				{
					ai::task_clear_look_at(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1));
				}
				if (iParam1)
				{
					ai::clear_ped_tasks(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1));
				}
				else if (!entity::is_entity_playing_anim(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), "ODDJOBS@TAXI@DRIVER", "leanover_enter", 3))
				{
					if (!entity::is_entity_playing_anim(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), "ODDJOBS@TAXI@DRIVER", "leanover_idle", 3))
					{
						if (!entity::is_entity_playing_anim(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), "ODDJOBS@TAXI@DRIVER", "leanover_exit", 3))
						{
							ai::clear_ped_tasks(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1));
						}
					}
				}
			}
		}
	}
}

void func_115(int iParam0, int iParam1)//Position - 0x57D2
{
	if (!func_15(Local_93.f_2[iParam1 /*23*/].f_1))
	{
		if (network::network_has_control_of_network_id(Local_93.f_2[iParam1 /*23*/].f_1))
		{
			if (!func_132())
			{
				if (iParam0 != 0)
				{
					func_20(&uLocal_2633, 8, network::net_to_ped(Local_93.f_2[iParam1 /*23*/].f_1), "FM_TAXI", 0, 1);
					if (func_10(player::player_id(), 1, 1))
					{
						ai::task_look_at_entity(network::net_to_ped(Local_93.f_2[iParam1 /*23*/].f_1), player::player_ped_id(), 4000, 0, 2);
					}
					switch (iParam0)
					{
						case 1:
							func_116(&uLocal_2633, "MPTXIAU", "MPTXI_WT", 12, 0, 0, 1);
							iParam0 = 0;
							break;
						
						case 2:
							func_116(&uLocal_2633, "MPTXIAU", "MPTXI_BJ", 12, 0, 0, 1);
							iParam0 = 0;
							break;
						
						case 5:
							func_116(&uLocal_2633, "MPTXIAU", "MPTXI_AR", 12, 0, 0, 1);
							iParam0 = 0;
							break;
						
						case 7:
							func_116(&uLocal_2633, "MPTXIAU", "MPTXI_NM", 12, 0, 0, 1);
							iParam0 = 0;
							break;
						
						case 9:
							func_116(&uLocal_2633, "MPTXIAU", "MPTXI_CD", 12, 0, 0, 1);
							iParam0 = 0;
							break;
						
						case 12:
							func_116(&uLocal_2633, "MPTXIAU", "MPTXI_RA", 12, 0, 0, 1);
							iParam0 = 0;
							break;
						
						case 13:
							func_116(&uLocal_2633, "MPTXIAU", "MPTXI_OE", 12, 0, 0, 1);
							iParam0 = 0;
							break;
						
						case 24:
							func_116(&uLocal_2633, "MPTXIAU", "MPTXI_SR", 12, 0, 0, 1);
							iParam0 = 0;
							break;
						
						case 25:
							func_116(&uLocal_2633, "MPTXIAU", "MPTXI_ST", 12, 0, 0, 1);
							iParam0 = 0;
							break;
						
						case 26:
							func_116(&uLocal_2633, "MPTXIAU", "MPTXI_DB", 12, 0, 0, 1);
							iParam0 = 0;
							break;
						
						case 27:
							func_116(&uLocal_2633, "MPTXIAU", "MPTXI_US", 12, 0, 0, 1);
							iParam0 = 0;
							break;
						
						case 20:
							func_116(&uLocal_2633, "MPTXIAU", "MPTXI_SO", 12, 0, 0, 1);
							iParam0 = 0;
							break;
						}
				}
			}
			else
			{
				iParam0 = 0;
			}
		}
	}
}

int func_116(var uParam0, char* sParam1, char* sParam2, int iParam3, int iParam4, int iParam5, int iParam6)//Position - 0x59E7
{
	func_131(uParam0, 145, sParam1, iParam4, iParam5, iParam6);
	if (iParam3 > 7)
	{
		if (iParam3 < 12)
		{
			iParam3 = 7;
		}
	}
	Global_15719 = 0;
	Global_15721 = 0;
	Global_15726 = 0;
	Global_16703 = 0;
	Global_16705 = 0;
	Global_16709 = 0;
	Global_2621441 = 1;
	return func_117(sParam2, iParam3, 0);
}

bool func_117(char* sParam0, int iParam1, int iParam2)//Position - 0x5A35
{
	Global_15713 = 0;
	if (Global_15712 == 0 || Global_15714 == 2)
	{
		if (Global_15712 != 0)
		{
			if (iParam1 > Global_15714)
			{
				if (Global_15719 == 0)
				{
					audio::stop_scripted_conversation(false);
					Global_14413.f_1 = 3;
					Global_15712 = 0;
					Global_15713 = 1;
					Global_15765 = 0;
					Global_15708 = 0;
					Global_15709 = 0;
					Global_15723 = 0;
					Global_15722 = 0;
					Global_14412 = 0;
				}
				else
				{
					func_130();
					return false;
				}
			}
			else
			{
				return false;
			}
		}
		if (audio::is_scripted_conversation_ongoing())
		{
			return false;
		}
		if (func_76(8, -1))
		{
			return false;
		}
		Global_15788 = { Global_15782 };
		func_129();
		Global_15001 = { Global_15166 };
		Global_15718 = Global_15719;
		Global_15725 = Global_15726;
		Global_2621442 = Global_2621441;
		Global_15727 = { Global_15743 };
		Global_15720 = Global_15721;
		Global_16702 = Global_16703;
		Global_16710 = { Global_16716 };
		Global_16704 = Global_16705;
		Global_16706 = Global_16707;
		Global_16708 = Global_16709;
		Global_15331.f_370 = Global_16701;
		Global_15331.f_368 = Global_16699;
		Global_15331.f_369 = Global_16700;
		Global_15708 = Global_15709;
		if (Global_15718)
		{
			gameplay::clear_bit(&Global_2283, 20);
			gameplay::clear_bit(&Global_2284, 17);
			gameplay::clear_bit(&Global_2285, 0);
			if (iParam2)
			{
				func_122();
				if (Global_3088[Global_14413 /*2811*/][0 /*281*/].f_259 == 2)
				{
					if (iParam1 == 13)
					{
					}
					else
					{
						return false;
					}
				}
				if (Global_14413.f_1 > 3)
				{
					return false;
				}
			}
			if (Global_14379 == 1)
			{
				return false;
			}
			if (player::is_player_playing(player::player_id()))
			{
				if (ped::is_ped_in_melee_combat(player::player_ped_id()))
				{
					return false;
				}
				if (func_121())
				{
					return false;
				}
				if (ai::is_ped_sprinting(player::player_ped_id()))
				{
					return false;
				}
				if (ped::is_ped_ragdoll(player::player_ped_id()))
				{
					return false;
				}
				if (ped::is_ped_in_parachute_free_fall(player::player_ped_id()))
				{
					return false;
				}
				if (weapon::get_is_ped_gadget_equipped(player::player_ped_id(), joaat("gadget_parachute")))
				{
					return false;
				}
				if (!Global_69489)
				{
					if (entity::is_entity_in_water(player::player_ped_id()))
					{
						return false;
					}
					if (player::is_player_climbing(player::player_id()))
					{
						return false;
					}
					if (ped::is_ped_planting_bomb(player::player_ped_id()))
					{
						return false;
					}
					if (player::is_special_ability_active(player::player_id()))
					{
						return false;
					}
				}
			}
			if (func_120())
			{
				return false;
			}
			else
			{
				switch (Global_14413.f_1)
				{
					case 7:
						return false;
						break;
					
					case 8:
						return false;
						break;
					
					case 9:
						break;
					
					case 10:
						break;
					
					default:
						break;
				}
				if (gameplay::is_bit_set(Global_2283, 9))
				{
					return false;
				}
			}
			func_119();
			Global_15722 = iParam2;
		}
		Global_15714 = iParam1;
		StringCopy(&Global_15331, sParam0, 24);
		Global_14578 = 0;
		func_118();
		return true;
	}
	if (Global_15712 == 5)
	{
		return false;
	}
	if (iParam1 < Global_15714 || iParam1 == Global_15714)
	{
		return false;
	}
	if (iParam1 == 2)
	{
	}
	else
	{
		func_130();
	}
	return false;
}

void func_118()//Position - 0x5D01
{
	int iVar0;
	
	iVar0 = 0;
	while (iVar0 <= 69)
	{
		StringCopy(&(Global_14580[iVar0 /*6*/]), "", 24);
		iVar0++;
	}
	audio::stop_scripted_conversation(false);
	Global_15712 = 1;
}

void func_119()//Position - 0x5D32
{
	Global_15765 = Global_15764;
	Global_15759 = Global_15760;
	Global_15806 = { Global_15794 };
	Global_15812 = { Global_15800 };
	Global_15767 = Global_15766;
	Global_15836 = { Global_15818 };
	Global_15842 = { Global_15824 };
	Global_15848 = { Global_15830 };
	Global_15854 = { Global_15860 };
	Global_1598 = Global_1599;
	Global_1600 = Global_1601;
	Global_15723 = Global_15724;
	Global_15725 = Global_15726;
	Global_15727 = { Global_15743 };
	Global_15716 = Global_15717;
	Global_16728 = 0;
	Global_15761 = 0;
	Global_15762 = 0;
	gameplay::clear_bit(&Global_2284, 16);
}

bool func_120()//Position - 0x5DC7
{
	if (Global_14413.f_1 == 1 || Global_14413.f_1 == 0)
	{
		return true;
	}
	return false;
}

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

void func_122()//Position - 0x5E87
{
	if (func_128(14))
	{
		if (!entity::is_entity_dead(player::player_ped_id(), 0))
		{
			if (entity::get_entity_model(player::player_ped_id()) == Global_101154.f_32575[0 /*29*/])
			{
				Global_14413 = 0;
			}
			else if (entity::get_entity_model(player::player_ped_id()) == Global_101154.f_32575[1 /*29*/])
			{
				Global_14413 = 1;
			}
			else if (entity::get_entity_model(player::player_ped_id()) == Global_101154.f_32575[2 /*29*/])
			{
				Global_14413 = 2;
			}
			else
			{
				Global_14413 = 0;
			}
		}
	}
	else
	{
		Global_14413 = func_123();
		if (Global_14413 == 145)
		{
			Global_14413 = 3;
		}
		if (Global_69489)
		{
			Global_14413 = 3;
		}
		if (Global_14413 > 3)
		{
			Global_14413 = 3;
		}
	}
}

var func_123()//Position - 0x5F29
{
	func_124();
	return Global_101154.f_1826.f_539.f_3549;
}

void func_124()//Position - 0x5F42
{
	int iVar0;
	
	if (entity::does_entity_exist(player::player_ped_id()))
	{
		if (func_127(Global_101154.f_1826.f_539.f_3549) != entity::get_entity_model(player::player_ped_id()))
		{
			iVar0 = func_126(player::player_ped_id());
			if (func_125(iVar0) && (!func_128(14) || Global_100106))
			{
				if (Global_101154.f_1826.f_539.f_3549 != iVar0 && func_125(Global_101154.f_1826.f_539.f_3549))
				{
					Global_101154.f_1826.f_539.f_3550 = Global_101154.f_1826.f_539.f_3549;
				}
				Global_101154.f_1826.f_539.f_3551 = iVar0;
				Global_101154.f_1826.f_539.f_3549 = iVar0;
				return;
			}
		}
		else
		{
			if (Global_101154.f_1826.f_539.f_3549 != 145)
			{
				Global_101154.f_1826.f_539.f_3551 = Global_101154.f_1826.f_539.f_3549;
			}
			return;
		}
	}
	Global_101154.f_1826.f_539.f_3549 = 145;
}

int func_125(int iParam0)//Position - 0x603F
{
	return iParam0 < 3;
}

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

int func_127(int iParam0)//Position - 0x6088
{
	if (func_125(iParam0))
	{
		return Global_101154.f_32575[iParam0 /*29*/];
	}
	else if (iParam0 != 145)
	{
	}
	return 0;
}

int func_128(int iParam0)//Position - 0x60B2
{
	return Global_35711 == iParam0;
}

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

void func_130()//Position - 0x6117
{
	audio::restart_scripted_conversation();
	Global_16723 = 0;
	if ((audio::is_mobile_phone_call_ongoing() || Global_14413.f_1 == 9) || Global_14412 == 1)
	{
		audio::stop_scripted_conversation(false);
		Global_15712 = 6;
		Global_14413.f_1 = 3;
		return;
	}
	if (audio::is_scripted_conversation_ongoing())
	{
		audio::stop_scripted_conversation(true);
		Global_15712 = 6;
		return;
	}
}

void func_131(var uParam0, int iParam1, char* sParam2, int iParam3, int iParam4, int iParam5)//Position - 0x616E
{
	Global_15166 = { *uParam0 };
	Global_1599 = iParam1;
	StringCopy(&Global_15782, sParam2, 24);
	Global_16701 = iParam5;
	if (iParam3 == 0)
	{
		Global_16699 = 1;
		Global_16697 = 0;
	}
	else
	{
		Global_16699 = 0;
		Global_16697 = 1;
	}
	if (iParam4 == 0)
	{
		Global_16700 = 1;
		Global_16698 = 0;
	}
	else
	{
		Global_16700 = 0;
		Global_16698 = 1;
	}
}

bool func_132()//Position - 0x61C4
{
	if (Global_15712 != 0 || audio::is_scripted_conversation_ongoing())
	{
		return true;
	}
	return false;
}

bool func_133(vector3 vParam0)//Position - 0x61E6
{
	int iVar0;
	
	iVar0 = 0;
	while (iVar0 < 1)
	{
		if (!func_24(Global_2460486.f_233[iVar0 /*3*/]))
		{
			if (func_106(vParam0, Global_2460486.f_233[iVar0 /*3*/], 200f, 1))
			{
				return false;
			}
		}
		iVar0++;
	}
	return true;
}

void func_134()//Position - 0x6236
{
	if (iLocal_1899)
	{
		if (iLocal_1897)
		{
			func_135();
		}
		else if (!cam::is_cam_active(iLocal_2612))
		{
			iLocal_1902 = 1;
			iLocal_2610 = 1;
		}
		else
		{
			func_135();
		}
		iLocal_1897 = true;
		iLocal_1898 = 1;
	}
	else
	{
		func_135();
	}
}

void func_135()//Position - 0x627A
{
	vector3 vVar0;
	
	graphics::_push_scaleform_movie_function(iLocal_1738, "SET_INPUT_EVENT");
	graphics::_push_scaleform_movie_function_parameter_int(9);
	graphics::_pop_scaleform_movie_function_void();
	iLocal_1732++;
	if (iLocal_1732 > (iLocal_1731 - 1))
	{
		iLocal_1732 = 0;
	}
	if (ui::does_blip_exist(vLocal_1746[iLocal_1732 /*3*/]))
	{
		vVar0 = { ui::get_blip_coords(vLocal_1746[iLocal_1732 /*3*/]) };
		if (!func_24(vVar0))
		{
			ui::lock_minimap_position(vVar0.x, vVar0.y);
		}
	}
}

void func_136()//Position - 0x62E7
{
	if (iLocal_1899)
	{
		if (iLocal_1897)
		{
			func_137();
		}
		else if (!cam::is_cam_active(iLocal_2612))
		{
			iLocal_1902 = 1;
			iLocal_2610 = 1;
		}
		else
		{
			func_137();
		}
		iLocal_1897 = true;
		iLocal_1898 = 1;
	}
	else
	{
		func_137();
	}
}

void func_137()//Position - 0x632B
{
	vector3 vVar0;
	
	graphics::_push_scaleform_movie_function(iLocal_1738, "SET_INPUT_EVENT");
	graphics::_push_scaleform_movie_function_parameter_int(8);
	graphics::_pop_scaleform_movie_function_void();
	iLocal_1732 = (iLocal_1732 - 1);
	if (iLocal_1732 < 0)
	{
		iLocal_1732 = (iLocal_1731 - 1);
		if (iLocal_1732 < 0)
		{
			iLocal_1732 = 0;
		}
	}
	if (ui::does_blip_exist(vLocal_1746[iLocal_1732 /*3*/]))
	{
		vVar0 = { ui::get_blip_coords(vLocal_1746[iLocal_1732 /*3*/]) };
		if (!func_24(vVar0))
		{
			ui::lock_minimap_position(vVar0.x, vVar0.y);
		}
	}
}

void func_138(var uParam0, var uParam1, var uParam2, var uParam3, int iParam4)//Position - 0x63A3
{
	*uParam0 = system::floor((controls::get_control_normal(2, 218) * 127f));
	*uParam1 = system::floor((controls::get_control_normal(2, 219) * 127f));
	*uParam2 = system::floor((controls::get_control_normal(2, 220) * 127f));
	*uParam3 = system::floor((controls::get_control_normal(2, 221) * 127f));
	if (iParam4)
	{
		if (IntToFloat(*uParam0) == 0f && IntToFloat(*uParam1) == 0f)
		{
			*uParam0 = system::floor((controls::get_disabled_control_normal(2, 218) * 127f));
			*uParam1 = system::floor((controls::get_disabled_control_normal(2, 219) * 127f));
		}
		if (IntToFloat(*uParam2) == 0f && IntToFloat(*uParam3) == 0f)
		{
			*uParam2 = system::floor((controls::get_disabled_control_normal(2, 220) * 127f));
			*uParam3 = system::floor((controls::get_disabled_control_normal(2, 221) * 127f));
		}
	}
}

void func_139(var uParam0)//Position - 0x6478
{
	if (func_13(Local_93.f_2[uParam0 /*23*/]))
	{
		if (!cam::does_cam_exist(iLocal_2612))
		{
			if ((!func_146() && !func_76(8, -1)) && Local_93.f_2[uParam0 /*23*/].f_7 != 6)
			{
				iLocal_2612 = cam::create_cam("DEFAULT_SCRIPTED_CAMERA", true);
				cam::attach_cam_to_entity(iLocal_2612, network::net_to_veh(Local_93.f_2[uParam0 /*23*/]), vLocal_2622, 1);
				func_142(uParam0);
				cam::_0x661B5C8654ADD825(iLocal_2612, 1);
				cam::render_script_cams(true, false, 3000, 1, 0, 0);
				graphics::set_particle_fx_cam_inside_vehicle(1);
				iLocal_2610 = 1;
				Global_100207 = 1;
			}
		}
		else if (iLocal_1899)
		{
			if (!Global_100207)
			{
				if (iLocal_1902)
				{
					if (!cam::is_cam_active(iLocal_2612))
					{
						iLocal_2613 = cam::get_follow_vehicle_cam_zoom_level();
						if (iLocal_2613 != 5)
						{
							if (cam::get_follow_vehicle_cam_zoom_level() != 4)
							{
								cam::set_follow_vehicle_cam_zoom_level(4);
							}
						}
						func_39(4, 1, -1);
						func_141();
						Global_100207 = 1;
						cam::set_cam_active(iLocal_2612, true);
						cam::render_script_cams(true, false, 3000, 1, 0, 0);
						graphics::set_particle_fx_cam_inside_vehicle(1);
						func_142(uParam0);
						iLocal_2610 = 1;
						iLocal_1902 = 0;
						Global_100207 = 1;
					}
				}
			}
			if ((((cam::get_follow_vehicle_cam_zoom_level() == 4 && !controls::is_control_just_pressed(2, 23)) && !func_146()) && !func_76(8, -1)) && Local_93.f_2[uParam0 /*23*/].f_7 != 6)
			{
				if (cam::is_cam_active(iLocal_2612))
				{
					func_142(uParam0);
				}
			}
			else if ((cam::is_cam_active(iLocal_2612) && !func_146()) && !func_76(8, -1))
			{
				cam::set_cam_active(iLocal_2612, false);
				cam::set_gameplay_cam_relative_heading(0f);
				cam::set_gameplay_cam_relative_pitch(0f, 1065353216);
				if (iLocal_2613 != 5)
				{
					cam::set_follow_vehicle_cam_zoom_level(iLocal_2613);
				}
				iLocal_1902 = 0;
				iLocal_1897 = false;
				iLocal_1898 = 1;
				cam::render_script_cams(false, false, 3000, 1, 0, 0);
				graphics::set_particle_fx_cam_inside_vehicle(0);
				Global_100207 = 0;
				ui::unlock_minimap_position();
				ui::unlock_minimap_angle();
				ui::set_radar_zoom(0);
				iLocal_2610 = 1;
				func_140();
			}
		}
		else if (cam::is_cam_active(iLocal_2612))
		{
			func_142(uParam0);
		}
	}
}

void func_140()//Position - 0x666A
{
	int iVar0;
	
	iVar0 = 0;
	iVar0 = 0;
	while (iVar0 < iLocal_1731)
	{
		if (iLocal_1899)
		{
			if (iLocal_88 == vLocal_1746[iVar0 /*3*/])
			{
				iLocal_1732 = iVar0;
			}
		}
		iVar0++;
	}
	graphics::_push_scaleform_movie_function(iLocal_1738, "HIGHLIGHT_DESTINATION");
	graphics::_push_scaleform_movie_function_parameter_int(iLocal_1732);
	graphics::_pop_scaleform_movie_function_void();
}

void func_141()//Position - 0x66B7
{
	if (!func_24(Local_288[network::participant_id_to_int() /*44*/].f_4.f_5))
	{
		if (cam::does_cam_exist(iLocal_2612) && cam::is_cam_active(iLocal_2612))
		{
			ui::lock_minimap_position(Local_288[network::participant_id_to_int() /*44*/].f_4.f_5, Local_288[network::participant_id_to_int() /*44*/].f_4.f_5.f_1);
			ui::lock_minimap_angle(0);
			ui::set_radar_zoom(1400);
		}
	}
}

void func_142(var uParam0)//Position - 0x6718
{
	if (cam::does_cam_exist(iLocal_2612))
	{
		func_143(network::net_to_veh(Local_93.f_2[uParam0 /*23*/]), &iLocal_2612, vLocal_2626);
		cam::set_cam_fov(iLocal_2612, fLocal_2625);
		cam::set_cam_near_clip(iLocal_2612, 0.01f);
	}
	if (ui::is_pause_menu_active())
	{
		if (!gameplay::is_bit_set(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2, 13))
		{
			gameplay::set_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2), 13);
		}
	}
	else if (gameplay::is_bit_set(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2, 13))
	{
		func_141();
		gameplay::clear_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2), 13);
	}
	ui::_center_player_on_radar_this_frame();
	cam::_0x62ECFCFDEE7885D6();
}

void func_143(int iParam0, int iParam1, vector3 vParam2)//Position - 0x67C1
{
	vector3 vVar0;
	float fVar3;
	float fVar4;
	float fVar5;
	vector3 vVar6;
	
	if (!entity::is_entity_dead(iParam0, 0))
	{
		if (cam::does_cam_exist(*iParam1))
		{
			vVar0 = { entity::get_entity_rotation(iParam0, 2) };
			fVar5 = vVar0.y;
			vVar6 = { func_145(entity::get_offset_from_entity_in_world_coords(iParam0, vParam2) - entity::get_offset_from_entity_in_world_coords(iParam0, vLocal_2622)) };
			func_144(vVar6, &fVar3, &fVar4, 1);
			cam::set_cam_rot(*iParam1, fVar3, fVar5, fVar4, 2);
		}
	}
}

void func_144(vector3 vParam0, var uParam3, var uParam4, int iParam5)//Position - 0x6828
{
	float fVar0;
	
	if (vParam0.y != 0f)
	{
		*uParam4 = gameplay::atan2(vParam0.x, vParam0.y);
	}
	else if (vParam0.x < 0f)
	{
		*uParam4 = -90f;
	}
	else
	{
		*uParam4 = 90f;
	}
	if (iParam5 == 1)
	{
		*uParam4 = (*uParam4 * -1f);
		if (*uParam4 < 0f)
		{
			*uParam4 = (*uParam4 + 360f);
		}
	}
	fVar0 = system::sqrt(((vParam0.x * vParam0.x) + (vParam0.y * vParam0.y)));
	if (fVar0 != 0f)
	{
		*uParam3 = gameplay::atan2(vParam0.y, fVar0);
	}
	else if (vParam0.y < 0f)
	{
		*uParam3 = -90f;
	}
	else
	{
		*uParam3 = 90f;
	}
}

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

var func_146()//Position - 0x690C
{
	return Global_17116;
}

void func_147(int iParam0)//Position - 0x6917
{
	var uVar0;
	
	if ((((Local_93.f_2[iParam0 /*23*/].f_7 == 2 || Local_93.f_2[iParam0 /*23*/].f_7 == 4) || Local_93.f_2[iParam0 /*23*/].f_7 == 5) || Local_93.f_2[iParam0 /*23*/].f_7 == 6) || Local_93.f_2[iParam0 /*23*/].f_7 == 7)
	{
		if (!gameplay::is_bit_set(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2, 2))
		{
			if (ped::is_ped_sitting_in_vehicle(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), network::net_to_veh(Local_93.f_2[iParam0 /*23*/])))
			{
				if (Local_93.f_2[iParam0 /*23*/].f_3 != -1 && network::network_is_participant_active(player::int_to_participantindex(Local_93.f_2[iParam0 /*23*/].f_3)))
				{
					if (Local_93.f_2[iParam0 /*23*/].f_3 == network::participant_id_to_int())
					{
						if (entity::get_entity_speed(network::net_to_veh(Local_93.f_2[iParam0 /*23*/])) > 5f)
						{
							func_115(12, iParam0);
							if (iLocal_1904 > iLocal_1903)
							{
								if (!ped::is_ped_being_jacked(player::get_player_ped(network::network_get_player_index(player::int_to_participantindex(Local_93.f_2[iParam0 /*23*/].f_3)))))
								{
									gameplay::set_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_4.f_3), iParam0);
									player::report_crime(network::network_get_player_index(player::int_to_participantindex(Local_93.f_2[iParam0 /*23*/].f_3)), 37, player::get_wanted_level_threshold(2));
									if (!ui::is_help_message_being_displayed())
									{
										func_164("TXI_HWRUN", -1);
									}
								}
							}
						}
						else if (iLocal_1904 > iLocal_1903)
						{
							if (func_161(player::player_id()) >= iLocal_1904 && networkcash::_has_item_been_unlocked(iLocal_1904, false, false, 1, -1))
							{
								if (Local_93.f_2[iParam0 /*23*/].f_7 == 6)
								{
									func_115(5, iParam0);
								}
								else
								{
									func_115(13, iParam0);
								}
								if (func_160())
								{
									func_151(-1834046564, iLocal_1904, &uVar0, 0, 1, 0);
								}
								else
								{
									func_148(-iLocal_1904, 0);
									networkcash::network_spent_taxi(iLocal_1904, false, true);
								}
							}
							else
							{
								func_115(7, iParam0);
								if (!ped::is_ped_being_jacked(player::get_player_ped(network::network_get_player_index(player::int_to_participantindex(Local_93.f_2[iParam0 /*23*/].f_3)))))
								{
									gameplay::set_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_4.f_3), iParam0);
									player::report_crime(network::network_get_player_index(player::int_to_participantindex(Local_93.f_2[iParam0 /*23*/].f_3)), 37, player::get_wanted_level_threshold(2));
									if (!ui::is_help_message_being_displayed())
									{
										func_164("TXI_HNMON", -1);
									}
								}
							}
						}
						else
						{
							func_115(13, iParam0);
						}
						gameplay::set_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2), 2);
						func_30(&uLocal_1728);
					}
				}
			}
		}
	}
}

void func_148(int iParam0, int iParam1)//Position - 0x6B77
{
	func_150(iParam0, 1, 1, 0);
	if (iParam1 == 1)
	{
		func_149(iParam0, 0);
	}
}

void func_149(int iParam0, int iParam1)//Position - 0x6B95
{
	if (iParam1)
	{
	}
	iParam0 = iParam0;
}

void func_150(int iParam0, int iParam1, int iParam2, float fParam3)//Position - 0x6BA6
{
	int iVar0;
	int iVar1;
	float fVar2;
	
	if (iParam1 < 1)
	{
		iParam1 = 1;
	}
	iVar0 = (iParam0 * iParam1);
	fParam3 = 0f;
	if (iVar0 > 0)
	{
		fVar2 = (100f - fParam3);
		iVar1 = system::floor((IntToFloat(iVar0) * (fVar2 / 100f)));
	}
	else
	{
		iVar1 = iVar0;
	}
	Global_1587523[player::player_id() /*444*/].f_195.f_4 = iVar1;
	Global_1587523[player::player_id() /*444*/].f_195.f_3 = (Global_1587523[player::player_id() /*444*/].f_195.f_3 + iVar1);
	if (iParam2 == 1)
	{
		func_149(iVar1, 0);
	}
}

void func_151(int iParam0, int iParam1, var uParam2, int iParam3, int iParam4, int iParam5)//Position - 0x6C29
{
	int iVar0;
	
	if (!func_160())
	{
		return;
	}
	iVar0 = 1;
	if (iParam4)
	{
		iVar0 = 4;
	}
	else if (iParam3)
	{
		iVar0 = 2;
	}
	else if (iParam5)
	{
		iVar0 = 8;
	}
	switch (iParam0)
	{
		case -1645229221:
		case -585718395:
		case -1359375127:
		case 454359403:
		case -982394051:
		case 1643659499:
		case -2072289654:
		case 650665123:
		case 1654961868:
		case -876847842:
		case 68030260:
		case -2122299283:
		case 366672791:
		case 283351220:
		case 291576838:
		case 1182673174:
		case -516219046:
		case 1036455748:
		case 277665518:
		case 2043854386:
		case 1839532116:
		case 1022400740:
		case 1940862352:
		case -1389227906:
		case 711665950:
		case 1704445500:
		case 1515774909:
		case 1173654533:
		case -899802304:
		case -663944335:
		case 1208553146:
		case -613221010:
		case -671062876:
		case -407201236:
		case -754024203:
		case -1885444887:
		case 1931729587:
		case 1064954035:
		case -180141073:
		case 2131324797:
		case 1612072658:
		case -517447402:
		case 1948102096:
		case 1108628223:
		case -1834046564:
		case -1239008812:
		case -222363842:
		case -1276678868:
		case 1564537328:
		case -96593501:
		case 742499889:
		case 2050093329:
		case -1752488069:
		case 634375935:
		case 1850983186:
		case 763367758:
		case 1941570214:
		case 665109499:
		case -1330755006:
			if (iParam1 > 0)
			{
				func_152(uParam2, -1135378931, 537254313, 1474183246, iParam0, iParam1, iVar0, 7);
			}
			break;
		
		case -31156877:
		case -1027218631:
		case -1398318418:
		case 1652884147:
		case -57868256:
		case -1216489292:
		case -46622315:
		case -352356931:
		case -990286235:
		case 563463121:
		case 1734805203:
		case 941287179:
		case -1186079845:
		case -1985150258:
		case -1127021384:
		case -109201286:
		case 312105838:
		case 1982688246:
		case -661030418:
		case 1301046174:
		case -1586170317:
		case 393059668:
		case 23796958:
		case -1077156170:
		case 1780666425:
		case -2043695058:
		case -1922554349:
		case 1287308202:
		case 691372038:
		case 1480707108:
		case 1512499951:
		case 562283735:
		case -154732333:
		case -1362660491:
		case 645708827:
		case 767907967:
		case -1970151306:
		case 718859568:
		case -1955564771:
		case 892388724:
		case 1349151477:
		case 1620609399:
		case 1961641934:
		case 210955503:
		case -59668082:
		case 1736933716:
		case -1468524125:
		case 111573502:
		case 1525644423:
		case 968073639:
		case 1577781788:
		case -934465332:
		case -1194253122:
		case -212607085:
		case -815546555:
		case 1048226110:
		case 569170531:
		case -856006867:
		case 848090538:
			func_152(uParam2, -1135378931, 1445302971, 1474183246, iParam0, iParam1, iVar0, 7);
			break;
	}
}

bool func_152(var uParam0, int iParam1, int iParam2, int iParam3, int iParam4, int iParam5, int iParam6, int iParam7)//Position - 0x6F6F
{
	int iVar0;
	int iVar1;
	int iVar2;
	int iVar3;
	int iVar4;
	
	iVar0 = false;
	if (!func_160())
	{
		iVar0 = true;
	}
	if (!iVar0)
	{
		if (!unk3::_0xB24F0944DA203D9E(func_89()) || unk3::_0x810E8431C0614BF9())
		{
			Global_2558637 = 1;
			return false;
		}
		if (Global_2444207)
		{
			if (iParam3 == 1067618600 || iParam3 == -1303831698)
			{
				Global_2558638 = 1;
				return false;
			}
		}
	}
	iVar2 = false;
	iVar1 = 0;
	while (iVar1 < 5)
	{
		if (Global_2558146[iVar1 /*73*/].f_2 == 0)
		{
			iVar2 = true;
		}
		iVar1++;
	}
	if (!iVar2)
	{
		return false;
	}
	*uParam0 = 5;
	iVar3 = 2147483647;
	if (iVar0 || unk3::_network_shop_begin_service(&iVar3, iParam3, iParam4, iParam2, iParam5, iParam6))
	{
		if (iVar0 || unk3::_network_shop_checkout_start(iVar3))
		{
			*uParam0 = func_159(iVar3, iParam1, iParam4, iParam2, iParam3, iParam5, 0, iParam6, iParam7);
			if (iVar0)
			{
				if (*uParam0 != -1)
				{
					Global_2558146[*uParam0 /*73*/].f_66 = 1;
				}
			}
			Global_2558628 = 1;
			return true;
		}
	}
	else
	{
		if (iParam7 & 2 != 0)
		{
			Global_2558636 = 1;
			Global_2558639 = iParam4;
			Global_2558641 = iParam3;
			Global_2558642 = 1;
			Global_2558640 = iParam5;
		}
		if (iParam7 & 8 != 0)
		{
			Global_2558639 = iParam4;
			Global_2558641 = iParam3;
			Global_2558642 = 1;
			Global_2558640 = iParam5;
		}
		iVar4 = false;
		if (iVar4)
		{
			func_158(1, iParam4);
			Global_2558636 = 0;
		}
		if (iParam7 & 4 != 0)
		{
			func_153(-1, iParam4, iParam6, iParam5, -1);
		}
	}
	return false;
}

void func_153(int iParam0, int iParam1, int iParam2, int iParam3, int iParam4)//Position - 0x70E3
{
	switch (iParam1)
	{
		case 1704445500:
			gameplay::set_bit(&(Global_2418472[player::player_id() /*313*/].f_121.f_71), 0);
			break;
	}
	if (iParam0 != -1)
	{
		func_154(iParam0);
	}
}

void func_154(int iParam0)//Position - 0x711B
{
	int iVar0;
	
	iVar0 = false;
	if (!func_160())
	{
		iVar0 = true;
	}
	if (iParam0 != -1)
	{
		if (func_157(iParam0))
		{
			if (!iVar0)
			{
				unk_0xFA336E7F40C0A0D0();
			}
		}
		else if (!iVar0)
		{
			unk3::_network_shop_end_service(Global_2558146[iParam0 /*73*/]);
		}
		func_155(&(Global_2558146[iParam0 /*73*/]));
	}
}

void func_155(var uParam0)//Position - 0x716D
{
	*uParam0 = 0;
	*uParam0 = 2147483647;
	uParam0->f_1 = 0;
	uParam0->f_2 = 0;
	uParam0->f_3 = -1593119440;
	uParam0->f_4 = -2085313189;
	uParam0->f_5 = 0;
	uParam0->f_6 = 1227573907;
	uParam0->f_7 = -1161833819;
	uParam0->f_8 = 0;
	uParam0->f_8.f_1 = 0;
	uParam0->f_8.f_2 = 0;
	func_156(&(uParam0->f_8.f_3));
	func_156(&(uParam0->f_8.f_16));
	StringCopy(&(uParam0->f_8.f_29), "", 32);
	StringCopy(&(uParam0->f_8.f_37), "", 24);
	StringCopy(&(uParam0->f_8.f_43), "", 16);
	StringCopy(&(uParam0->f_8.f_47), "", 16);
	uParam0->f_8.f_51 = 0;
	uParam0->f_8.f_52 = 0;
	uParam0->f_8.f_53 = 0;
	uParam0->f_8.f_54 = 0;
	uParam0->f_8.f_55 = 0;
	uParam0->f_8.f_56 = 0;
	uParam0->f_66 = 0;
	uParam0->f_67 = 0;
	uParam0->f_68 = 0;
	uParam0->f_69 = 0;
	uParam0->f_70 = 0;
	uParam0->f_71 = 0;
	uParam0->f_72 = 0;
}

void func_156(var uParam0)//Position - 0x7254
{
	*uParam0 = 0;
	uParam0->f_1 = 0;
	uParam0->f_2 = 0;
	uParam0->f_3 = 0;
	uParam0->f_4 = 0;
	uParam0->f_5 = 0;
	uParam0->f_6 = 0;
	uParam0->f_7 = 0;
	uParam0->f_8 = 0;
	uParam0->f_9 = 0;
	uParam0->f_10 = 0;
	uParam0->f_11 = 0;
	uParam0->f_12 = 0;
}

int func_157(int iParam0)//Position - 0x729C
{
	if (iParam0 >= 0 && iParam0 < 5)
	{
		return Global_2558146[iParam0 /*73*/].f_5 == 1;
	}
	return false;
}

void func_158(int iParam0, int iParam1)//Position - 0x72C4
{
	Global_2445534 = iParam1;
	Global_2445533 = iParam0;
}

int func_159(int iParam0, var uParam1, int iParam2, int iParam3, int iParam4, int iParam5, int iParam6, int iParam7, var uParam8)//Position - 0x72D8
{
	int iVar0;
	
	iVar0 = 0;
	iVar0 = 0;
	while (iVar0 < 5)
	{
		if (Global_2558146[iVar0 /*73*/].f_2 == 0)
		{
			if (!func_160())
			{
				iParam0 = iVar0 + 900;
			}
			Global_2558146[iVar0 /*73*/].f_2 = 1;
			Global_2558146[iVar0 /*73*/].f_1 = iParam5;
			Global_2558146[iVar0 /*73*/].f_3 = uParam1;
			Global_2558146[iVar0 /*73*/].f_4 = iParam2;
			Global_2558146[iVar0 /*73*/].f_7 = iParam3;
			Global_2558146[iVar0 /*73*/].f_5 = 0;
			Global_2558146[iVar0 /*73*/] = iParam0;
			Global_2558146[iVar0 /*73*/].f_6 = iParam4;
			Global_2558146[iVar0 /*73*/].f_69 = uParam8;
			Global_2558146[iVar0 /*73*/].f_68 = iParam7;
			Global_2558146[iVar0 /*73*/].f_72 = 0;
			Global_2558628 = 0;
			if (iParam6)
			{
				Global_2558146[iVar0 /*73*/].f_5 = 1;
			}
			return iVar0;
		}
		iVar0++;
	}
	return -1;
}

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

var func_161(int iParam0)//Position - 0x73C0
{
	var uVar0;
	
	uVar0 = func_162(iParam0);
	return uVar0;
}

int func_162(int iParam0)//Position - 0x73D2
{
	if (iParam0 > -1)
	{
		if (iParam0 == player::player_id())
		{
			return networkcash::_0xA40F9C2623F6A8B5(-1);
		}
		else if (func_163(iParam0))
		{
			return Global_1587523[iParam0 /*444*/].f_195.f_3;
		}
		else
		{
			return 0;
		}
	}
	return 0;
}

int func_163(int iParam0)//Position - 0x7415
{
	if (iParam0 == -1)
	{
		return false;
	}
	else
	{
		return gameplay::is_bit_set(Global_2428492.f_1, iParam0);
	}
	return true;
}

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

bool func_165(var uParam0)//Position - 0x7451
{
	char* sVar0;
	
	sVar0 = "taxi_display";
	if (entity::does_entity_exist(iLocal_1736))
	{
		return true;
	}
	else
	{
		streaming::request_model(iLocal_1737);
		iLocal_1738 = unk_0x67D02A194A2FC2BD(sVar0);
		if (streaming::has_model_loaded(iLocal_1737) && graphics::has_scaleform_movie_loaded(iLocal_1738))
		{
			if (func_13(Local_93.f_2[uParam0 /*23*/]))
			{
				iLocal_1736 = object::create_object(iLocal_1737, entity::get_entity_coords(network::net_to_veh(Local_93.f_2[uParam0 /*23*/]), 1), 0, false, false);
				entity::attach_entity_to_entity(iLocal_1736, network::net_to_veh(Local_93.f_2[uParam0 /*23*/]), entity::get_entity_bone_index_by_name(network::net_to_veh(Local_93.f_2[uParam0 /*23*/]), "Chassis"), vLocal_2616, vLocal_2619, 0, 0, 0, 0, 2, 1);
				if (!ui::is_named_rendertarget_registered("taxi"))
				{
					ui::register_named_rendertarget("taxi", 0);
					ui::link_named_rendertarget(entity::get_entity_model(iLocal_1736));
				}
				iLocal_1733 = ui::get_named_rendertarget_render_id("taxi");
				return true;
			}
		}
	}
	return false;
}

void func_166(int iParam0)//Position - 0x7528
{
	int iVar0;
	
	if (func_169())
	{
		if (Local_93.f_2[iParam0 /*23*/].f_7 == 8 && entity::is_entity_at_entity(player::player_ped_id(), network::net_to_veh(Local_93.f_2[iParam0 /*23*/]), 20f, 20f, 3f, 0, 1, 1))
		{
			streaming::request_anim_dict("TAXI_HAIL");
			if (streaming::has_anim_dict_loaded("TAXI_HAIL"))
			{
				if (uLocal_1707[iParam0] == -1)
				{
					func_168(&(uLocal_1707[iParam0]), 0, "TXM_H01", 1, 0, 0, 0);
				}
				if (func_167(uLocal_1707[iParam0], 1))
				{
					ai::clear_ped_tasks(player::player_ped_id());
					if (weapon::is_ped_armed(player::player_ped_id(), 7))
					{
						ai::open_sequence_task(&iVar0);
						ai::task_swap_weapon(0, 0);
						ai::task_play_anim(0, "TAXI_HAIL", "HAIL_TAXI", 8f, -8f, -1, 48, 0f, 0, 0, 0);
						ai::close_sequence_task(iVar0);
						ai::task_perform_sequence(player::player_ped_id(), iVar0);
						ai::clear_sequence_task(&iVar0);
					}
					else
					{
						ai::task_play_anim(player::player_ped_id(), "TAXI_HAIL", "HAIL_TAXI", 8f, -8f, -1, 48, 0f, 0, 0, 0);
					}
					if (func_48("TXM_H01"))
					{
						ui::clear_help(1);
					}
					Local_288[network::participant_id_to_int() /*44*/].f_4.f_1 = iParam0;
					gameplay::clear_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2), 23);
					gameplay::clear_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2), 22);
					func_46(&(uLocal_1707[iParam0]));
				}
			}
		}
		else
		{
			streaming::remove_anim_dict("TAXI_HAIL");
			func_46(&(uLocal_1707[iParam0]));
		}
	}
	else
	{
		streaming::remove_anim_dict("TAXI_HAIL");
		func_46(&(uLocal_1707[iParam0]));
	}
}

bool func_167(int iParam0, int iParam1)//Position - 0x76A3
{
	int iVar0;
	
	iVar0 = func_47(iParam0);
	if (iVar0 == -1)
	{
		return false;
	}
	if (!player::is_player_playing(player::get_player_index()))
	{
		return false;
	}
	if (func_50(0))
	{
		return false;
	}
	if (cutscene::is_cutscene_playing())
	{
		return false;
	}
	if (iVar0 > -1 && iVar0 < 6)
	{
		if (Global_36411[iVar0 /*32*/] == 1 && Global_36411[iVar0 /*32*/].f_4 == 1)
		{
			if (iParam1)
			{
				if (Global_36411[iVar0 /*32*/].f_29)
				{
					return false;
				}
			}
			Global_36411[iVar0 /*32*/].f_5 = 1;
			Global_36411[iVar0 /*32*/].f_29 = 1;
			return true;
		}
		else
		{
			if (Global_36411[iVar0 /*32*/] == 0)
			{
			}
			if (Global_36411[iVar0 /*32*/].f_7)
			{
			}
		}
	}
	return false;
}

void func_168(var uParam0, int iParam1, char* sParam2, int iParam3, char* sParam4, int iParam5, int iParam6)//Position - 0x775B
{
	int iVar0;
	
	if (script::_get_number_of_instances_of_streamed_script(joaat("context_controller")) < 1)
	{
	}
	if (streaming::is_player_switch_in_progress())
	{
		if (!*uParam0 == -1)
		{
			func_46(uParam0);
		}
		return;
	}
	if (!*uParam0 == -1)
	{
		return;
	}
	iVar0 = 0;
	iVar0 = 0;
	while (iVar0 < 6)
	{
		if (!Global_36411[iVar0 /*32*/])
		{
			Global_36411[iVar0 /*32*/] = 1;
			Global_36411[iVar0 /*32*/].f_1 = Global_36612;
			Global_36612++;
			Global_36411[iVar0 /*32*/].f_4 = 0;
			Global_36411[iVar0 /*32*/].f_29 = 0;
			Global_36411[iVar0 /*32*/].f_5 = 0;
			Global_36411[iVar0 /*32*/].f_2 = iParam1;
			StringCopy(&(Global_36411[iVar0 /*32*/].f_8), sParam2, 16);
			Global_36411[iVar0 /*32*/].f_6 = iParam3;
			Global_36411[iVar0 /*32*/].f_31 = script::get_id_of_this_thread();
			Global_36411[iVar0 /*32*/].f_7 = 0;
			Global_36411[iVar0 /*32*/].f_3 = iParam5;
			if (!gameplay::is_string_null_or_empty(sParam4))
			{
				Global_36411[iVar0 /*32*/].f_12 = 1;
				StringCopy(&(Global_36411[iVar0 /*32*/].f_13), sParam4, 64);
				Global_36411[iVar0 /*32*/].f_30 = iParam6;
			}
			else
			{
				Global_36411[iVar0 /*32*/].f_12 = 0;
				Global_36411[iVar0 /*32*/].f_30 = 0;
			}
			*uParam0 = Global_36411[iVar0 /*32*/].f_1;
			return;
		}
		iVar0++;
	}
}

bool func_169()//Position - 0x7886
{
	if (func_10(player::player_id(), 1, 1))
	{
		if (Local_288[network::participant_id_to_int() /*44*/].f_4.f_1 != -1)
		{
			return false;
		}
		if (ped::is_ped_in_any_vehicle(player::player_ped_id(), 1))
		{
			return false;
		}
		if (player::get_player_wanted_level(player::player_id()) > 0)
		{
			return false;
		}
		if (func_170(player::player_id(), 1))
		{
			return false;
		}
		if (func_50(0))
		{
			return false;
		}
		if (func_73())
		{
			return false;
		}
		if (func_78())
		{
			return false;
		}
		if (!player::is_player_control_on(player::player_id()))
		{
			return false;
		}
		return true;
	}
	return false;
}

bool func_170(int iParam0, int iParam1)//Position - 0x791A
{
	if (iParam1)
	{
		if (func_171(iParam0))
		{
			return true;
		}
	}
	if (Global_1587523[iParam0 /*444*/] == -1)
	{
		return false;
	}
	return true;
}

int func_171(var uParam0)//Position - 0x7946
{
	return func_172(uParam0);
}

int func_172(var uParam0)//Position - 0x7954
{
	return gameplay::is_bit_set(Global_1587523[uParam0 /*444*/].f_13.f_1, 0);
}

void func_173(int iParam0)//Position - 0x796E
{
	int iVar0;
	int iVar1;
	var uVar2;
	var uVar3;
	int iVar4;
	int iVar5;
	
	if (((((((entity::is_entity_at_entity(player::player_ped_id(), network::net_to_veh(Local_93.f_2[iParam0 /*23*/]), 10f, 10f, 2f, 0, 1, 0) && !ped::is_ped_in_any_vehicle(player::player_ped_id(), 0)) && entity::get_entity_speed(network::net_to_veh(Local_93.f_2[iParam0 /*23*/])) < 3f) && !func_178(network::net_to_veh(Local_93.f_2[iParam0 /*23*/]), 0)) && player::get_player_wanted_level(player::player_id()) <= 0) && Local_93.f_2[iParam0 /*23*/].f_7 != 9) && Local_93.f_2[iParam0 /*23*/].f_7 != 10) && Local_93.f_2[iParam0 /*23*/].f_7 != 11)
	{
		if (gameplay::is_bit_set(Local_288[network::participant_id_to_int() /*44*/].f_3, (0 + iParam0)))
		{
			func_138(&iVar0, &iVar1, &uVar2, &uVar3, 0);
			if (((iVar1 > 28 || iVar1 < -28) || iVar0 > 28) || iVar0 < -28)
			{
				if (iLocal_1900 == 0)
				{
					system::settimera(0);
					iLocal_1900 = 1;
				}
			}
			else
			{
				iLocal_1900 = 0;
			}
			if (iLocal_1900 == 1)
			{
				if (system::timera() > 275)
				{
					if (!ped::is_ped_in_any_vehicle(player::player_ped_id(), 0))
					{
						ai::clear_ped_tasks(player::player_ped_id());
						gameplay::clear_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_3), (0 + iParam0));
						iLocal_1900 = 0;
					}
				}
			}
		}
		else
		{
			if (!gameplay::is_bit_set(iLocal_1697, (0 + iParam0)))
			{
				if (!ui::is_help_message_being_displayed())
				{
					iVar5 = func_177(1183, -1, 0);
					if ((!gameplay::is_bit_set(iVar5, 7) || !gameplay::is_bit_set(iVar5, 8)) || !gameplay::is_bit_set(iVar5, 9))
					{
						if (func_85(&uLocal_1728, 20000, 0))
						{
							if (((interior::get_interior_from_entity(network::net_to_veh(Local_93.f_2[iParam0 /*23*/])) == interior::get_interior_from_entity(player::player_ped_id()) && entity::is_entity_upright(network::net_to_veh(Local_93.f_2[iParam0 /*23*/]), 1119092736)) && !entity::is_entity_in_water(network::net_to_veh(Local_93.f_2[iParam0 /*23*/]))) && player::is_player_control_on(player::player_id()))
							{
								func_164("TXM_H02", -1);
								if (!gameplay::is_bit_set(iVar5, 7))
								{
									gameplay::set_bit(&iVar5, 7);
								}
								else if (!gameplay::is_bit_set(iVar5, 8))
								{
									gameplay::set_bit(&iVar5, 8);
								}
								else
								{
									gameplay::set_bit(&iVar5, 9);
								}
								func_175(1183, iVar5, -1, 1);
								func_30(&uLocal_1728);
								gameplay::set_bit(&iLocal_1697, (0 + iParam0));
							}
						}
					}
				}
			}
			if (controls::is_control_pressed(0, 23))
			{
				if (system::timerb() > 275)
				{
					if (!gameplay::is_bit_set(Local_288[network::participant_id_to_int() /*44*/].f_3, (0 + iParam0)))
					{
						if (func_174(network::net_to_veh(Local_93.f_2[iParam0 /*23*/])) == 1)
						{
							if (vehicle::is_vehicle_seat_free(network::net_to_veh(Local_93.f_2[iParam0 /*23*/]), 1))
							{
								iVar4 = 1;
							}
							else if (vehicle::is_vehicle_seat_free(network::net_to_veh(Local_93.f_2[iParam0 /*23*/]), 2))
							{
								iVar4 = 2;
							}
							else
							{
								iVar4 = 0;
							}
						}
						else if (vehicle::is_vehicle_seat_free(network::net_to_veh(Local_93.f_2[iParam0 /*23*/]), 2))
						{
							iVar4 = 2;
						}
						else if (vehicle::is_vehicle_seat_free(network::net_to_veh(Local_93.f_2[iParam0 /*23*/]), 0))
						{
							iVar4 = 0;
						}
						else
						{
							iVar4 = 1;
						}
						ai::clear_ped_tasks(player::player_ped_id());
						ai::task_enter_vehicle(player::player_ped_id(), network::net_to_veh(Local_93.f_2[iParam0 /*23*/]), -1, iVar4, 1f, 8388608, 0);
						gameplay::set_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_3), (0 + iParam0));
						iLocal_2610 = 1;
					}
				}
			}
			else
			{
				system::settimerb(0);
			}
		}
	}
	else
	{
		if (gameplay::is_bit_set(iLocal_1697, (0 + iParam0)))
		{
			gameplay::clear_bit(&iLocal_1697, (0 + iParam0));
			if (func_48("TXM_H02"))
			{
				ui::clear_help(1);
			}
		}
		if (gameplay::is_bit_set(Local_288[network::participant_id_to_int() /*44*/].f_3, (0 + iParam0)))
		{
			if (!ped::is_ped_in_any_vehicle(player::player_ped_id(), 0))
			{
				ai::clear_ped_tasks(player::player_ped_id());
				iLocal_1900 = 0;
			}
			gameplay::clear_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_3), (0 + iParam0));
		}
	}
}

int func_174(int iParam0)//Position - 0x7D2E
{
	vector3 vVar0;
	vector3 vVar3;
	vector3 vVar6;
	vector3 vVar9;
	vector3 vVar12;
	
	if (vehicle::is_vehicle_driveable(iParam0, 0))
	{
		if (player::is_player_playing(player::player_id()))
		{
			vVar0 = { entity::get_entity_coords(player::player_ped_id(), 1) };
		}
		else
		{
			return -1;
		}
		vVar3 = { entity::get_offset_from_entity_in_world_coords(iParam0, 1f, -0.5f, 0f) };
		vVar9 = { vVar3 - vVar0 };
		vVar6 = { entity::get_offset_from_entity_in_world_coords(iParam0, -1f, -0.5f, 0f) };
		vVar12 = { vVar6 - vVar0 };
		if (system::vmag(vVar9) < system::vmag(vVar12))
		{
			return 2;
		}
		else
		{
			return 1;
		}
	}
	return -1;
}

void func_175(int iParam0, int iParam1, int iParam2, int iParam3)//Position - 0x7DBE
{
	int iVar0;
	
	iVar0 = Global_2469339[iParam0 /*5*/][func_176(iParam2)];
	if (iVar0 != 0)
	{
		stats::stat_set_int(iVar0, iParam1, iParam3);
	}
}

int func_176(var uParam0)//Position - 0x7DE9
{
	int iVar0;
	int iVar1;
	
	iVar0 = uParam0;
	if (iVar0 == -1)
	{
		iVar1 = func_89();
		if (iVar1 > -1)
		{
			Global_2469052 = 0;
			iVar0 = iVar1;
		}
		else
		{
			iVar0 = 0;
			Global_2469052 = 1;
		}
	}
	return iVar0;
}

int func_177(int iParam0, int iParam1, int iParam2)//Position - 0x7E1D
{
	int iVar0;
	var uVar1;
	
	if (iParam2 == 0)
	{
	}
	iVar0 = Global_2469339[iParam0 /*5*/][func_176(iParam1)];
	if (stats::stat_get_int(iVar0, &uVar1, -1))
	{
		return uVar1;
	}
	return 0;
}

bool func_178(int iParam0, int iParam1)//Position - 0x7E4F
{
	int iVar0;
	int iVar1;
	int iVar2;
	
	if (!entity::is_entity_dead(iParam0, 0))
	{
		iVar1 = vehicle::get_vehicle_max_number_of_passengers(iParam0) + 1;
		iVar0 = 0;
		while (iVar0 < iVar1)
		{
			if (vehicle::is_vehicle_seat_free(iParam0, (iVar0 - 1)))
			{
				return false;
			}
			else if (!iParam1)
			{
				iVar2 = vehicle::get_ped_in_vehicle_seat(iParam0, (iVar0 - 1));
				if (ped::is_ped_injured(iVar2))
				{
					return false;
				}
			}
			iVar0++;
		}
	}
	return true;
}

void func_179(int iParam0)//Position - 0x7EB3
{
	if (Local_93.f_2[iParam0 /*23*/].f_2 == network::participant_id_to_int())
	{
		if (Local_93.f_2[iParam0 /*23*/].f_3 == -1)
		{
			if (Local_93.f_2[iParam0 /*23*/].f_7 == 3)
			{
				if (func_10(player::player_id(), 1, 1))
				{
					if (!func_15(Local_93.f_2[iParam0 /*23*/].f_1))
					{
						if (func_13(Local_93.f_2[iParam0 /*23*/]))
						{
							if (ped::is_ped_in_vehicle(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), network::net_to_veh(Local_93.f_2[iParam0 /*23*/]), 0))
							{
								func_180(iParam0);
								return;
							}
						}
					}
				}
			}
		}
	}
	func_45(iParam0);
}

void func_180(var uParam0)//Position - 0x7F47
{
	if (!ui::does_blip_exist(iLocal_1698[uParam0]))
	{
		iLocal_1698[uParam0] = ui::add_blip_for_entity(network::net_to_veh(Local_93.f_2[uParam0 /*23*/]));
		ui::set_blip_sprite(iLocal_1698[uParam0], 198);
		ui::set_blip_name_from_text_file(iLocal_1698[uParam0], "TXM_BLIP");
		ui::set_blip_flashes(iLocal_1698[uParam0], 1);
		ui::set_blip_flash_timer(iLocal_1698[uParam0], 7000);
		gameplay::set_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2), 12);
	}
}

void func_181(int iParam0)//Position - 0x7FBE
{
	if (!gameplay::is_bit_set(Global_2460486.f_743, 1))
	{
		if (ui::does_blip_exist(iLocal_1698[iParam0]))
		{
			gameplay::set_bit(&(Global_2460486.f_743), 1);
		}
	}
	if (gameplay::is_bit_set(Local_288[network::participant_id_to_int() /*44*/].f_1, 0))
	{
		if (Local_93.f_2[iParam0 /*23*/].f_2 == network::participant_id_to_int())
		{
			gameplay::clear_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_1), 0);
		}
	}
}

void func_182(int iParam0)//Position - 0x8024
{
	int iVar0;
	int iVar1;
	float fVar2;
	int iVar3;
	vector3 vVar4;
	int iVar7;
	int iVar8;
	int iVar9;
	float fVar10;
	
	if (!func_15(Local_93.f_2[iParam0 /*23*/].f_1) && func_13(Local_93.f_2[iParam0 /*23*/]))
	{
		if (network::network_has_control_of_network_id(Local_93.f_2[iParam0 /*23*/].f_1) && network::network_has_control_of_network_id(Local_93.f_2[iParam0 /*23*/]))
		{
			iVar3 = 3;
			vVar4 = { entity::get_entity_coords(network::net_to_veh(Local_93.f_2[iParam0 /*23*/]), 0) };
			if (Local_93.f_2[iParam0 /*23*/].f_7 != 11)
			{
				if (Local_93.f_2[iParam0 /*23*/].f_7 != 9)
				{
					if (Local_93.f_2[iParam0 /*23*/].f_7 != 10)
					{
						ped::set_ped_config_flag(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), 251, true);
						if (!gameplay::is_bit_set(Local_288[network::participant_id_to_int() /*44*/].f_4.f_3, iParam0))
						{
							if (func_205(iParam0))
							{
								func_37(1, 1, 1);
								gameplay::set_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_4.f_3), iParam0);
							}
						}
						if (Local_93.f_2[iParam0 /*23*/].f_7 != 8)
						{
							vehicle::_0xBE5C1255A1830FF5(network::net_to_veh(Local_93.f_2[iParam0 /*23*/]), 1);
						}
					}
				}
			}
			func_204(iParam0);
			switch (Local_93.f_2[iParam0 /*23*/].f_7)
			{
				case 0:
					break;
				
				case 1:
					if (Local_93.f_2[iParam0 /*23*/].f_2 != -1 && Local_93.f_2[iParam0 /*23*/].f_2 == network::participant_id_to_int())
					{
						if (func_11(Local_288[Local_93.f_2[iParam0 /*23*/].f_2 /*44*/].f_4.f_26, 0f, 0f, 0f, 0))
						{
							if (func_200(iParam0, func_203(player::player_id()), &(Local_288[Local_93.f_2[iParam0 /*23*/].f_2 /*44*/].f_4.f_26), &(Local_288[Local_93.f_2[iParam0 /*23*/].f_2 /*44*/].f_4.f_29), &(Local_288[Local_93.f_2[iParam0 /*23*/].f_2 /*44*/].f_4.f_34), 250))
							{
								Local_288[Local_93.f_2[iParam0 /*23*/].f_2 /*44*/].f_4.f_34 = -1;
								ai::task_vehicle_drive_to_coord(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), network::net_to_veh(Local_93.f_2[iParam0 /*23*/]), Local_288[Local_93.f_2[iParam0 /*23*/].f_2 /*44*/].f_4.f_26, 12f, 0, entity::get_entity_model(network::net_to_veh(Local_93.f_2[iParam0 /*23*/])), iVar1, (45f - 20f), 20f);
							}
						}
						else if (!func_9(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), -1817882002, 1))
						{
							iVar1 = iLocal_1744;
							ai::task_vehicle_drive_to_coord(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), network::net_to_veh(Local_93.f_2[iParam0 /*23*/]), Local_288[Local_93.f_2[iParam0 /*23*/].f_2 /*44*/].f_4.f_26, 12f, 0, entity::get_entity_model(network::net_to_veh(Local_93.f_2[iParam0 /*23*/])), iVar1, (45f - 20f), 20f);
						}
						gameplay::clear_bit(&(Local_288[Local_93.f_2[iParam0 /*23*/].f_2 /*44*/].f_4.f_2), 21);
					}
					break;
				
				case 2:
					if (Local_93.f_2[iParam0 /*23*/].f_2 != -1 && Local_93.f_2[iParam0 /*23*/].f_2 == network::participant_id_to_int())
					{
						if (!gameplay::is_bit_set(Local_288[Local_93.f_2[iParam0 /*23*/].f_2 /*44*/].f_4.f_2, 21))
						{
							if (func_197(vVar4, Local_288[Local_93.f_2[iParam0 /*23*/].f_2 /*44*/].f_4.f_26, Local_288[Local_93.f_2[iParam0 /*23*/].f_2 /*44*/].f_4.f_29, &(Local_288[Local_93.f_2[iParam0 /*23*/].f_2 /*44*/].f_4.f_26), &(Local_288[Local_93.f_2[iParam0 /*23*/].f_2 /*44*/].f_4.f_29)))
							{
								ped::set_driver_ability(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), 0.5f);
								if (gameplay::is_bit_set(Local_288[Local_93.f_2[iParam0 /*23*/].f_2 /*44*/].f_4.f_2, 14))
								{
									ai::task_vehicle_park(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), network::net_to_veh(Local_93.f_2[iParam0 /*23*/]), Local_288[Local_93.f_2[iParam0 /*23*/].f_2 /*44*/].f_4.f_26, Local_288[Local_93.f_2[iParam0 /*23*/].f_2 /*44*/].f_4.f_29, 0, 60f, 0);
								}
								else
								{
									ai::task_vehicle_park(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), network::net_to_veh(Local_93.f_2[iParam0 /*23*/]), Local_288[Local_93.f_2[iParam0 /*23*/].f_2 /*44*/].f_4.f_26, Local_288[Local_93.f_2[iParam0 /*23*/].f_2 /*44*/].f_4.f_29, 3, 60f, 0);
								}
								iLocal_2610 = 1;
								gameplay::set_bit(&(Local_288[Local_93.f_2[iParam0 /*23*/].f_2 /*44*/].f_4.f_2), 21);
							}
						}
						gameplay::clear_bit(&(Local_288[Local_93.f_2[iParam0 /*23*/].f_2 /*44*/].f_4.f_2), 22);
						gameplay::clear_bit(&(Local_288[Local_93.f_2[iParam0 /*23*/].f_2 /*44*/].f_4.f_2), 23);
					}
					break;
				
				case 3:
					if (Local_93.f_2[iParam0 /*23*/].f_2 != -1 && Local_93.f_2[iParam0 /*23*/].f_2 == network::participant_id_to_int())
					{
						if (!gameplay::is_bit_set(Local_288[Local_93.f_2[iParam0 /*23*/].f_2 /*44*/].f_4.f_2, 23))
						{
							vehicle::start_vehicle_horn(network::net_to_veh(Local_93.f_2[iParam0 /*23*/]), 2500, gameplay::get_hash_key("NORMAL"), 0);
							gameplay::set_bit(&(Local_288[Local_93.f_2[iParam0 /*23*/].f_2 /*44*/].f_4.f_2), 23);
						}
						if (!gameplay::is_bit_set(Local_288[Local_93.f_2[iParam0 /*23*/].f_2 /*44*/].f_4.f_2, 22))
						{
							ai::task_vehicle_mission_coors_target(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), network::net_to_veh(Local_93.f_2[iParam0 /*23*/]), entity::get_entity_coords(network::net_to_veh(Local_93.f_2[iParam0 /*23*/]), 1), 5, 5f, 1076627627, -1f, 1f, 1);
							iLocal_2610 = 1;
							gameplay::set_bit(&(Local_288[Local_93.f_2[iParam0 /*23*/].f_2 /*44*/].f_4.f_2), 22);
						}
						else if (!vehicle::is_vehicle_stopped(network::net_to_veh(Local_93.f_2[iParam0 /*23*/])))
						{
							if (!func_9(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), -1273030092, 1) || ai::get_active_vehicle_mission_type(network::net_to_veh(Local_93.f_2[iParam0 /*23*/])) != 5)
							{
								gameplay::clear_bit(&(Local_288[Local_93.f_2[iParam0 /*23*/].f_2 /*44*/].f_4.f_2), 22);
							}
						}
					}
					break;
				
				case 4:
					if (Local_93.f_2[iParam0 /*23*/].f_3 != -1 && Local_93.f_2[iParam0 /*23*/].f_3 == network::participant_id_to_int())
					{
						Local_288[Local_93.f_2[iParam0 /*23*/].f_3 /*44*/].f_4.f_30 = { 0f, 0f, 0f };
						Local_288[Local_93.f_2[iParam0 /*23*/].f_3 /*44*/].f_4.f_33 = 0f;
						Local_288[Local_93.f_2[iParam0 /*23*/].f_3 /*44*/].f_4.f_34 = -1;
					}
					if (func_9(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), -1273030092, 1))
					{
						func_114(iParam0, 0, 0);
					}
					streaming::request_anim_dict("ODDJOBS@TAXI@DRIVER");
					if (streaming::has_anim_dict_loaded("ODDJOBS@TAXI@DRIVER"))
					{
						if (entity::is_entity_playing_anim(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), "ODDJOBS@TAXI@DRIVER", "leanover_enter", 3))
						{
							if (entity::has_entity_anim_finished(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), "ODDJOBS@TAXI@DRIVER", "leanover_enter", 3))
							{
								ai::task_clear_look_at(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1));
								ai::task_play_anim(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), "ODDJOBS@TAXI@DRIVER", "leanover_idle", 4f, -8f, -1, 1, 0f, 0, 0, 0);
							}
						}
						else if (!entity::is_entity_playing_anim(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), "ODDJOBS@TAXI@DRIVER", "leanover_idle", 3))
						{
							if (!vehicle::is_vehicle_stopped(network::net_to_veh(Local_93.f_2[iParam0 /*23*/])))
							{
								if (!func_9(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), -1273030092, 1))
								{
									ai::task_vehicle_mission_coors_target(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), network::net_to_veh(Local_93.f_2[iParam0 /*23*/]), vVar4, 5, 5f, 1076627627, -1f, 1f, 1);
								}
							}
							else if (vehicle::is_vehicle_seat_free(network::net_to_veh(Local_93.f_2[iParam0 /*23*/]), 0))
							{
								ai::task_clear_look_at(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1));
								ai::task_play_anim(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), "ODDJOBS@TAXI@DRIVER", "leanover_enter", 8f, -8f, -1, 2, 0f, 0, 0, 0);
							}
						}
					}
					break;
				
				case 5:
					if (Local_93.f_2[iParam0 /*23*/].f_3 != -1 && Local_93.f_2[iParam0 /*23*/].f_3 == network::participant_id_to_int())
					{
						if (func_11(Local_288[Local_93.f_2[iParam0 /*23*/].f_3 /*44*/].f_4.f_30, 0f, 0f, 0f, 0) && func_11(Local_93.f_2[iParam0 /*23*/].f_8, Local_288[Local_93.f_2[iParam0 /*23*/].f_3 /*44*/].f_4.f_5, 0))
						{
							if (Local_288[Local_93.f_2[iParam0 /*23*/].f_3 /*44*/].f_4.f_34 == -1)
							{
								if (func_196(Local_93.f_2[iParam0 /*23*/].f_8, &(Local_288[Local_93.f_2[iParam0 /*23*/].f_3 /*44*/].f_4.f_30), &(Local_288[Local_93.f_2[iParam0 /*23*/].f_3 /*44*/].f_4.f_33), iParam0) || func_186(Local_93.f_2[iParam0 /*23*/].f_8, &(Local_288[Local_93.f_2[iParam0 /*23*/].f_3 /*44*/].f_4.f_30), &(Local_288[Local_93.f_2[iParam0 /*23*/].f_3 /*44*/].f_4.f_33), iParam0))
								{
									gameplay::set_bit(&(Local_288[Local_93.f_2[iParam0 /*23*/].f_3 /*44*/].f_4.f_2), 14);
									func_114(iParam0, 0, 0);
									iLocal_2610 = 1;
								}
								Local_288[Local_93.f_2[iParam0 /*23*/].f_3 /*44*/].f_4.f_34 = 0;
							}
							else
							{
								iVar8 = network::net_to_veh(Local_93.f_2[iParam0 /*23*/]);
								if (func_183(&iVar8, Local_93.f_2[iParam0 /*23*/].f_8, &(Local_288[Local_93.f_2[iParam0 /*23*/].f_3 /*44*/].f_4.f_30), &(Local_288[Local_93.f_2[iParam0 /*23*/].f_3 /*44*/].f_4.f_33), &(Local_288[Local_93.f_2[iParam0 /*23*/].f_3 /*44*/].f_4.f_34), 1000))
								{
									gameplay::clear_bit(&(Local_288[Local_93.f_2[iParam0 /*23*/].f_3 /*44*/].f_4.f_2), 14);
									Local_288[Local_93.f_2[iParam0 /*23*/].f_3 /*44*/].f_4.f_34 = 0;
									func_114(iParam0, 0, 0);
									iLocal_2610 = 1;
								}
							}
						}
						if (entity::is_entity_playing_anim(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), "ODDJOBS@TAXI@DRIVER", "leanover_enter", 3) || entity::is_entity_playing_anim(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), "ODDJOBS@TAXI@DRIVER", "leanover_idle", 3))
						{
							streaming::request_anim_dict("ODDJOBS@TAXI@DRIVER");
							if (streaming::has_anim_dict_loaded("ODDJOBS@TAXI@DRIVER"))
							{
								ai::task_clear_look_at(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1));
								ai::task_play_anim(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), "ODDJOBS@TAXI@DRIVER", "leanover_exit", 4f, -4f, -1, 0, 0f, 0, 0, 0);
							}
						}
						else if (entity::is_entity_playing_anim(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), "ODDJOBS@TAXI@DRIVER", "leanover_exit", 3))
						{
							entity::set_entity_anim_speed(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), "ODDJOBS@TAXI@DRIVER", "leanover_exit", 1.2f);
						}
						else if (!func_11(Local_288[Local_93.f_2[iParam0 /*23*/].f_3 /*44*/].f_4.f_30, 0f, 0f, 0f, 0))
						{
							if (!func_8(iParam0))
							{
								if (!func_9(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), 242628503, 1))
								{
									fVar2 = 15f;
									iVar1 = iLocal_1744;
									iVar3 = 3;
									if (gameplay::is_bit_set(Local_93.f_2[iParam0 /*23*/].f_6, 3) || gameplay::is_bit_set(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2, 3))
									{
										fVar2 = 20f;
										iVar1 = iLocal_1745;
									}
									if (gameplay::is_bit_set(Local_288[Local_93.f_2[iParam0 /*23*/].f_3 /*44*/].f_4.f_2, 14))
									{
										iVar3 = 0;
									}
									func_114(iParam0, 1, 1);
									ped::set_driver_ability(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), 0.5f);
									ai::open_sequence_task(&iVar0);
									ai::task_vehicle_drive_to_coord_longrange(0, network::net_to_veh(Local_93.f_2[iParam0 /*23*/]), Local_288[Local_93.f_2[iParam0 /*23*/].f_3 /*44*/].f_4.f_30, fVar2, iVar1, 45f);
									ai::task_vehicle_park(0, network::net_to_veh(Local_93.f_2[iParam0 /*23*/]), Local_288[Local_93.f_2[iParam0 /*23*/].f_3 /*44*/].f_4.f_30, Local_288[Local_93.f_2[iParam0 /*23*/].f_3 /*44*/].f_4.f_33, iVar3, 60f, 1);
									ai::close_sequence_task(iVar0);
									ai::task_perform_sequence(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), iVar0);
									ai::clear_sequence_task(&iVar0);
									iLocal_2610 = 1;
								}
							}
						}
						gameplay::clear_bit(&(Local_288[Local_93.f_2[iParam0 /*23*/].f_3 /*44*/].f_4.f_2), 24);
						gameplay::clear_bit(&(Local_288[Local_93.f_2[iParam0 /*23*/].f_3 /*44*/].f_4.f_2), 25);
					}
					break;
				
				case 6:
					if (Local_93.f_2[iParam0 /*23*/].f_3 != -1 && Local_93.f_2[iParam0 /*23*/].f_3 == network::participant_id_to_int())
					{
						if (!gameplay::is_bit_set(Local_288[Local_93.f_2[iParam0 /*23*/].f_3 /*44*/].f_4.f_2, 24))
						{
							if (!func_9(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), 242628503, 1))
							{
								ai::task_vehicle_mission_coors_target(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), network::net_to_veh(Local_93.f_2[iParam0 /*23*/]), entity::get_entity_coords(network::net_to_veh(Local_93.f_2[iParam0 /*23*/]), 1), 5, 5f, 1076627627, -1f, 1f, 1);
								iLocal_2610 = 1;
								gameplay::set_bit(&(Local_288[Local_93.f_2[iParam0 /*23*/].f_3 /*44*/].f_4.f_2), 24);
							}
						}
						else
						{
							if (!vehicle::is_vehicle_stopped(network::net_to_veh(Local_93.f_2[iParam0 /*23*/])))
							{
								if (!func_9(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), -1273030092, 1) || ai::get_active_vehicle_mission_type(network::net_to_veh(Local_93.f_2[iParam0 /*23*/])) != 5)
								{
									gameplay::clear_bit(&(Local_288[Local_93.f_2[iParam0 /*23*/].f_3 /*44*/].f_4.f_2), 24);
								}
							}
							func_7(iParam0, 1);
						}
					}
					break;
				
				case 7:
					if (Local_93.f_2[iParam0 /*23*/].f_3 != -1 && Local_93.f_2[iParam0 /*23*/].f_3 == network::participant_id_to_int())
					{
						iLocal_2610 = 1;
						if (entity::is_entity_playing_anim(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), "ODDJOBS@TAXI@DRIVER", "leanover_enter", 3))
						{
							if (entity::has_entity_anim_finished(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), "ODDJOBS@TAXI@DRIVER", "leanover_enter", 3))
							{
								streaming::request_anim_dict("ODDJOBS@TAXI@DRIVER");
								if (streaming::has_anim_dict_loaded("ODDJOBS@TAXI@DRIVER"))
								{
									ai::task_clear_look_at(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1));
									ai::task_play_anim(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), "ODDJOBS@TAXI@DRIVER", "leanover_idle", 4f, -8f, -1, 1, 0f, 0, 0, 0);
								}
							}
						}
						else if (!entity::is_entity_playing_anim(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), "ODDJOBS@TAXI@DRIVER", "leanover_idle", 3) && !entity::is_entity_playing_anim(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), "ODDJOBS@TAXI@DRIVER", "leanover_exit", 3))
						{
							if (!gameplay::is_bit_set(Local_288[Local_93.f_2[iParam0 /*23*/].f_3 /*44*/].f_4.f_2, 25))
							{
								if (!func_9(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), -1273030092, 1) || ai::get_active_vehicle_mission_type(network::net_to_veh(Local_93.f_2[iParam0 /*23*/])) != 5)
								{
									func_114(iParam0, 1, 1);
									ai::task_vehicle_park(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), network::net_to_veh(Local_93.f_2[iParam0 /*23*/]), entity::get_entity_coords(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), 1), entity::get_entity_heading(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1)), 3, 60f, 0);
								}
								gameplay::set_bit(&(Local_288[Local_93.f_2[iParam0 /*23*/].f_3 /*44*/].f_4.f_2), 25);
							}
						}
					}
					break;
				
				case 8:
					vehicle::_0xBE5C1255A1830FF5(network::net_to_veh(Local_93.f_2[iParam0 /*23*/]), 0);
					if (entity::is_entity_playing_anim(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), "ODDJOBS@TAXI@DRIVER", "leanover_enter", 3) || entity::is_entity_playing_anim(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), "ODDJOBS@TAXI@DRIVER", "leanover_idle", 3))
					{
						streaming::request_anim_dict("ODDJOBS@TAXI@DRIVER");
						if (streaming::has_anim_dict_loaded("ODDJOBS@TAXI@DRIVER"))
						{
							ai::task_clear_look_at(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1));
							ai::task_play_anim(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), "ODDJOBS@TAXI@DRIVER", "leanover_exit", 4f, -4f, -1, 0, 0f, 0, 0, 0);
						}
					}
					else if (entity::is_entity_playing_anim(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), "ODDJOBS@TAXI@DRIVER", "leanover_exit", 3))
					{
						entity::set_entity_anim_speed(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), "ODDJOBS@TAXI@DRIVER", "leanover_exit", 1.2f);
					}
					else if (!func_9(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), -1273030092, 1))
					{
						ai::task_vehicle_mission_coors_target(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), network::net_to_veh(Local_93.f_2[iParam0 /*23*/]), entity::get_entity_coords(network::net_to_veh(Local_93.f_2[iParam0 /*23*/]), 1), 8, 12f, 786599, 400f, -1f, 0);
					}
					break;
				
				case 9:
				case 10:
					func_7(iParam0, 0);
					if (entity::is_entity_playing_anim(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), "ODDJOBS@TAXI@DRIVER", "leanover_enter", 3))
					{
						entity::stop_entity_anim(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), "leanover_enter", "ODDJOBS@TAXI@DRIVER", -2f);
					}
					else if (entity::is_entity_playing_anim(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), "ODDJOBS@TAXI@DRIVER", "leanover_idle", 3))
					{
						entity::stop_entity_anim(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), "leanover_idle", "ODDJOBS@TAXI@DRIVER", -2f);
					}
					else if (entity::is_entity_playing_anim(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), "ODDJOBS@TAXI@DRIVER", "leanover_exit", 3))
					{
						entity::stop_entity_anim(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), "leanover_exit", "ODDJOBS@TAXI@DRIVER", -2f);
					}
					ped::set_ped_config_flag(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), 251, false);
					ped::set_blocking_of_non_temporary_events(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), false);
					vehicle::_0xBE5C1255A1830FF5(network::net_to_veh(Local_93.f_2[iParam0 /*23*/]), 0);
					if (((!ped::is_ped_fleeing(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1)) && !func_9(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), 1805844857, 1)) && !func_9(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), -251125078, 1)) && ai::get_active_vehicle_mission_type(network::net_to_veh(Local_93.f_2[iParam0 /*23*/])) != 8)
					{
						if (Local_93.f_2[iParam0 /*23*/].f_7 == 10)
						{
							iVar7 = true;
						}
						if (vehicle::get_ped_in_vehicle_seat(network::net_to_veh(Local_93.f_2[iParam0 /*23*/]), -1) != network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1))
						{
							iVar7 = true;
						}
						if (Local_93.f_2[iParam0 /*23*/].f_4 != -1)
						{
							if (network::network_is_participant_active(player::int_to_participantindex(Local_93.f_2[iParam0 /*23*/].f_4)))
							{
								iVar9 = player::get_player_ped(network::network_get_player_index(player::int_to_participantindex(Local_93.f_2[iParam0 /*23*/].f_4)));
							}
						}
						if (!entity::does_entity_exist(iVar9))
						{
							iVar9 = 0;
						}
						if (iVar7)
						{
							ped::set_ped_flee_attributes(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), 2, false);
							ped::set_ped_flee_attributes(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), 65536, true);
							if (entity::does_entity_exist(iVar9))
							{
								ai::task_smart_flee_ped(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), iVar9, 500f, -1, 0, 0);
							}
							else
							{
								ai::task_smart_flee_coord(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), vVar4, 500f, -1, 0, 0);
							}
						}
						else
						{
							ped::set_ped_flee_attributes(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), 65536, false);
							ped::set_ped_flee_attributes(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), 2, true);
							if (entity::does_entity_exist(iVar9))
							{
								ai::task_vehicle_mission_ped_target(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), network::net_to_veh(Local_93.f_2[iParam0 /*23*/]), iVar9, 8, 25f, 790564, 200f, 15f, 1);
							}
							else
							{
								ai::task_vehicle_mission_coors_target(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), network::net_to_veh(Local_93.f_2[iParam0 /*23*/]), vVar4, 8, 25f, 790564, 200f, 15f, 1);
							}
						}
					}
					ped::set_ped_keep_task(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), true);
					break;
				
				case 11:
					if (network::network_does_network_id_exist(Local_93.f_2[iParam0 /*23*/]))
					{
						vehicle::_0xBE5C1255A1830FF5(network::net_to_veh(Local_93.f_2[iParam0 /*23*/]), 0);
						func_26(&(Local_93.f_2[iParam0 /*23*/]));
					}
					if (network::network_does_network_id_exist(Local_93.f_2[iParam0 /*23*/].f_1))
					{
						ped::set_ped_config_flag(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), 251, false);
						ped::set_blocking_of_non_temporary_events(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), false);
						func_26(&(Local_93.f_2[iParam0 /*23*/].f_1));
					}
					return;
					break;
				}
		}
		if (func_10(player::player_id(), 1, 1))
		{
			fVar10 = gameplay::get_distance_between_coords(func_203(player::player_id()), entity::get_entity_coords(network::net_to_veh(Local_93.f_2[iParam0 /*23*/]), 1), 1);
			if (fVar10 < fLocal_2631)
			{
				fLocal_2631 = fVar10;
				iLocal_2630 = iParam0;
			}
		}
	}
	if (Local_93.f_2[iParam0 /*23*/].f_7 == 11)
	{
		if (network::network_does_network_id_exist(Local_93.f_2[iParam0 /*23*/]))
		{
			if (network::network_has_control_of_network_id(Local_93.f_2[iParam0 /*23*/]))
			{
				vehicle::_0xBE5C1255A1830FF5(network::net_to_veh(Local_93.f_2[iParam0 /*23*/]), 0);
				func_26(&(Local_93.f_2[iParam0 /*23*/]));
			}
		}
		if (network::network_does_network_id_exist(Local_93.f_2[iParam0 /*23*/].f_1))
		{
			if (network::network_has_control_of_network_id(Local_93.f_2[iParam0 /*23*/].f_1))
			{
				if (!func_15(Local_93.f_2[iParam0 /*23*/].f_1))
				{
					ped::set_ped_config_flag(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), 251, false);
					ped::set_blocking_of_non_temporary_events(network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1), false);
				}
				func_26(&(Local_93.f_2[iParam0 /*23*/].f_1));
			}
		}
	}
}

bool func_183(int iParam0, vector3 vParam1, var uParam4, var uParam5, var uParam6, int iParam7)//Position - 0x94BA
{
	float fVar0;
	float fVar1;
	vector3 vVar2;
	var uVar5;
	var uVar8;
	int iVar11;
	int iVar12;
	int iVar13;
	int iVar14;
	float fVar15;
	float fVar16;
	float fVar17;
	int iVar18;
	int iVar19;
	int iVar20;
	int iVar21;
	int iVar22;
	int iVar23;
	int iVar24;
	int iVar25;
	var uVar26;
	var uVar27;
	vector3 vVar28;
	float fVar31;
	
	fVar0 = 3f;
	fVar1 = 2.5f;
	iVar11 = 0;
	iVar19 = false;
	iVar20 = 1;
	if (!func_185(vParam1))
	{
		iVar20 = 9;
	}
	iVar21 = 1;
	iVar24 = *uParam6 + 2;
	iVar25 = 50;
	pathfind::_0x07FB139B592FA687((vParam1.x - IntToFloat(iParam7)), (vParam1.y - IntToFloat(iParam7)), (vParam1.x + IntToFloat(iParam7)), (vParam1.y + IntToFloat(iParam7)));
	if (pathfind::_0xF7B79A50B905A30D((vParam1.x - IntToFloat(iParam7)), (vParam1.y - IntToFloat(iParam7)), (vParam1.x + IntToFloat(iParam7)), (vParam1.y + IntToFloat(iParam7))))
	{
		while (!iVar19 && *uParam6 < iVar24)
		{
			if (vParam1.y == 1f)
			{
				fVar0 = 0f;
			}
			if (pathfind::get_nth_closest_vehicle_node_with_heading(vParam1, *uParam6, &vVar28, &fVar31, &iVar12, iVar20, fVar0, fVar1))
			{
				iVar18 = pathfind::get_nth_closest_vehicle_node_id(vVar28, 1, iVar20, 1077936128, 0);
				if (pathfind::is_vehicle_node_id_valid(iVar18))
				{
					if (pathfind::get_closest_road(vVar28, 1f, 1, &uVar8, &uVar5, &iVar14, &iVar13, &fVar16, iVar21))
					{
						if (fVar31 < 90f || fVar31 >= 270f)
						{
							iVar23 = true;
						}
						else
						{
							iVar23 = false;
						}
						iVar22 = false;
						if (iVar23)
						{
							if (iVar12 == iVar14)
							{
								iVar22 = true;
							}
						}
						else if (iVar12 == iVar13)
						{
							iVar22 = true;
						}
						if (fVar16 < 0f)
						{
							fVar15 = 0f;
						}
						else if (pathfind::_get_is_slow_road_flag(iVar18) || !pathfind::_get_supports_gps_route_flag(iVar18))
						{
							fVar15 = 0f;
						}
						else
						{
							if (iVar23)
							{
								if (iVar22)
								{
									fVar15 = (4.5f * (system::to_float(iVar14) * 0.5f));
								}
								else
								{
									fVar15 = (4.5f * system::to_float(iVar14));
								}
								if (iVar22)
								{
									if (iVar14 > 2)
									{
										fVar15 = (fVar15 + (IntToFloat((iVar14 - 2)) * 1f));
									}
								}
								else if (iVar14 > 1)
								{
									fVar15 = (fVar15 + (IntToFloat((iVar14 - 1)) * 1f));
								}
							}
							else
							{
								if (iVar22)
								{
									fVar15 = (4.5f * (system::to_float(iVar13) * 0.5f));
								}
								else
								{
									fVar15 = (4.5f * system::to_float(iVar13));
								}
								if (iVar22)
								{
									if (iVar13 > 2)
									{
										fVar15 = (fVar15 + (IntToFloat((iVar13 - 2)) * 1f));
									}
								}
								else if (iVar13 > 1)
								{
									fVar15 = (fVar15 + (IntToFloat((iVar13 - 1)) * 1f));
								}
							}
							if (pathfind::get_vehicle_node_properties(vVar28, &uVar27, &uVar26))
							{
								if (!uVar26 & 64 == 0)
								{
									fVar15 = (fVar15 + (0.9f * fVar16));
								}
								if (!uVar26 & 4 == 0)
								{
									fVar15 = (fVar15 + -0.7f);
								}
							}
						}
						fVar17 = (vParam1.y - vVar28.y);
						if (fVar17 < 0f)
						{
							fVar17 = (fVar17 * -1f);
						}
						if (func_184(vParam1, vVar28) || fVar17 < 0.5f)
						{
							vVar28 = { object::_get_object_offset_from_coords(vVar28, fVar31, fVar15, 0f, 0f) };
							if (vehicle::is_vehicle_driveable(*iParam0, 0))
							{
								iVar11 = *iParam0;
							}
							if (!gameplay::is_point_obscured_by_a_mission_entity(vVar28, 3f, 3f, 3f, iVar11))
							{
								if (func_196(vVar28, &vVar28, &fVar31, 1) || func_186(vVar28, &vVar28, &fVar31, 1))
								{
								}
								iVar19 = true;
							}
						}
					}
				}
			}
			*uParam6++;
			if (*uParam6 >= iVar25)
			{
				vVar28 = { vParam1 };
				iVar19 = true;
			}
		}
	}
	if (iVar19)
	{
		*uParam4 = { vVar28 };
		*uParam5 = fVar31;
		vVar2 = { vParam1 - *uParam4 };
		vVar2.z = 0f;
		fLocal_1730 = system::vmag(vVar2);
		if (fLocal_1730 != 0f)
		{
		}
		return true;
	}
	return false;
}

bool func_184(vector3 vParam0, vector3 vParam3)//Position - 0x97F9
{
	float fVar0;
	float fVar1;
	
	fVar1 = (vParam3.y - vParam0.y);
	if (fVar1 < 0f)
	{
		fVar1 = (fVar1 * -1f);
	}
	if (vParam0.y <= 1f)
	{
		func_83("\nIS_COORD_ON_SAME_LEVEL_AS_COORD - vCoord1.z <= 1, probably a waypoint blip - RETURN TRUE\n");
		return true;
	}
	fVar0 = system::vdist(vParam0, vParam3);
	fVar0 = (fVar0 / 1.75f);
	if (fVar1 < fVar0)
	{
		func_83("\nIS_COORD_ON_SAME_LEVEL_AS_COORD - fTemp < acceptableHeight, RETURN TRUE\n");
		return true;
	}
	return false;
}

bool func_185(vector3 vParam0)//Position - 0x985B
{
	char* sVar0;
	
	sVar0 = zone::get_name_of_zone(vParam0);
	if (((((((((((((((((((((((((((((((((((((((((((((gameplay::are_strings_equal("SanAnd", sVar0) || gameplay::are_strings_equal("Alamo", sVar0)) || gameplay::are_strings_equal("ArmyB", sVar0)) || gameplay::are_strings_equal("BhamCa", sVar0)) || gameplay::are_strings_equal("Baytre", sVar0)) || gameplay::are_strings_equal("BradT", sVar0)) || gameplay::are_strings_equal("BradP", sVar0)) || gameplay::are_strings_equal("CANNY", sVar0)) || gameplay::are_strings_equal("CCreak", sVar0)) || gameplay::are_strings_equal("ChamH", sVar0)) || gameplay::are_strings_equal("CHU", sVar0)) || gameplay::are_strings_equal("COSI", sVar0)) || gameplay::are_strings_equal("CMSW", sVar0)) || gameplay::are_strings_equal("Cypre", sVar0)) || gameplay::are_strings_equal("Desrt", sVar0)) || gameplay::are_strings_equal("ELGorl", sVar0)) || gameplay::are_strings_equal("Galli", sVar0)) || gameplay::are_strings_equal("Galfish", sVar0)) || gameplay::are_strings_equal("Harmo", sVar0)) || gameplay::are_strings_equal("HumLab", sVar0)) || gameplay::are_strings_equal("Jail", sVar0)) || gameplay::are_strings_equal("LAct", sVar0)) || gameplay::are_strings_equal("LDam", sVar0)) || gameplay::are_strings_equal("Lago", sVar0)) || gameplay::are_strings_equal("MTChil", sVar0)) || gameplay::are_strings_equal("MTJose", sVar0)) || gameplay::are_strings_equal("MTGordo", sVar0)) || gameplay::are_strings_equal("NCHU", sVar0)) || gameplay::are_strings_equal("Oceana", sVar0)) || gameplay::are_strings_equal("Palmpow", sVar0)) || gameplay::are_strings_equal("PBluff", sVar0)) || gameplay::are_strings_equal("Paleto", sVar0)) || gameplay::are_strings_equal("PalCov", sVar0)) || gameplay::are_strings_equal("PalFor", sVar0)) || gameplay::are_strings_equal("PalHigh", sVar0)) || gameplay::are_strings_equal("RTRAK", sVar0)) || gameplay::are_strings_equal("Rancho", sVar0)) || gameplay::are_strings_equal("SANDY", sVar0)) || gameplay::are_strings_equal("TongvaH", sVar0)) || gameplay::are_strings_equal("TongvaV", sVar0)) || gameplay::are_strings_equal("Zenora", sVar0)) || gameplay::are_strings_equal("Slab", sVar0)) || gameplay::are_strings_equal("WindF", sVar0)) || gameplay::are_strings_equal("Zancudo", sVar0)) || gameplay::are_strings_equal("SanChia", sVar0)) || gameplay::are_strings_equal("zQ_UAR", sVar0))
	{
		return true;
	}
	return false;
}

bool func_186(vector3 vParam0, var uParam3, float fParam4, int iParam5)//Position - 0x9B4F
{
	int iVar0;
	vector3 vVar1;
	vector3 vVar4[6];
	int iVar23;
	float fVar24;
	float fVar25;
	int iVar26;
	vector3 vVar27;
	float fVar30;
	float fVar31;
	vector3 vVar32;
	float fVar35;
	float fVar36;
	int iVar37;
	
	if (func_195(vParam0, 1900f, -6600f, 100f, 6900f, -3600f, 140f))
	{
		*uParam3 = { 1261.58f, -3332.685f, 5.4191f };
		*fParam4 = 163.87f;
		return true;
	}
	else if (func_195(vParam0, -3800f, 5400f, -100f, -1900f, 8500f, 100f))
	{
		*uParam3 = { -1577.16f, 5166.51f, 19.1864f };
		*fParam4 = 0f;
		return true;
	}
	else if (func_195(vParam0, -874.9833f, 125.7645f, -100f, -768.6254f, 193.0297f, 100f))
	{
		*uParam3 = { -856.6151f, 163.7361f, 65.093f };
		*fParam4 = 355.3355f;
		return true;
	}
	else if (func_195(vParam0, -39.2005f, -1473.55f, -100f, 10.6133f, -1430.099f, 100f))
	{
		*uParam3 = { -15.5181f, -1456.4f, 29.4244f };
		*fParam4 = 94.6893f;
		return true;
	}
	else if (func_195(vParam0, 1964.742f, 3792.59f, -100f, 1992.636f, 3840.253f, 100f))
	{
		*uParam3 = { 1996.372f, 3818.831f, 31.1612f };
		*fParam4 = 170.0221f;
		return true;
	}
	else if (object::is_point_in_angled_area(vParam0, -68.2187f, -1086.951f, -100f, -10.54518f, -1106.895f, 100f, 43.5f, 0, true))
	{
		*uParam3 = { -63.5854f, -1074.732f, 26.0995f };
		*fParam4 = 324.1257f;
		return true;
	}
	else if (object::is_point_in_angled_area(vParam0, 398.7899f, -1651.417f, -100f, 423.8372f, -1619.432f, 100f, 45f, 0, true))
	{
		*uParam3 = { 416.871f, -1613.081f, 28.1401f };
		*fParam4 = 227.9333f;
		return true;
	}
	else if (object::is_point_in_angled_area(vParam0, -988.8535f, -2553.177f, -100f, -1041.486f, -2644.97f, 100f, 49.75f, 0, true) && !network::network_is_game_in_progress())
	{
		*uParam3 = { -1039.542f, -2574.467f, 12.7566f };
		*fParam4 = 162.2744f;
		return true;
	}
	else if (object::is_point_in_angled_area(vParam0, -906.902f, -2600.461f, -100f, -959.7651f, -2692.057f, 100f, 49.75f, 0, true) && !network::network_is_game_in_progress())
	{
		*uParam3 = { -911.1597f, -2676.132f, 12.7567f };
		*fParam4 = 338.9414f;
		return true;
	}
	vVar1 = { vParam0 };
	if (vParam0.y == 1f)
	{
		vVar1.z = 28f;
	}
	if (object::is_point_in_angled_area(vVar1, -209.3372f, -2011.099f, 26.62037f, -257.2225f, -2076.963f, 36.62037f, 30f, 0, true))
	{
		*uParam3 = { -211.8546f, -2030.771f, 26.6204f };
		*fParam4 = 154.4302f;
		return true;
	}
	vVar1 = { vParam0 };
	if (vParam0.y == 1f)
	{
		vVar1.z = 159f;
	}
	if (object::is_point_in_angled_area(vVar1, -804.05f, 4216.412f, 204.4872f, -509.0679f, 4135.19f, 123.2502f, 250f, 0, true))
	{
		*uParam3 = { -623.3622f, 3996f, 120.7669f };
		*fParam4 = 37.8784f;
		return true;
	}
	vVar1 = { vParam0 };
	if (vParam0.y == 1f)
	{
		vVar1.z = 180f;
	}
	if (object::is_point_in_angled_area(vVar1, -2203.167f, 183.3549f, 167.4022f, -2311.587f, 434.3828f, 195.4669f, 138.5f, 0, true))
	{
		*uParam3 = { -2294.945f, 376.2506f, 173.4669f };
		*fParam4 = 296.6963f;
		return true;
	}
	vVar1 = { vParam0 };
	if (vParam0.y == 1f)
	{
		vVar1.z = 10f;
	}
	if (object::is_point_in_angled_area(vVar1, -2041.478f, -553.2159f, -0.089962f, -1787.08f, -768.0886f, 37.99918f, 220f, 0, true))
	{
		*uParam3 = { -1897.077f, -557.3334f, 10.7279f };
		*fParam4 = 228.7709f;
		if (object::is_point_in_angled_area(vVar1, -1882.883f, -541.7442f, 4.675224f, -1929.626f, -598.6026f, 40.4298f, 35f, 0, true))
		{
			return true;
		}
		else
		{
			vVar4[0 /*3*/] = { -1962.468f, -503.4229f, 10.8349f };
			vVar4[1 /*3*/] = { -1924.472f, -534.7357f, 10.8181f };
			vVar4[2 /*3*/] = { -1896.324f, -557.768f, 10.7256f };
			vVar4[3 /*3*/] = { -1850.661f, -595.8367f, 10.4649f };
			vVar4[4 /*3*/] = { -1809f, -632.1207f, 10.0016f };
			vVar4[5 /*3*/] = { -1745.043f, -694.4053f, 9.1245f };
			iVar23 = -1;
			fVar24 = 99999f;
			iVar26 = 0;
			while (iVar26 <= 5)
			{
				fVar25 = system::vdist(vVar4[iVar26 /*3*/], vVar1);
				if (fVar25 < fVar24)
				{
					fVar24 = fVar25;
					iVar23 = iVar26;
				}
				iVar26++;
			}
			*uParam3 = { vVar4[iVar23 /*3*/] };
			if (iVar23 == 0)
			{
				*fParam4 = 234.3999f;
			}
			else if (iVar23 == 1)
			{
				*fParam4 = 232.2255f;
			}
			else if (iVar23 == 2)
			{
				*fParam4 = 228.2855f;
			}
			else if (iVar23 == 3)
			{
				*fParam4 = 231.4914f;
			}
			else if (iVar23 == 4)
			{
				*fParam4 = 230.6703f;
			}
			else if (iVar23 == 5)
			{
				*fParam4 = 228.7709f;
			}
			return true;
		}
	}
	vVar1 = { vParam0 };
	if (vParam0.y == 1f)
	{
		vVar1.z = 330f;
	}
	if (object::is_point_in_angled_area(vVar1, -446.12f, 1057.452f, 318.6169f, -405.8336f, 1194.486f, 337.0966f, 106.25f, 0, true))
	{
		*uParam3 = { -411.3629f, 1174.587f, 324.6421f };
		*fParam4 = 255.2881f;
		return true;
	}
	vVar1 = { vParam0 };
	if (vParam0.y == 1f)
	{
		vVar1.z = 20f;
	}
	if (object::is_point_in_angled_area(vVar1, -1362.091f, -29.26777f, -100f, -1377.953f, 152.2389f, 100f, 50f, 0, true))
	{
		iVar0 = (iParam5 % 8);
		switch (iVar0)
		{
			case 1:
				*uParam3 = { -1380.101f, 95.1566f, 53.5054f };
				*fParam4 = 4.555f;
				break;
			
			case 2:
				*uParam3 = { -1379.139f, 84.2472f, 53.0592f };
				*fParam4 = 6.9278f;
				break;
			
			case 3:
				*uParam3 = { -1378.427f, 74.5077f, 52.6622f };
				*fParam4 = 2.6813f;
				break;
			
			case 4:
				*uParam3 = { -1384.177f, 73.9207f, 52.7438f };
				*fParam4 = 5.542f;
				break;
			
			case 5:
				*uParam3 = { -1381.118f, 35.7838f, 52.659f };
				*fParam4 = 7.6687f;
				break;
			
			case 6:
				*uParam3 = { -1383.741f, 64.1491f, 52.6647f };
				*fParam4 = 2.5572f;
				break;
			
			case 7:
				*uParam3 = { -1382.616f, 49.6876f, 52.6585f };
				*fParam4 = 3.0185f;
				break;
			
			default:
				*uParam3 = { -1383.299f, 54.4598f, 52.6562f };
				*fParam4 = 6.2155f;
				break;
		}
		return true;
	}
	else if (network::network_is_game_in_progress())
	{
		if (object::is_point_in_angled_area(vParam0, 48.31006f, -1120.669f, 28.0305f, -12.12345f, -1112.084f, 36.08567f, 60f, 0, true))
		{
			iVar0 = (iParam5 % 8);
			switch (iVar0)
			{
				case 1:
					*uParam3 = { 50.9889f, -1092.525f, 28.2152f };
					*fParam4 = 150.8833f;
					break;
				
				case 2:
					*uParam3 = { 46.7725f, -1099.751f, 28.1639f };
					*fParam4 = 149.4322f;
					break;
				
				case 3:
					*uParam3 = { 41.6146f, -1107.742f, 28.1318f };
					*fParam4 = 154.1378f;
					break;
				
				case 4:
					*uParam3 = { 38.1922f, -1113.394f, 28.1507f };
					*fParam4 = 146.3778f;
					break;
				
				case 5:
					*uParam3 = { 13.0436f, -1124.767f, 27.7359f };
					*fParam4 = 91.163f;
					break;
				
				case 6:
					*uParam3 = { 1.4336f, -1125.042f, 27.1705f };
					*fParam4 = 91.0578f;
					break;
				
				case 7:
					*uParam3 = { -11.1811f, -1125.811f, 26.3688f };
					*fParam4 = 91.866f;
					break;
				
				default:
					*uParam3 = { 21.9431f, -1124.573f, 27.9417f };
					*fParam4 = 91.6961f;
					break;
			}
			return true;
		}
		else if (object::is_point_in_angled_area(vParam0, -1061.018f, -2540.235f, 18.66932f, -1023.332f, -2562.115f, 31.57616f, 250f, 0, true))
		{
			iVar0 = (iParam5 % 8);
			switch (iVar0)
			{
				case 1:
					*uParam3 = { -1023.982f, -2489.882f, 19.0755f };
					*fParam4 = 148.7004f;
					break;
				
				case 2:
					*uParam3 = { -1029.968f, -2500.438f, 19.0803f };
					*fParam4 = 148.7144f;
					break;
				
				case 3:
					*uParam3 = { -1070.546f, -2570.859f, 19.0836f };
					*fParam4 = 150.0955f;
					break;
				
				case 4:
					*uParam3 = { -1056.065f, -2545.662f, 19.0809f };
					*fParam4 = 149.5649f;
					break;
				
				case 5:
					*uParam3 = { -1050.578f, -2536.219f, 19.0824f };
					*fParam4 = 150.7363f;
					break;
				
				case 6:
					*uParam3 = { -1036.032f, -2510.902f, 19.0794f };
					*fParam4 = 147.2113f;
					break;
				
				case 7:
					*uParam3 = { -1044.487f, -2525.534f, 19.079f };
					*fParam4 = 150.7597f;
					break;
				
				default:
					*uParam3 = { -1064.5f, -2560.653f, 19.0905f };
					*fParam4 = 150.7081f;
					break;
			}
			return true;
		}
		else if (object::is_point_in_angled_area(vParam0, -1061.059f, -2540.254f, 10.94467f, -1023.297f, -2562.052f, 18.51685f, 250f, 0, true))
		{
			iVar0 = (iParam5 % 8);
			switch (iVar0)
			{
				case 1:
					*uParam3 = { -1044.741f, -2528.786f, 12.7568f };
					*fParam4 = 150.9439f;
					break;
				
				case 2:
					*uParam3 = { -1050.763f, -2539.498f, 12.7566f };
					*fParam4 = 150.851f;
					break;
				
				case 3:
					*uParam3 = { -1054.952f, -2546.86f, 12.7566f };
					*fParam4 = 149.9285f;
					break;
				
				case 4:
					*uParam3 = { -1060.397f, -2556.898f, 12.6066f };
					*fParam4 = 150.8244f;
					break;
				
				case 5:
					*uParam3 = { -1020.744f, -2490.084f, 12.6396f };
					*fParam4 = 148.6134f;
					break;
				
				case 6:
					*uParam3 = { -1076.904f, -2589.179f, 12.6858f };
					*fParam4 = 149.0112f;
					break;
				
				case 7:
					*uParam3 = { -1026.387f, -2501.952f, 12.6923f };
					*fParam4 = 149.7553f;
					break;
				
				default:
					*uParam3 = { -1070.506f, -2578.389f, 12.6932f };
					*fParam4 = 148.5232f;
					break;
			}
			return true;
		}
		else if (object::is_point_in_angled_area(vParam0, -1043.364f, -2747.29f, 16.96057f, -991.5368f, -2657.682f, 69.12349f, 200f, 0, true))
		{
			iVar0 = (iParam5 % 8);
			switch (iVar0)
			{
				case 1:
					*uParam3 = { -1067.846f, -2708.94f, 19.0588f };
					*fParam4 = 230.9025f;
					break;
				
				case 2:
					*uParam3 = { -1058.224f, -2716.217f, 19.06f };
					*fParam4 = 237.1285f;
					break;
				
				case 3:
					*uParam3 = { -1004.567f, -2744.797f, 19.0811f };
					*fParam4 = 255.6885f;
					break;
				
				case 4:
					*uParam3 = { -1049.509f, -2721.58f, 19.0546f };
					*fParam4 = 242.3581f;
					break;
				
				case 5:
					*uParam3 = { -1017.154f, -2740.117f, 19.0525f };
					*fParam4 = 243.5798f;
					break;
				
				case 6:
					*uParam3 = { -1042.087f, -2726.077f, 19.0452f };
					*fParam4 = 240.2381f;
					break;
				
				case 7:
					*uParam3 = { -1027.353f, -2734.462f, 19.0509f };
					*fParam4 = 239.8703f;
					break;
				
				default:
					*uParam3 = { -1033.74f, -2730.746f, 19.0521f };
					*fParam4 = 239.9237f;
					break;
			}
			return true;
		}
		else if (object::is_point_in_angled_area(vParam0, -1047.646f, -2754.947f, 2.941969f, -991.7314f, -2653.153f, 16.89228f, 200f, 0, true))
		{
			iVar0 = (iParam5 % 8);
			switch (iVar0)
			{
				case 1:
					*uParam3 = { -971.9154f, -2749.122f, 12.6069f };
					*fParam4 = 265.8022f;
					break;
				
				case 2:
					*uParam3 = { -980.6166f, -2748.535f, 12.757f };
					*fParam4 = 263.5472f;
					break;
				
				case 3:
					*uParam3 = { -987.6072f, -2747.273f, 12.6069f };
					*fParam4 = 257.2886f;
					break;
				
				case 4:
					*uParam3 = { -1006.815f, -2739.345f, 12.6334f };
					*fParam4 = 242.1315f;
					break;
				
				case 5:
					*uParam3 = { -1051.83f, -2713.553f, 12.6333f };
					*fParam4 = 239.9312f;
					break;
				
				case 6:
					*uParam3 = { -1041.004f, -2719.647f, 12.6402f };
					*fParam4 = 240.1081f;
					break;
				
				case 7:
					*uParam3 = { -1023.832f, -2729.465f, 12.6445f };
					*fParam4 = 239.6737f;
					break;
				
				default:
					*uParam3 = { -1012.848f, -2735.172f, 12.6656f };
					*fParam4 = 237.6545f;
					break;
			}
			return true;
		}
	}
	vVar1 = { vParam0 };
	if (vParam0.y == 1f)
	{
		vVar1.z = 20f;
	}
	if (object::is_point_in_angled_area(vVar1, 845.7216f, -990.7473f, 37.4696f, 846.3397f, -1066.88f, 16.96623f, 90f, 0, true))
	{
		iVar0 = (iParam5 % 8);
		switch (iVar0)
		{
			case 1:
				*uParam3 = { 868.1039f, -995.9224f, 29.7369f };
				*fParam4 = 93.132f;
				break;
			
			case 2:
				*uParam3 = { 859.283f, -996.4102f, 28.7865f };
				*fParam4 = 92.2581f;
				break;
			
			case 3:
				*uParam3 = { 849.4288f, -997.1062f, 27.5347f };
				*fParam4 = 92.714f;
				break;
			
			case 4:
				*uParam3 = { 841.1268f, -997.4826f, 26.5744f };
				*fParam4 = 92.8628f;
				break;
			
			case 5:
				*uParam3 = { 831.2605f, -1009.556f, 25.599f };
				*fParam4 = 268.6186f;
				break;
			
			case 6:
				*uParam3 = { 844.6506f, -1010.09f, 26.9894f };
				*fParam4 = 270.076f;
				break;
			
			case 7:
				*uParam3 = { 852.2498f, -1010.132f, 27.8091f };
				*fParam4 = 269.722f;
				break;
			
			default:
				*uParam3 = { 861.4028f, -1010.025f, 28.808f };
				*fParam4 = 270.7686f;
				break;
		}
		return true;
	}
	vVar1 = { vParam0 };
	if (vParam0.y == 1f)
	{
		vVar1.z = 20f;
	}
	if (object::is_point_in_angled_area(vVar1, 767.3736f, -1077.429f, -10.78654f, 682.8284f, -1080.686f, 79.67303f, 60f, 0, true))
	{
		iVar0 = (iParam5 % 8);
		switch (iVar0)
		{
			case 1:
				*uParam3 = { 703.2726f, -1067.7f, 21.4765f };
				*fParam4 = 181.3629f;
				break;
			
			case 2:
				*uParam3 = { 715.2089f, -1070.399f, 21.2708f };
				*fParam4 = 175.4362f;
				break;
			
			case 3:
				*uParam3 = { 715.2911f, -1059.42f, 21.0876f };
				*fParam4 = 181.0347f;
				break;
			
			case 4:
				*uParam3 = { 709.6841f, -1086.78f, 21.419f };
				*fParam4 = 233.169f;
				break;
			
			case 5:
				*uParam3 = { 703.807f, -1057.866f, 21.4152f };
				*fParam4 = 170.1609f;
				break;
			
			case 6:
				*uParam3 = { 708.1994f, -1048.194f, 21.216f };
				*fParam4 = 134.2729f;
				break;
			
			case 7:
				*uParam3 = { 711.1124f, -1069.423f, 21.3129f };
				*fParam4 = 177.9198f;
				break;
			
			default:
				*uParam3 = { 703.545f, -1078.718f, 21.3987f };
				*fParam4 = 180.5686f;
				break;
		}
		return true;
	}
	vVar1 = { vParam0 };
	if (vParam0.y == 1f)
	{
		vVar1.z = 31f;
	}
	if (func_192(3, vVar1))
	{
		if (func_191(vVar1, 3, 0, 0))
		{
			*uParam3 = { -1520.121f, 2731.511f, 16.6437f };
			*fParam4 = 48.1572f;
			return true;
		}
	}
	vVar1 = { vParam0 };
	if (vParam0.y == 1f)
	{
		vVar1.z = 77.2f;
	}
	if (object::is_point_in_angled_area(vVar1, 1535.987f, -2041.497f, 68.21275f, 1529.357f, -2204.463f, 96.11195f, 105f, 0, true))
	{
		*uParam3 = { 1540.75f, -2051.49f, 76.85f };
		*fParam4 = 255.41f;
		return true;
	}
	vVar1 = { vParam0 };
	if (vParam0.y == 1f)
	{
		vVar1.z = 51.1739f;
	}
	if (object::is_point_in_angled_area(vVar1, 1185.81f, -1768.367f, 28.31145f, 1369.068f, -1701.452f, 66.25389f, 70f, 1, true))
	{
		if (func_190(vVar1, 1283.326f, -1731.522f, 51.78555f, 17f))
		{
			*uParam3 = { 1283.326f, -1731.522f, 51.78555f };
			*fParam4 = 275.4274f;
			return true;
		}
		if (func_190(vVar1, 1334.386f, -1709.762f, 55.70131f, 41f))
		{
			*uParam3 = { 1334.386f, -1709.762f, 55.70131f };
			*fParam4 = 275.4411f;
			return true;
		}
		if (func_190(vVar1, 1246.166f, -1750.625f, 45.35691f, 28f))
		{
			*uParam3 = { 1246.166f, -1750.625f, 45.35691f };
			*fParam4 = 301.2981f;
			return true;
		}
		if (func_190(vVar1, 1196.272f, -1753.051f, 37.63976f, 32f))
		{
			*uParam3 = { 1196.272f, -1753.051f, 37.63976f };
			*fParam4 = 209.4354f;
			return true;
		}
		*uParam3 = { 1283.326f, -1731.522f, 51.78555f };
		*fParam4 = 275.4274f;
		return true;
	}
	vVar1 = { vParam0 };
	if (vParam0.y == 1f)
	{
		vVar1.z = 25f;
	}
	if (func_190(vVar1, -1693.302f, -1109.13f, 17.89778f, 240f))
	{
		if ((object::is_point_in_angled_area(vVar1, -1538.981f, -941.1323f, 10.56623f, -1715.57f, -1139.766f, 52.20361f, 110f, 0, true) || object::is_point_in_angled_area(vVar1, -1739.989f, -1115.973f, 10.08726f, -1800.515f, -1187.18f, 52.0172f, 25f, 0, true)) || object::is_point_in_angled_area(vVar1, -1801.766f, -1180.252f, 4.017236f, -1857.718f, -1244.628f, 38.49653f, 85f, 0, true))
		{
			*uParam3 = { -1624.445f, -976.9755f, 12.0175f };
			*fParam4 = 141.167f;
			return true;
		}
	}
	vVar1 = { vParam0 };
	if (vParam0.y == 1f)
	{
		vVar1.z = 10f;
	}
	if (object::is_point_in_angled_area(vVar1, -1140.89f, -1573.135f, -6.566939f, -1067.084f, -1675.976f, 23.53153f, 52f, 0, true))
	{
		*uParam3 = { -1095.63f, -1577.24f, 3.82f };
		*fParam4 = 216.12f;
		return true;
	}
	vVar1 = { vParam0 };
	if (vParam0.y == 1f)
	{
		vVar1.z = 114f;
	}
	if (object::is_point_in_angled_area(vVar1, 1324.172f, 1110.748f, 99.65493f, 1523.097f, 1110.473f, 132.8859f, 170f, 0, true))
	{
		iVar0 = 3;
		switch (gameplay::get_random_int_in_range(0, iVar0))
		{
			case 0:
				*uParam3 = { 1369.246f, 1147.653f, 112.7592f };
				*fParam4 = 182.0998f;
				break;
			
			case 1:
				*uParam3 = { 1360.848f, 1139.121f, 112.7592f };
				*fParam4 = 83.3356f;
				break;
			
			case 2:
				*uParam3 = { 1364.751f, 1154.367f, 112.7592f };
				*fParam4 = 223.2795f;
				break;
		}
		return true;
	}
	vVar1 = { vParam0 };
	if (vParam0.y == 1f)
	{
		vVar1.z = 40f;
	}
	if (object::is_point_in_angled_area(vVar1, 1737.39f, 3287.795f, 35.13897f, 1724.345f, 3337.854f, 57.20038f, 40f, 0, true))
	{
		*uParam3 = { 1782.19f, 3300.076f, 40.4593f };
		*fParam4 = 142.426f;
		return true;
	}
	vVar1 = { vParam0 };
	if (vParam0.y == 1f)
	{
		vVar1.z = 7f;
	}
	if (object::is_point_in_angled_area(vVar1, -695.7981f, -1379.678f, 24.48124f, -777.3731f, -1491.13f, -3.594945f, 72f, 0, true))
	{
		*uParam3 = { -658.2056f, -1388.789f, 9.499f };
		*fParam4 = 174.6945f;
		return true;
	}
	vVar1 = { vParam0 };
	if (vParam0.y == 1f)
	{
		vVar1.z = 325f;
	}
	if (system::vdist2(vVar1, -75.59782f, -818.6082f, 325.1745f) < (58f * 58f))
	{
		*uParam3 = { -142.367f, -895.0251f, 28.191f };
		*fParam4 = 71.6555f;
		return true;
	}
	if (!func_188())
	{
		vVar1 = { vParam0 };
		if (vParam0.y == 1f)
		{
			vVar1.z = 36.1141f;
		}
		if (func_192(7, vVar1))
		{
			if (func_191(vVar1, 7, 0, 0))
			{
				*uParam3 = { -1012.31f, -465.1634f, 36.1141f };
				*fParam4 = 112.1485f;
				return true;
			}
		}
	}
	vVar1 = { vParam0 };
	if (vParam0.y == 1f)
	{
		vVar1.z = 12.7091f;
	}
	if (func_192(2, vVar1))
	{
		if (func_191(vVar1, 2, 0, 0))
		{
			iVar0 = 4;
			if (!network::network_is_game_in_progress())
			{
				switch (gameplay::get_random_int_in_range(0, iVar0))
				{
					case 0:
						*uParam3 = { -979.95f, -2746.109f, 12.7091f };
						*fParam4 = 91.4929f;
						break;
					
					case 1:
						*uParam3 = { -1025.193f, -2728.218f, 12.6647f };
						*fParam4 = 239.0041f;
						break;
					
					case 2:
						*uParam3 = { -1051.315f, -2713.069f, 12.6676f };
						*fParam4 = 236.4666f;
						break;
					
					case 3:
						*uParam3 = { -1095.742f, -2637.871f, 12.6461f };
						*fParam4 = 188.9897f;
						break;
				}
			}
			else
			{
				iVar0 = (iParam5 % 8);
				switch (iVar0)
				{
					case 1:
						*uParam3 = { -1023.982f, -2489.882f, 19.0755f };
						*fParam4 = 148.7004f;
						break;
					
					case 2:
						*uParam3 = { -1029.968f, -2500.438f, 19.0803f };
						*fParam4 = 148.7144f;
						break;
					
					case 3:
						*uParam3 = { -1070.546f, -2570.859f, 19.0836f };
						*fParam4 = 150.0955f;
						break;
					
					case 4:
						*uParam3 = { -1056.065f, -2545.662f, 19.0809f };
						*fParam4 = 149.5649f;
						break;
					
					case 5:
						*uParam3 = { -1050.578f, -2536.219f, 19.0824f };
						*fParam4 = 150.7363f;
						break;
					
					case 6:
						*uParam3 = { -1036.032f, -2510.902f, 19.0794f };
						*fParam4 = 147.2113f;
						break;
					
					case 7:
						*uParam3 = { -1044.487f, -2525.534f, 19.079f };
						*fParam4 = 150.7597f;
						break;
					
					default:
						*uParam3 = { -1064.5f, -2560.653f, 19.0905f };
						*fParam4 = 150.7081f;
						break;
					}
			}
			return true;
		}
	}
	vVar27 = { -509.5746f, 4938.918f, 146.3271f };
	fVar30 = 232.0109f;
	fVar31 = func_187(vParam0, vVar27);
	vVar32 = { 2450.604f, 5129.224f, 45.9722f };
	fVar35 = 241.1957f;
	fVar36 = func_187(vParam0, vVar32);
	vVar1 = { vParam0 };
	iVar37 = false;
	if (vParam0.y == 1f)
	{
		vVar1.z = 400f;
	}
	if (object::is_point_in_angled_area(vVar1, -148.8777f, 4862.204f, 305.6442f, 454.6274f, 5573.104f, 804.097f, 250f, 0, true))
	{
		iVar37 = true;
	}
	if (vParam0.y == 1f)
	{
		vVar1.z = 200f;
	}
	if (object::is_point_in_angled_area(vVar1, -482.8931f, 4990.255f, 155.1601f, 7.830751f, 5009.371f, 430.7604f, 250f, 0, true))
	{
		iVar37 = true;
	}
	if (iVar37)
	{
		*uParam3 = { vVar27 };
		*fParam4 = fVar30;
		if (fVar36 < fVar31)
		{
			*uParam3 = { vVar32 };
			*fParam4 = fVar35;
		}
		return true;
	}
	iVar37 = false;
	if (vParam0.y == 1f)
	{
		vVar1.z = 700f;
	}
	if (object::is_point_in_angled_area(vVar1, 441.3999f, 5579.99f, 802.5138f, 965.7776f, 5675.921f, 601.2646f, 250f, 0, true))
	{
		iVar37 = true;
	}
	if (vParam0.y == 1f)
	{
		vVar1.z = 300f;
	}
	if (object::is_point_in_angled_area(vVar1, 954.1139f, 5641.051f, 646.5054f, 2140.375f, 5377.753f, 149.1221f, 250f, 0, true))
	{
		iVar37 = true;
	}
	if (vParam0.y == 1f)
	{
		vVar1.z = 100f;
	}
	if (object::is_point_in_angled_area(vVar1, 2117.348f, 5377.259f, 173.3297f, 2439.934f, 5297.445f, 62.68662f, 100f, 0, true))
	{
		iVar37 = true;
	}
	if (vParam0.y == 1f)
	{
		vVar1.z = 65f;
	}
	if (object::is_point_in_angled_area(vVar1, 2393.347f, 5321.58f, 107.0624f, 2523.946f, 5124.746f, 41.68384f, 70f, 0, true))
	{
		iVar37 = true;
	}
	if (iVar37)
	{
		*uParam3 = { vVar32 };
		*fParam4 = fVar35;
		if (fVar31 < fVar36)
		{
			*uParam3 = { vVar27 };
			*fParam4 = fVar30;
		}
		return true;
	}
	if (vParam0.y == 1f)
	{
		vVar1.z = 6f;
	}
	if (func_12(vVar1, -99.68751f, -2448.891f, 5.01731f, 230f))
	{
		if ((((object::is_point_in_angled_area(vVar1, 85.05448f, -2511.884f, -2.996267f, -57.59977f, -2412.716f, 15.00095f, 75f, 0, true) || object::is_point_in_angled_area(vVar1, 7.516524f, -2546.741f, 1.331557f, -177.3268f, -2417.047f, 19.16044f, 80f, 0, true)) || object::is_point_in_angled_area(vVar1, -260.0354f, -2419.978f, 1.399635f, -27.26375f, -2423.848f, 25.00064f, 80f, 0, true)) || object::is_point_in_angled_area(vVar1, -187.4256f, -2516.086f, -6.849975f, -186.7518f, -2438.149f, 25.0016f, 40f, 0, true)) || object::is_point_in_angled_area(vVar1, -73.60813f, -2538.564f, -6.989857f, -183.2556f, -2465.145f, 25.0203f, 70f, 0, true))
		{
			iVar0 = 2;
			if (gameplay::get_random_int_in_range(0, iVar0) == 0)
			{
				*uParam3 = { 29.5582f, -2553.587f, 5.0004f };
				*fParam4 = 253.9545f;
			}
			else
			{
				*uParam3 = { -189.6824f, -2531.649f, 5.0031f };
				*fParam4 = 0.0408f;
			}
			return true;
		}
	}
	if (vParam0.y == 1f)
	{
		vVar1.z = 28.4f;
	}
	if (object::is_point_in_angled_area(vVar1, 412.279f, 6481.868f, 25.80821f, 468.9353f, 6442.752f, 45.60727f, 24f, 0, true))
	{
		*uParam3 = { 445.231f, 6476.948f, 28.4862f };
		*fParam4 = 219.4788f;
		return true;
	}
	if (vParam0.y == 1f)
	{
		vVar1.z = 28.2065f;
	}
	if (object::is_point_in_angled_area(vVar1, 476.5394f, -1301.548f, 44.82458f, 499.5822f, -1339.025f, 26.31703f, 35f, 0, true))
	{
		*uParam3 = { 498.185f, -1288.535f, 28.1923f };
		*fParam4 = 181.3208f;
		return true;
	}
	if (vParam0.y == 1f)
	{
		vVar1.z = 28.2065f;
	}
	if (object::is_point_in_angled_area(vVar1, 496.9816f, -1412.255f, 43.29391f, 497.269f, -1339.364f, 26.31648f, 40f, 0, true))
	{
		*uParam3 = { 504.1738f, -1421.251f, 28.2065f };
		*fParam4 = 83.2905f;
		return true;
	}
	if (vParam0.y == 1f)
	{
		vVar1.z = 73f;
	}
	if (object::is_point_in_angled_area(vVar1, 951.1704f, -147.0047f, 71.54326f, 1005.245f, -98.44745f, 95.62679f, 70f, 0, true))
	{
		*uParam3 = { 961.3104f, -150.1964f, 73.4016f };
		*fParam4 = 58.9938f;
		return true;
	}
	if (vParam0.y == 1f)
	{
		vVar1.z = 52f;
	}
	if (object::is_point_in_angled_area(vVar1, 1137.022f, 89.06853f, 74.89022f, 1267.821f, 292.0106f, 102.9904f, 195f, 0, true))
	{
		*uParam3 = { 1118.751f, 262.0209f, 79.8555f };
		*fParam4 = 52.3086f;
		return true;
	}
	else if (object::is_point_in_angled_area(vVar1, 1137.022f, 89.06853f, 71.89022f, 1010.046f, -91.56699f, 103.4568f, 180f, 0, true))
	{
		*uParam3 = { 1134.053f, 53.1835f, 79.7553f };
		*fParam4 = 145.5134f;
		return true;
	}
	if (vParam0.y == 1f)
	{
		vVar1.z = 30.6f;
	}
	if (object::is_point_in_angled_area(vVar1, 191.8731f, -723.553f, 40.23576f, 79.58656f, -687.6684f, 29.54734f, 85f, 0, true))
	{
		iVar0 = 2;
		if (gameplay::get_random_int_in_range(0, iVar0) == 0)
		{
			*uParam3 = { 182.6361f, -753.5836f, 31.8051f };
			*fParam4 = 162.0019f;
		}
		else
		{
			*uParam3 = { 81.5318f, -675.4875f, 30.5695f };
			*fParam4 = 341.8541f;
		}
		return true;
	}
	if (vParam0.y == 1f)
	{
		vVar1.z = 33.5f;
	}
	if (object::is_point_in_angled_area(vVar1, -40f, -687.7f, 36.6f, -72.7f, -682f, 29.6f, 15f, 0, true) || object::is_point_in_angled_area(vVar1, -45.3f, -687.8f, 29.3f, 5.9f, -688.7f, 36.8f, 55f, 0, true))
	{
		*uParam3 = { -88.4f, -660.9f, 35f };
		*fParam4 = -20f;
		return true;
	}
	else if (object::is_point_in_angled_area(vVar1, 8.1f, -685.5f, 31.2f, 26.3f, -665.7f, 35.2f, 10f, 0, true))
	{
		*uParam3 = { 61.4f, -653.2f, 32f };
		*fParam4 = 160f;
		return true;
	}
	if (object::is_point_in_angled_area(vParam0, 496.2593f, -3116.586f, 13.6414f, 471.4366f, -3116.258f, 5.7109f, 10f, 0, true))
	{
		*uParam3 = { 484.0132f, -3033.162f, 5.0717f };
		*fParam4 = 140.7302f;
		return true;
	}
	return false;
}

float func_187(struct<2> Param0, var uParam2, struct<2> Param3, var uParam5)//Position - 0xBC70
{
	return system::vdist2(Param0, Param0.f_1, 0f, Param3, Param3.f_1, 0f);
}

bool func_188()//Position - 0xBC8A
{
	int iVar0;
	
	iVar0 = func_123();
	if (iVar0 == 0)
	{
		if (func_189(65))
		{
			return true;
		}
		if (script::_get_number_of_instances_of_streamed_script(joaat("ambient_solomon")) > 0)
		{
			return true;
		}
	}
	else if (iVar0 == 1)
	{
		if (func_189(66))
		{
			return true;
		}
	}
	else if (iVar0 == 2)
	{
		if (func_189(65))
		{
			return true;
		}
	}
	return false;
}

int func_189(int iParam0)//Position - 0xBCE9
{
	if (iParam0 == 146 || iParam0 == -1)
	{
		return 0;
	}
	return Global_101154.f_7775.f_99.f_58[iParam0];
}

int func_190(vector3 vParam0, vector3 vParam3, float fParam6)//Position - 0xBD16
{
	vector3 vVar0;
	
	vVar0 = { vParam3 - vParam0 };
	return ((vVar0.x * vVar0.x) + (vVar0.y * vVar0.y)) <= (fParam6 * fParam6);
}

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

int func_192(int iParam0, vector3 vParam1)//Position - 0xCA95
{
	return system::vdist2(vParam1, func_194(iParam0)) < func_193(iParam0);
}

float func_193(int iParam0)//Position - 0xCAB2
{
	switch (iParam0)
	{
		case 1:
			return 1000000f;
			break;
		
		case 2:
			return 1000000f;
			break;
		
		case 3:
			return 1500000f;
			break;
		
		case 4:
			return 500000f;
			break;
		
		case 5:
			return 500000f;
			break;
		
		case 6:
			return 500000f;
			break;
		
		case 7:
			return 500000f;
			break;
		
		case 8:
			return 500000f;
			break;
	}
	return 0f;
}

Vector3 func_194(int iParam0)//Position - 0xCB4A
{
	switch (iParam0)
	{
		case 1:
			return -1155.877f, 48.3426f, 52.4985f;
			break;
		
		case 2:
			return -1245.12f, -2818.38f, 12.94f;
			break;
		
		case 3:
			return -2176.19f, 3092.07f, 31.81f;
			break;
		
		case 4:
			return 1701.666f, 2586.261f, 51.4925f;
			break;
		
		case 5:
			return 3525.058f, 3711.323f, 35.6423f;
			break;
		
		case 6:
			return 548.1421f, -3157.961f, 5.0696f;
			break;
		
		case 7:
			return -1142.411f, -526.4487f, 31.6878f;
			break;
		
		case 8:
			return 456.8879f, -985.2783f, 35.6895f;
			break;
	}
	return 0f, 0f, 0f;
}

bool func_195(vector3 vParam0, vector3 vParam3, vector3 vParam6)//Position - 0xCC34
{
	if (((((vParam0.x > vParam3.x && vParam0.x < vParam6.x) && vParam0.y > vParam3.y) && vParam0.y < vParam6.y) && vParam0.y > vParam3.y) && vParam0.y < vParam6.y)
	{
		return true;
	}
	return false;
}

bool func_196(vector3 vParam0, var uParam3, float fParam4, int iParam5)//Position - 0xCC8B
{
	vector3 vVar0;
	
	vVar0 = { vParam0 };
	if (vParam0.y == 1f)
	{
		vVar0.z = 28f;
	}
	if (object::is_point_in_angled_area(vVar0, 400.9871f, -1659.756f, 26.91615f, 437.6566f, -1617.479f, 48.34185f, 45f, 0, true))
	{
		if (iParam5 < 4)
		{
			*uParam3 = { 413.7399f, -1608.911f, 28.161f };
			*fParam4 = 238.2568f;
		}
		else
		{
			*uParam3 = { 416.8107f, -1666.514f, 28.1758f };
			*fParam4 = 144.8478f;
		}
		return true;
	}
	if (object::is_point_in_angled_area(vVar0, -1112.586f, -2674.767f, 12.56804f, -1215.468f, -2854.589f, 19.44588f, 41.25f, 0, true))
	{
		if (iParam5 < 4)
		{
			*uParam3 = { -1094.492f, -2662.27f, 12.6066f };
			*fParam4 = 196.0365f;
		}
		else
		{
			*uParam3 = { -1076.736f, -2684.039f, 12.807f };
			*fParam4 = 211.7278f;
		}
		return true;
	}
	return false;
}

bool func_197(vector3 vParam0, vector3 vParam3, var uParam6, var uParam7, var uParam8)//Position - 0xCD94
{
	vector3 vVar0;
	vector3 vVar3;
	vector3 vVar6;
	int iVar9;
	int iVar10;
	vector3 vVar11;
	vector3 vVar14;
	vector3 vVar17;
	float fVar20;
	
	iVar10 = 1;
	if (!func_185(vParam3))
	{
		iVar10 = 9;
	}
	iVar9 = pathfind::get_nth_closest_vehicle_node_id(vParam3, 1, iVar10, 1077936128, 0);
	if (pathfind::is_vehicle_node_id_valid(iVar9))
	{
		pathfind::get_vehicle_node_position(iVar9, &vVar0);
		if (pathfind::_0x16F46FB18C8009E4(vVar0, 0, &vVar3) && pathfind::_0x16F46FB18C8009E4(vVar0, 1, &vVar6))
		{
			vVar11 = { vVar3 - vVar0 };
			vVar14 = { -vVar11.y, vVar11.x, 0f };
			vVar17 = { vParam0 - vParam3 };
			fVar20 = func_199(vVar14, vVar17);
			if (fVar20 < 0f)
			{
				*uParam7 = { vVar3 };
				*uParam8 = uParam6;
				return true;
			}
			else
			{
				*uParam7 = { vVar6 };
				*uParam8 = (*uParam8 + 180f);
				*uParam8 = func_198(*uParam8, 0f, 360f);
				return true;
			}
		}
		else if (pathfind::_0x16F46FB18C8009E4(vVar0, -1, &vVar3))
		{
			*uParam7 = { vVar3 };
			*uParam8 = uParam6;
			return true;
		}
	}
	return false;
}

float func_198(float fParam0, float fParam1, float fParam2)//Position - 0xCE91
{
	float fVar0;
	
	if (fParam1 == fParam2)
	{
		return fParam1;
	}
	fVar0 = (fParam2 - fParam1);
	fParam0 = (fParam0 - (IntToFloat(system::round(((fParam0 - fParam1) / fVar0))) * fVar0));
	if (fParam0 < fParam1)
	{
		fParam0 = (fParam0 + fVar0);
	}
	return fParam0;
}

float func_199(vector3 vParam0, vector3 vParam3)//Position - 0xCED3
{
	return (((vParam0.x * vParam3.x) + (vParam0.y * vParam3.y)) + (vParam0.y * vParam3.y));
}

bool func_200(int iParam0, vector3 vParam1, var uParam4, float fParam5, var uParam6, int iParam7)//Position - 0xCEF4
{
	float fVar0;
	float fVar1;
	float fVar2;
	int iVar3;
	var uVar4;
	int iVar5;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	
	fVar0 = 3f;
	fVar1 = 2.5f;
	iVar3 = 0;
	iVar6 = *uParam6 + 2;
	iVar7 = 50;
	iVar8 = false;
	iVar9 = 1;
	if (!func_185(vParam1))
	{
		iVar9 = 9;
	}
	func_202(vParam1, vParam1, &(Local_93.f_2[iParam0 /*23*/].f_12), &(Local_93.f_2[iParam0 /*23*/].f_15), iParam7);
	if (func_201(Local_93.f_2[iParam0 /*23*/].f_12, Local_93.f_2[iParam0 /*23*/].f_15))
	{
		if (!func_196(vParam1, uParam4, fParam5, 1) && !func_186(vParam1, uParam4, fParam5, 1))
		{
			while (!iVar8 && *uParam6 < iVar6)
			{
				if (vParam1.y == 1f)
				{
					fVar0 = 0f;
				}
				if (pathfind::get_nth_closest_vehicle_node_with_heading(vParam1, *uParam6, uParam4, fParam5, &uVar4, iVar9, fVar0, fVar1))
				{
					iVar5 = pathfind::get_nth_closest_vehicle_node_id(*uParam4, 1, iVar9, 1077936128, 0);
					if (pathfind::is_vehicle_node_id_valid(iVar5))
					{
						fVar2 = (vParam1.y - uParam4->f_2);
						if (fVar2 < 0f)
						{
							fVar2 = (fVar2 * -1f);
						}
						if (func_184(vParam1, *uParam4) || fVar2 < 0.5f)
						{
							if (vehicle::is_vehicle_driveable(network::net_to_veh(Local_93.f_2[iParam0 /*23*/]), 0))
							{
								iVar3 = network::net_to_veh(Local_93.f_2[iParam0 /*23*/]);
							}
							if (!gameplay::is_point_obscured_by_a_mission_entity(*uParam4, 3f, 3f, 3f, iVar3))
							{
								iVar8 = true;
							}
						}
					}
				}
				*uParam6++;
				if (*uParam6 >= iVar7)
				{
					iVar8 = true;
				}
			}
		}
		else
		{
			iVar8 = true;
		}
		if (iVar8)
		{
			return true;
		}
	}
	return false;
}

bool func_201(struct<2> Param0, var uParam2, struct<2> Param3, var uParam5)//Position - 0xD082
{
	if (pathfind::_0xF7B79A50B905A30D(Param0, Param0.f_1, Param3, Param3.f_1))
	{
		return true;
	}
	return false;
}

void func_202(struct<2> Param0, var uParam2, struct<2> Param3, var uParam5, var uParam6, var uParam7, int iParam8)//Position - 0xD0A2
{
	vector3 vVar0;
	vector3 vVar3;
	
	if (Param3 <= Param0)
	{
		vVar0.x = Param3;
		vVar3.x = Param0;
	}
	else
	{
		vVar0.x = Param0;
		vVar3.x = Param3;
	}
	if (Param3.f_1 <= Param0.f_1)
	{
		vVar0.y = Param3.f_1;
		vVar3.y = Param0.f_1;
	}
	else
	{
		vVar0.y = Param0.f_1;
		vVar3.y = Param3.f_1;
	}
	vVar0 = { vVar0 - Vector(IntToFloat(iParam8), IntToFloat(iParam8), IntToFloat(iParam8)) };
	vVar3 = { vVar3 + Vector(IntToFloat(iParam8), IntToFloat(iParam8), IntToFloat(iParam8)) };
	if (!func_94(vVar0, *uParam6, 1056964608, 0) || !func_94(vVar0, *uParam6, 1056964608, 0))
	{
		*uParam6 = { vVar0 };
		*uParam7 = { vVar3 };
	}
	pathfind::_0x07FB139B592FA687(*uParam6, uParam6->f_1, *uParam7, uParam7->f_1);
}

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

void func_204(int iParam0)//Position - 0xD180
{
	if (Local_93.f_2[iParam0 /*23*/].f_22 != 0 && !gameplay::is_bit_set(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2, 6))
	{
		func_115(Local_93.f_2[iParam0 /*23*/].f_22, iParam0);
		gameplay::set_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2), 6);
	}
}

bool func_205(int iParam0)//Position - 0xD1D1
{
	int iVar0;
	int iVar1;
	int iVar2;
	vector3 vVar3;
	float fVar6;
	vector3 vVar7;
	vector3 vVar10;
	
	iVar0 = network::net_to_ped(Local_93.f_2[iParam0 /*23*/].f_1);
	iVar1 = network::net_to_veh(Local_93.f_2[iParam0 /*23*/]);
	vVar3 = { entity::get_entity_coords(network::net_to_veh(Local_93.f_2[iParam0 /*23*/]), 0) };
	if (ped::is_ped_fleeing(iVar0))
	{
		return true;
	}
	if (ped::is_ped_in_combat(iVar0, 0))
	{
		return true;
	}
	if (((vehicle::is_vehicle_stuck_timer_up(iVar1, 2, 30000) || vehicle::is_vehicle_stuck_timer_up(iVar1, 3, 30000)) || vehicle::is_vehicle_stuck_timer_up(iVar1, 0, 7000)) || vehicle::is_vehicle_stuck_timer_up(iVar1, 1, 7000))
	{
		return true;
	}
	else if (gameplay::is_bullet_in_area(vVar3, 7f, 0))
	{
		if (gameplay::is_bullet_in_area(vVar3, 7f, 1))
		{
			func_206(network::participant_id_to_int(), 1, 37);
		}
		return true;
	}
	else
	{
		fVar6 = 15f;
		vVar7 = { vVar3 };
		vVar10 = { vVar7 };
		vVar7.x = (vVar7.x - fVar6);
		vVar7.y = (vVar7.y - fVar6);
		vVar7.z = (vVar7.y - fVar6);
		vVar10.x = (vVar10.x + fVar6);
		vVar10.y = (vVar10.y + fVar6);
		vVar10.z = (vVar10.y + fVar6);
		if (gameplay::is_projectile_in_area(vVar7, vVar10, 0))
		{
			if (gameplay::is_projectile_in_area(vVar7, vVar10, 1))
			{
				func_206(network::participant_id_to_int(), 1, 37);
			}
			return true;
		}
	}
	if (network::network_is_participant_active(network::participant_id()))
	{
		iVar2 = player::get_player_ped(network::network_get_player_index(network::participant_id()));
		if (!ped::is_ped_injured(iVar2))
		{
			if (entity::does_entity_exist(iVar1))
			{
				if (entity::has_entity_been_damaged_by_entity(iVar1, iVar2, 1))
				{
					func_206(network::participant_id_to_int(), 1, 37);
					return true;
				}
			}
			if (entity::does_entity_exist(iVar0))
			{
				if (entity::has_entity_been_damaged_by_entity(iVar0, iVar2, 1))
				{
					func_206(network::participant_id_to_int(), 1, 37);
					return true;
				}
			}
		}
	}
	if (Local_93.f_2[iParam0 /*23*/].f_3 == -1 && Local_93.f_2[iParam0 /*23*/].f_7 == 3)
	{
	}
	return false;
}

void func_206(int iParam0, int iParam1, int iParam2)//Position - 0xD3A3
{
	if (iParam0 != -1 && network::network_is_participant_active(player::int_to_participantindex(iParam0)))
	{
		if (func_10(network::network_get_player_index(player::int_to_participantindex(iParam0)), 1, 1))
		{
			player::report_crime(network::network_get_player_index(player::int_to_participantindex(iParam0)), iParam2, player::get_wanted_level_threshold(iParam1));
		}
	}
}

void func_207()//Position - 0xD3ED
{
	if (gameplay::is_bit_set(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2, 19))
	{
		if (gameplay::is_bit_set(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2, 16) && !gameplay::is_bit_set(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2, 17))
		{
			if (!func_50(0))
			{
				gameplay::set_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2), 17);
				func_37(1, 0, 0);
				gameplay::set_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2), 18);
			}
		}
		if (gameplay::is_bit_set(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2, 15) && !gameplay::is_bit_set(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2, 16))
		{
			if (func_50(0))
			{
				gameplay::set_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2), 16);
			}
		}
		if (!gameplay::is_bit_set(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2, 15))
		{
			func_20(&uLocal_2633, 7, 0, "TaxiDispatch", 0, 1);
			if (func_208(&uLocal_2633, 131, "MPTXIAU", "MPTXI_E1", 0, 0))
			{
				gameplay::set_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2), 15);
			}
		}
	}
}

int func_208(var uParam0, int iParam1, char* sParam2, char* sParam3, int iParam4, int iParam5)//Position - 0xD509
{
	char* sVar0;
	int iVar1;
	int iVar2;
	
	if (func_285())
	{
		return 0;
	}
	if (func_284())
	{
		return 0;
	}
	sVar0 = 0;
	iVar1 = false;
	iVar2 = -99;
	return func_209(uParam0, iParam1, sParam2, sParam3, 1, iParam5, iParam4, sVar0, iVar1, iVar2, sVar0, sVar0, -1);
}

int func_209(var uParam0, int iParam1, char* sParam2, char* sParam3, int iParam4, int iParam5, int iParam6, char* sParam7, int iParam8, int iParam9, char* sParam10, char* sParam11, int iParam12)//Position - 0xD54E
{
	int iVar0;
	int iVar1;
	int iVar2;
	
	if (gameplay::is_string_null_or_empty(sParam2))
	{
		return 0;
	}
	if (ui::_0x43E4111189E54F0E(sParam2) > 7)
	{
		return 0;
	}
	if (gameplay::is_string_null_or_empty(sParam3))
	{
		return 0;
	}
	if (ui::_0x43E4111189E54F0E(sParam3) > 15)
	{
		return 0;
	}
	iVar0 = gameplay::get_hash_key(script::get_this_script_name());
	iVar1 = func_283(sParam2, sParam3);
	iVar2 = 0;
	if (!gameplay::is_string_null_or_empty(sParam7))
	{
		iVar2 = gameplay::get_hash_key(sParam7);
	}
	if (func_282(iVar0, iVar1, iVar2))
	{
		return 1;
	}
	if (!func_277(iParam6))
	{
		return 0;
	}
	if (func_274(iVar0, iVar1, iVar2))
	{
		if (func_273())
		{
			return 0;
		}
		func_272();
		return func_216(uParam0, iParam1, iParam12, sParam2, sParam3, iParam4, iParam5, iParam6, sParam7, iParam8, iParam9, sParam10, sParam11);
	}
	if (!func_215(iParam4))
	{
		return 0;
	}
	func_210(iVar0, iVar1, iVar2, sParam3, iParam4, iParam5, iParam6);
	return 0;
}

void func_210(int iParam0, int iParam1, int iParam2, char* sParam3, int iParam4, int iParam5, int iParam6)//Position - 0xD633
{
	Global_1332285.f_40.f_1 = iParam0;
	Global_1332285.f_40.f_2 = iParam1;
	Global_1332285.f_40.f_3 = iParam2;
	StringCopy(&(Global_1332285.f_40.f_4), sParam3, 16);
	Global_1332285.f_40.f_8 = iParam4;
	Global_1332285.f_40.f_9 = iParam5;
	Global_1332285.f_40.f_14 = iParam6;
	func_211(iParam4);
	func_272();
	Global_1332285.f_40.f_13 = network::get_time_offset(network::get_network_time(), 7000);
}

void func_211(int iParam0)//Position - 0xD6A0
{
	if (func_214(iParam0))
	{
		func_213();
		return;
	}
	func_212();
}

void func_212()//Position - 0xD6BC
{
	Global_1332285.f_40.f_10 = 0;
}

void func_213()//Position - 0xD6CD
{
	Global_1332285.f_40.f_10 = 1;
}

bool func_214(int iParam0)//Position - 0xD6DE
{
	switch (iParam0)
	{
		case 4:
		case 5:
			return true;
		
		case 0:
		case 1:
		case 7:
		case 8:
		case 2:
		case 3:
			return false;
		
		default:
	}
	return false;
}

int func_215(int iParam0)//Position - 0xD726
{
	return iParam0 > Global_1332285.f_40.f_8;
}

int func_216(var uParam0, int iParam1, var uParam2, char* sParam3, char* sParam4, int iParam5, int iParam6, int iParam7, char* sParam8, int iParam9, int iParam10, char* sParam11, char* sParam12)//Position - 0xD739
{
	struct<2> Var0;
	
	func_271();
	if (iParam6 == 5)
	{
		iParam6 = 0;
	}
	if (iParam5 == 8)
	{
		return func_268(uParam0, sParam3, sParam4);
	}
	if (iParam5 == 4)
	{
		StringCopy(&Var0, "CELL_226", 16);
		return func_265(uParam0, iParam1, sParam3, sParam4, &Var0);
	}
	if (iParam5 == 1 || iParam5 == 7)
	{
		if (iParam6 == 2)
		{
			return func_268(uParam0, sParam3, sParam4);
		}
		return func_257(uParam0, iParam1, sParam3, sParam4, iParam7);
	}
	if (iParam5 == 5)
	{
		return func_256(iParam1, uParam2, sParam4, iParam7, sParam8, iParam9, iParam10, sParam11, sParam12);
	}
	if (iParam5 == 2)
	{
		return func_246(iParam1, uParam2, sParam4, iParam7, sParam8, iParam9, iParam10, sParam11, sParam12);
	}
	if (iParam5 == 3)
	{
		return func_245(iParam1, uParam2, sParam4, iParam7, sParam8, iParam9, iParam10, sParam11, sParam12);
	}
	if (iParam5 == 6)
	{
		return func_217(iParam1, uParam2, sParam4, iParam7, sParam8, iParam9, iParam10, sParam11, sParam12);
	}
	return 0;
}

bool func_217(int iParam0, var uParam1, char* sParam2, int iParam3, char* sParam4, int iParam5, int iParam6, char* sParam7, char* sParam8)//Position - 0xD833
{
	int iVar0;
	
	func_244();
	iVar0 = true;
	if (func_219(iParam0, uParam1, sParam2, iVar0, iParam3, sParam4, iParam5, iParam6, sParam7, sParam8))
	{
		func_218(120000);
		return true;
	}
	return false;
}

void func_218(int iParam0)//Position - 0xD86A
{
	Global_1332285.f_40.f_11 = network::get_time_offset(network::get_network_time(), iParam0);
	Global_1332285.f_40.f_12 = 1;
}

bool func_219(int iParam0, var uParam1, char* sParam2, int iParam3, int iParam4, char* sParam5, int iParam6, int iParam7, char* sParam8, char* sParam9)//Position - 0xD88D
{
	int iVar0;
	int iVar1;
	char* sVar2;
	int iVar3;
	char* sVar4;
	var uVar5;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	int iVar10;
	int iVar11;
	int iVar12;
	
	iVar0 = func_243();
	iVar1 = 0;
	if (iParam0 == 145)
	{
		iVar0 = uParam1;
		sVar2 = player::get_player_name(iVar0);
		iVar1 = func_237(iVar0);
		if (iVar1 == 0)
		{
			if (network::is_time_less_than(network::get_network_time(), Global_1332285.f_40.f_13))
			{
				return false;
			}
		}
	}
	else
	{
		sVar2 = "";
	}
	iVar3 = 0;
	sVar4 = func_236(sParam5, iParam6, &iVar3);
	uVar5 = func_234(iParam7, &iVar3);
	iVar6 = 0;
	if (!gameplay::is_string_null_or_empty(sParam8))
	{
		iVar6++;
		if (!gameplay::is_string_null_or_empty(sParam9))
		{
			iVar6++;
		}
	}
	if (gameplay::are_strings_equal(sVar4, " "))
	{
		sVar4 = "";
	}
	iVar7 = true;
	iVar8 = 0;
	iVar9 = 0;
	iVar10 = 1;
	iVar11 = 0;
	if (iParam3)
	{
		iVar9 = 1;
		iVar10 = 2;
		iVar11 = 1;
		if (gameplay::is_bit_set(iParam4, 1))
		{
			iVar8 = 1;
		}
	}
	if (gameplay::is_bit_set(iParam4, 2))
	{
		iVar10 = 2;
	}
	iVar12 = false;
	if (!iVar3 == 0 || !gameplay::is_string_null_or_empty(sVar2))
	{
		iVar12 = func_233(iParam0, sParam2, iVar10, sVar4, uVar5, sVar2, iVar3, iVar11, 1, iVar9, 0, iVar7, iVar8, 0, iVar6, sParam8, sParam9);
	}
	else
	{
		iVar12 = func_223(iParam0, sParam2, iVar10, iVar11, 1, iVar9, 0, iVar7, iVar8, 0);
	}
	if (!iVar12)
	{
		return false;
	}
	if (gameplay::is_bit_set(iParam4, 0))
	{
		func_222();
	}
	func_244();
	func_221();
	func_220();
	return true;
}

void func_220()//Position - 0xD9DF
{
	Global_1332285.f_57 = 0;
	Global_1332285.f_57.f_1 = 0;
}

void func_221()//Position - 0xD9F7
{
	Global_1332285.f_40 = 3;
}

void func_222()//Position - 0xDA06
{
	gameplay::set_bit(&Global_2283, 8);
}

bool func_223(int iParam0, char* sParam1, int iParam2, int iParam3, int iParam4, int iParam5, int iParam6, int iParam7, int iParam8, int iParam9)//Position - 0xDA17
{
	int iVar0;
	char* sVar1;
	int iVar2;
	char* sVar3;
	int iVar4;
	char* sVar5;
	char* sVar6;
	int iVar7;
	
	iVar0 = 0;
	sVar1 = "NULL";
	iVar2 = -99;
	sVar3 = "NULL";
	iVar4 = 0;
	sVar5 = "NULL";
	sVar6 = "NULL";
	iVar7 = 3;
	if (func_224(iParam0, sParam1, iParam2, iVar0, sVar1, sVar3, iVar2, iParam3, iParam4, iParam5, iParam7, iParam8, iParam9, iVar4, sVar5, sVar6, iVar7) == 1)
	{
		if (iParam7 == 1)
		{
			Global_2990 = iParam6;
			gameplay::set_bit(&Global_2563397, 0);
		}
		return true;
	}
	return false;
}

bool func_224(var uParam0, char* sParam1, int iParam2, int iParam3, char* sParam4, char* sParam5, int iParam6, int iParam7, var uParam8, var uParam9, int iParam10, var uParam11, var uParam12, int iParam13, char* sParam14, char* sParam15, int iParam16)//Position - 0xDA83
{
	int iVar0;
	
	if (iParam13 > 99)
	{
	}
	if (gameplay::are_strings_equal(sParam14, sParam15))
	{
	}
	func_122();
	iVar0 = 0;
	switch (iParam16)
	{
		case 0:
			if (Global_14413 == 0)
			{
				iVar0 = 0;
			}
			else
			{
				iVar0 = 1;
			}
			break;
		
		case 2:
			if (Global_14413 == 2)
			{
				iVar0 = 0;
			}
			else
			{
				iVar0 = 1;
			}
			break;
		
		case 1:
			if (Global_14413 == 1)
			{
				iVar0 = 0;
			}
			else
			{
				iVar0 = 1;
			}
			break;
		
		default:
			iVar0 = 0;
			break;
	}
	if (iVar0 == 0)
	{
		if (player::is_player_playing(player::player_id()))
		{
			if (ped::is_ped_swimming_under_water(player::player_ped_id()))
			{
				return false;
			}
		}
		if (Global_2563382 == 1)
		{
			return false;
		}
		if (script::_get_number_of_instances_of_streamed_script(joaat("appemail")) > 0)
		{
			return false;
		}
		if (script::_get_number_of_instances_of_streamed_script(joaat("appmpemail")) > 0)
		{
			return false;
		}
	}
	if (func_232() == 0)
	{
		func_230();
		return false;
	}
	func_229(Global_2563381);
	StringCopy(&(Global_2562132[Global_2563381 /*104*/]), sParam1, 64);
	Global_2562132[Global_2563381 /*104*/].f_17 = uParam0;
	if (iParam2 == 0)
	{
	}
	else
	{
		Global_2562132[Global_2563381 /*104*/].f_24 = iParam2;
	}
	Global_2562132[Global_2563381 /*104*/].f_25 = iParam7;
	Global_2562132[Global_2563381 /*104*/].f_26 = uParam8;
	Global_2562132[Global_2563381 /*104*/].f_29 = uParam9;
	Global_2562132[Global_2563381 /*104*/].f_30 = uParam12;
	Global_2562132[Global_2563381 /*104*/].f_31 = uParam11;
	Global_2562132[Global_2563381 /*104*/].f_28 = 0;
	Global_2562132[Global_2563381 /*104*/].f_32 = iParam3;
	StringCopy(&(Global_2562132[Global_2563381 /*104*/].f_33), sParam4, 64);
	Global_2562132[Global_2563381 /*104*/].f_49 = iParam6;
	StringCopy(&(Global_2562132[Global_2563381 /*104*/].f_50), sParam5, 64);
	Global_2562132[Global_2563381 /*104*/].f_66 = iParam13;
	StringCopy(&(Global_2562132[Global_2563381 /*104*/].f_67), sParam14, 64);
	StringCopy(&(Global_2562132[Global_2563381 /*104*/].f_83), sParam15, 64);
	func_122();
	switch (iParam16)
	{
		case 3:
			Global_2562132[Global_2563381 /*104*/].f_99[Global_14413] = 1;
			break;
		
		case 0:
			Global_2562132[Global_2563381 /*104*/].f_99[0] = 1;
			break;
		
		case 2:
			Global_2562132[Global_2563381 /*104*/].f_99[2] = 1;
			break;
		
		case 1:
			Global_2562132[Global_2563381 /*104*/].f_99[1] = 1;
			break;
	}
	if (iParam16 == 3)
	{
		switch (Global_14413)
		{
			case 0:
				func_228(0);
				break;
			
			case 1:
				func_228(1);
				break;
			
			case 2:
				func_228(2);
				break;
			
			case 3:
				func_228(3);
				break;
			
			default:
				break;
			}
	}
	if (iParam7 == 1)
	{
		switch (iParam16)
		{
			case 3:
				Global_2563382 = 1;
				break;
			
			case 0:
				Global_2563382 = 1;
				break;
			
			case 2:
				Global_2563382 = 1;
				break;
			
			case 1:
				Global_2563382 = 1;
				break;
			}
	}
	Global_16781[Global_2563381] = 0;
	if (iParam10)
	{
		func_122();
		if (Global_14356)
		{
			StringCopy(&Global_14402, "Phone_SoundSet_Prologue", 24);
		}
		else
		{
			switch (Global_14413)
			{
				case 0:
					StringCopy(&Global_14402, "Phone_SoundSet_Michael", 24);
					break;
				
				case 2:
					StringCopy(&Global_14402, "Phone_SoundSet_Trevor", 24);
					break;
				
				case 1:
					StringCopy(&Global_14402, "Phone_SoundSet_Franklin", 24);
					break;
				
				default:
					StringCopy(&Global_14402, "Phone_SoundSet_Default", 24);
					break;
				}
		}
		if (!Global_3088[Global_14413 /*2811*/][0 /*281*/].f_259 == 1)
		{
			if (!func_75())
			{
				audio::play_sound_frontend(-1, "Text_Arrive_Tone", &Global_14402, 1);
			}
		}
	}
	if (!Global_14572)
	{
		if (Global_14413.f_1 == 6)
		{
			func_227(Global_14394, "SET_DATA_SLOT_EMPTY", 1f, -1082130432, -1082130432, -1082130432, -1082130432);
			func_225(1);
			func_227(Global_14394, "DISPLAY_VIEW", 1f, system::to_float(Global_14393), -1082130432, -1082130432, -1082130432);
		}
	}
	return true;
}

void func_225(int iParam0)//Position - 0xDE46
{
	int iVar0;
	int iVar1;
	int iVar2;
	int iVar3;
	int iVar4;
	int iVar5;
	int iVar6;
	int iVar7;
	int iVar8;
	
	Global_16780 = 0;
	Global_2888 = iParam0;
	iVar0 = 0;
	while (iVar0 < 9)
	{
		Global_2852[iVar0] = 0;
		iVar0++;
	}
	iVar0 = 0;
	while (iVar0 < 9)
	{
		iVar1 = 0;
		if (func_128(14))
		{
			while (iVar1 < 34)
			{
				if (iParam0 == Global_2290[iVar1 /*15*/].f_11)
				{
					if (iVar0 == Global_2290[iVar1 /*15*/].f_4)
					{
						if (Global_2852[iVar0] == 0)
						{
							Global_2816[iVar0] = iVar1;
							if (iVar1 == 3)
							{
								if (gameplay::is_bit_set(Global_2284, 3))
								{
									iVar2 = 42;
									Global_14575 = 1;
								}
								else
								{
									iVar2 = 255;
									Global_14575 = 0;
								}
								graphics::_push_scaleform_movie_function(Global_14394, "SET_DATA_SLOT");
								graphics::_push_scaleform_movie_function_parameter_int(1);
								graphics::_push_scaleform_movie_function_parameter_int(iVar0);
								graphics::_push_scaleform_movie_function_parameter_int(Global_2290[iVar1 /*15*/].f_10);
								graphics::_push_scaleform_movie_function_parameter_int(0);
								func_59(&(Global_2290[iVar1 /*15*/]));
								graphics::_push_scaleform_movie_function_parameter_int(iVar2);
								graphics::_pop_scaleform_movie_function_void();
							}
							if (Global_2443081)
							{
								if (iVar1 == 14)
								{
									func_226(Global_14394, "SET_DATA_SLOT", system::to_float(1), system::to_float(iVar0), system::to_float(Global_2290[iVar1 /*15*/].f_10), system::to_float(Global_16775), -1f, &(Global_2290[iVar1 /*15*/]), 0, 0, 0, 0);
								}
							}
							Global_2852[iVar0] = 1;
						}
					}
				}
				iVar1++;
			}
		}
		else
		{
			while (iVar1 < 34)
			{
				if (iParam0 == Global_2290[iVar1 /*15*/].f_11)
				{
					if (iVar0 == Global_2290[iVar1 /*15*/].f_4)
					{
						if (Global_2852[iVar0] == 0)
						{
							Global_2816[iVar0] = iVar1;
							if (iVar1 == 1)
							{
								iVar3 = 0;
								while (iVar3 < 35)
								{
									if (Global_101154.f_12831[iVar3 /*104*/].f_24 != 0)
									{
										if (Global_101154.f_12831[iVar3 /*104*/].f_28 == 0)
										{
											if (Global_101154.f_12831[iVar3 /*104*/].f_99[Global_14413] == 1)
											{
												Global_16780++;
											}
										}
									}
									iVar3++;
								}
								func_226(Global_14394, "SET_DATA_SLOT", system::to_float(1), system::to_float(iVar0), system::to_float(Global_2290[iVar1 /*15*/].f_10), system::to_float(Global_16780), -1f, &(Global_2290[iVar1 /*15*/]), 0, 0, 0, 0);
							}
							else if (iVar1 == 7)
							{
								if (Global_69489)
								{
									iVar4 = 0;
									iVar4 = Global_2562131;
									func_226(Global_14394, "SET_DATA_SLOT", system::to_float(1), system::to_float(iVar0), system::to_float(Global_2290[iVar1 /*15*/].f_10), system::to_float(iVar4), -1f, &(Global_2290[iVar1 /*15*/]), 0, 0, 0, 0);
								}
								else
								{
									switch (Global_14413)
									{
										case 0:
											iVar5 = Global_36844;
											break;
										
										case 1:
											iVar5 = Global_36845;
											break;
										
										case 2:
											iVar5 = Global_36846;
											break;
										
										default:
											break;
									}
									func_226(Global_14394, "SET_DATA_SLOT", system::to_float(1), system::to_float(iVar0), system::to_float(Global_2290[iVar1 /*15*/].f_10), system::to_float(iVar5), -1f, &(Global_2290[iVar1 /*15*/]), 0, 0, 0, 0);
								}
							}
							else if (iVar1 == 14)
							{
								func_226(Global_14394, "SET_DATA_SLOT", system::to_float(1), system::to_float(iVar0), system::to_float(Global_2290[iVar1 /*15*/].f_10), system::to_float(Global_16775), -1f, &(Global_2290[iVar1 /*15*/]), 0, 0, 0, 0);
							}
							else if (iVar1 == 20)
							{
								graphics::_push_scaleform_movie_function(Global_14394, "SET_DATA_SLOT");
								graphics::_push_scaleform_movie_function_parameter_int(1);
								graphics::_push_scaleform_movie_function_parameter_int(iVar0);
								graphics::_push_scaleform_movie_function_parameter_int(Global_2290[iVar1 /*15*/].f_10);
								graphics::_push_scaleform_movie_function_parameter_int(0);
								func_59(&(Global_2290[iVar1 /*15*/]));
								graphics::_push_scaleform_movie_function_parameter_int(Global_2289);
								graphics::_pop_scaleform_movie_function_void();
							}
							else if (iVar1 == 2)
							{
								if (gameplay::is_bit_set(Global_2284, 6))
								{
									iVar6 = 42;
								}
								else
								{
									iVar6 = 255;
								}
								graphics::_push_scaleform_movie_function(Global_14394, "SET_DATA_SLOT");
								graphics::_push_scaleform_movie_function_parameter_int(1);
								graphics::_push_scaleform_movie_function_parameter_int(iVar0);
								graphics::_push_scaleform_movie_function_parameter_int(Global_2290[iVar1 /*15*/].f_10);
								graphics::_push_scaleform_movie_function_parameter_int(0);
								func_59(&(Global_2290[iVar1 /*15*/]));
								graphics::_push_scaleform_movie_function_parameter_int(iVar6);
								graphics::_pop_scaleform_movie_function_void();
							}
							else if (iVar1 == 3)
							{
								if (gameplay::is_bit_set(Global_2284, 3))
								{
									iVar7 = 42;
									Global_14575 = 1;
								}
								else
								{
									iVar7 = 255;
									Global_14575 = 0;
								}
								graphics::_push_scaleform_movie_function(Global_14394, "SET_DATA_SLOT");
								graphics::_push_scaleform_movie_function_parameter_int(1);
								graphics::_push_scaleform_movie_function_parameter_int(iVar0);
								graphics::_push_scaleform_movie_function_parameter_int(Global_2290[iVar1 /*15*/].f_10);
								graphics::_push_scaleform_movie_function_parameter_int(0);
								func_59(&(Global_2290[iVar1 /*15*/]));
								graphics::_push_scaleform_movie_function_parameter_int(iVar7);
								graphics::_pop_scaleform_movie_function_void();
							}
							else if (iVar1 == 8)
							{
								graphics::_push_scaleform_movie_function(Global_14394, "SET_DATA_SLOT");
								graphics::_push_scaleform_movie_function_parameter_int(1);
								graphics::_push_scaleform_movie_function_parameter_int(iVar0);
								graphics::_push_scaleform_movie_function_parameter_int(Global_2290[iVar1 /*15*/].f_10);
								graphics::_push_scaleform_movie_function_parameter_int(0);
								func_59(&(Global_2290[iVar1 /*15*/]));
								graphics::_push_scaleform_movie_function_parameter_int(42);
								graphics::_pop_scaleform_movie_function_void();
							}
							else if ((iVar1 == 23 && gameplay::are_strings_equal(&(Global_2290[iVar1 /*15*/]), "CELL_BENWEB")) && gameplay::is_bit_set(Global_2284, 6))
							{
								graphics::_push_scaleform_movie_function(Global_14394, "SET_DATA_SLOT");
								graphics::_push_scaleform_movie_function_parameter_int(1);
								graphics::_push_scaleform_movie_function_parameter_int(iVar0);
								graphics::_push_scaleform_movie_function_parameter_int(Global_2290[iVar1 /*15*/].f_10);
								graphics::_push_scaleform_movie_function_parameter_int(0);
								func_59(&(Global_2290[iVar1 /*15*/]));
								graphics::_push_scaleform_movie_function_parameter_int(42);
								graphics::_pop_scaleform_movie_function_void();
							}
							else if (Global_2290[iVar1 /*15*/].f_10 == 57 && iVar1 == 23)
							{
								iVar8 = 0;
								iVar8 = Global_1609099.f_1;
								func_226(Global_14394, "SET_DATA_SLOT", system::to_float(1), system::to_float(iVar0), system::to_float(Global_2290[iVar1 /*15*/].f_10), system::to_float(iVar8), -1f, &(Global_2290[iVar1 /*15*/]), 0, 0, 0, 0);
							}
							else
							{
								func_226(Global_14394, "SET_DATA_SLOT", system::to_float(1), system::to_float(iVar0), system::to_float(Global_2290[iVar1 /*15*/].f_10), system::to_float(0), -1f, &(Global_2290[iVar1 /*15*/]), 0, 0, 0, 0);
							}
							Global_2852[iVar0] = 1;
						}
					}
				}
				iVar1++;
			}
		}
		iVar0++;
	}
}

void func_226(int iParam0, char* sParam1, float fParam2, float fParam3, float fParam4, float fParam5, float fParam6, char* sParam7, char* sParam8, char* sParam9, char* sParam10, char* sParam11)//Position - 0xE397
{
	graphics::_push_scaleform_movie_function(iParam0, sParam1);
	graphics::_push_scaleform_movie_function_parameter_int(system::round(fParam2));
	if (fParam3 != -1f)
	{
		graphics::_push_scaleform_movie_function_parameter_int(system::round(fParam3));
	}
	if (fParam4 != -1f)
	{
		graphics::_push_scaleform_movie_function_parameter_int(system::round(fParam4));
	}
	if (fParam5 != -1f)
	{
		graphics::_push_scaleform_movie_function_parameter_int(system::round(fParam5));
	}
	if (fParam6 != -1f)
	{
		graphics::_push_scaleform_movie_function_parameter_int(system::round(fParam6));
	}
	if (!gameplay::is_string_null_or_empty(sParam7))
	{
		func_59(sParam7);
	}
	if (!gameplay::is_string_null_or_empty(sParam8))
	{
		func_59(sParam8);
	}
	if (!gameplay::is_string_null_or_empty(sParam9))
	{
		func_59(sParam9);
	}
	if (!gameplay::is_string_null_or_empty(sParam10))
	{
		func_59(sParam10);
	}
	if (!gameplay::is_string_null_or_empty(sParam11))
	{
		func_59(sParam11);
	}
	graphics::_pop_scaleform_movie_function_void();
}

void func_227(int iParam0, char* sParam1, float fParam2, float fParam3, float fParam4, float fParam5, float fParam6)//Position - 0xE44A
{
	graphics::_push_scaleform_movie_function(iParam0, sParam1);
	graphics::_push_scaleform_movie_function_parameter_int(system::round(fParam2));
	if (fParam3 != -1f)
	{
		graphics::_push_scaleform_movie_function_parameter_int(system::round(fParam3));
	}
	if (fParam4 != -1f)
	{
		graphics::_push_scaleform_movie_function_parameter_int(system::round(fParam4));
	}
	if (fParam5 != -1f)
	{
		graphics::_push_scaleform_movie_function_parameter_int(system::round(fParam5));
	}
	if (fParam6 != -1f)
	{
		graphics::_push_scaleform_movie_function_parameter_int(system::round(fParam6));
	}
	graphics::_pop_scaleform_movie_function_void();
}

void func_228(int iParam0)//Position - 0xE4AD
{
	var uVar0;
	var uVar1;
	
	uVar0 = Global_101154.f_12741[iParam0 /*20*/].f_8;
	uVar0 = uVar0;
	uVar1 = uVar1;
}

void func_229(var uParam0)//Position - 0xE4CC
{
	int iVar0;
	int iVar1;
	int iVar2;
	int iVar3;
	var uVar4;
	int iVar5;
	
	iVar0 = time::get_clock_seconds();
	iVar1 = time::get_clock_minutes();
	iVar2 = time::get_clock_hours();
	iVar3 = time::get_clock_day_of_month();
	uVar4 = time::get_clock_month() + 1;
	iVar5 = time::get_clock_year();
	Global_2562132[uParam0 /*104*/].f_18 = iVar0;
	Global_2562132[uParam0 /*104*/].f_18.f_1 = iVar1;
	Global_2562132[uParam0 /*104*/].f_18.f_2 = iVar2;
	Global_2562132[uParam0 /*104*/].f_18.f_3 = iVar3;
	Global_2562132[uParam0 /*104*/].f_18.f_4 = uVar4;
	Global_2562132[uParam0 /*104*/].f_18.f_5 = iVar5;
}

void func_230()//Position - 0xE54C
{
	int iVar0;
	int iVar1;
	int iVar2;
	
	iVar0 = 0;
	iVar1 = 10;
	iVar2 = iVar0;
	Global_2563381 = 11;
	Global_2562132[Global_2563381 /*104*/].f_18 = -1;
	Global_2562132[Global_2563381 /*104*/].f_18.f_1 = 0;
	Global_2562132[Global_2563381 /*104*/].f_18.f_2 = 0;
	Global_2562132[Global_2563381 /*104*/].f_18.f_3 = 0;
	Global_2562132[Global_2563381 /*104*/].f_18.f_5 = 99999;
	while (iVar2 < iVar1)
	{
		if (!func_231(Global_2562132[iVar2 /*104*/].f_18, Global_2562132[Global_2563381 /*104*/].f_18))
		{
			Global_2563381 = iVar2;
		}
		iVar2++;
	}
	Global_2562132[Global_2563381 /*104*/].f_24 = 1;
}

bool func_231(struct<6> Param0, struct<6> Param6)//Position - 0xE5F6
{
	struct<4> Var0;
	struct<4> Var6;
	int iVar12;
	int iVar13;
	
	if (Param0.f_5 < Param6.f_5)
	{
		return false;
	}
	if (Param0.f_5 > Param6.f_5)
	{
		return true;
	}
	if (Param0.f_5 == Param6.f_5)
	{
		if (Param0.f_4 < Param6.f_4)
		{
			return false;
		}
		if (Param0.f_4 > Param6.f_4)
		{
			return true;
		}
		if (Param0.f_4 == Param6.f_4)
		{
			Var0 = Param0;
			Var0.f_1 = Param0.f_1 * 60;
			Var0.f_2 = Param0.f_2 * 3600;
			Var0.f_3 = (Param0.f_3 * 86400);
			iVar12 = (((Var0 + Var0.f_1) + Var0.f_2) + Var0.f_3);
			Var6 = Param6;
			Var6.f_1 = Param6.f_1 * 60;
			Var6.f_2 = Param6.f_2 * 3600;
			Var6.f_3 = (Param6.f_3 * 86400);
			iVar13 = (((Var6 + Var6.f_1) + Var6.f_2) + Var6.f_3);
			if (iVar12 > iVar13 || iVar12 == iVar13)
			{
				return true;
			}
			else
			{
				return false;
			}
		}
	}
	return false;
}

bool func_232()//Position - 0xE6E1
{
	int iVar0;
	int iVar1;
	int iVar2;
	
	iVar0 = 0;
	iVar1 = 10;
	iVar2 = iVar0;
	while (iVar2 < iVar1)
	{
		if (Global_2562132[iVar2 /*104*/].f_24 == 0)
		{
			Global_2563381 = iVar2;
			return true;
		}
		iVar2++;
	}
	iVar2 = iVar0;
	Global_2563381 = 11;
	Global_2562132[Global_2563381 /*104*/].f_18 = -1;
	Global_2562132[Global_2563381 /*104*/].f_18.f_1 = 0;
	Global_2562132[Global_2563381 /*104*/].f_18.f_2 = 0;
	Global_2562132[Global_2563381 /*104*/].f_18.f_3 = 0;
	Global_2562132[Global_2563381 /*104*/].f_18.f_5 = 99999;
	while (iVar2 < iVar1)
	{
		if (Global_2562132[iVar2 /*104*/].f_24 == 0 || Global_2562132[iVar2 /*104*/].f_24 == 1)
		{
			if (!func_231(Global_2562132[iVar2 /*104*/].f_18, Global_2562132[Global_2563381 /*104*/].f_18))
			{
				Global_2563381 = iVar2;
			}
		}
		iVar2++;
	}
	if (Global_2563381 == 11)
	{
		return false;
	}
	Global_2562132[Global_2563381 /*104*/].f_99[0] = 0;
	Global_2562132[Global_2563381 /*104*/].f_99[1] = 0;
	Global_2562132[Global_2563381 /*104*/].f_99[2] = 0;
	return true;
}

bool func_233(int iParam0, char* sParam1, int iParam2, char* sParam3, var uParam4, char* sParam5, int iParam6, int iParam7, int iParam8, int iParam9, int iParam10, int iParam11, int iParam12, int iParam13, int iParam14, char* sParam15, char* sParam16)//Position - 0xE80C
{
	int iVar0;
	
	switch (iParam14)
	{
		case 0:
			sParam15 = "NULL";
			sParam16 = "NULL";
			break;
		
		case 1:
			sParam16 = "NULL";
			break;
		
		case 2:
			break;
		
		default:
			break;
	}
	iVar0 = 3;
	if (func_224(iParam0, sParam1, iParam2, iParam6, sParam3, sParam5, uParam4, iParam7, iParam8, iParam9, iParam11, iParam12, iParam13, iParam14, sParam15, sParam16, iVar0) == 1)
	{
		if (iParam11 == 1)
		{
			Global_2990 = iParam10;
			gameplay::set_bit(&Global_2563397, 0);
		}
		return true;
	}
	return false;
}

int func_234(int iParam0, int iParam1)//Position - 0xE88E
{
	if (iParam0 == -99)
	{
		return -99;
	}
	func_235(2, iParam1);
	return iParam0;
}

void func_235(int iParam0, var uParam1)//Position - 0xE8AD
{
	int iVar0;
	int iVar1;
	
	if (iParam0 == 0)
	{
		return;
	}
	iVar0 = false;
	iVar1 = false;
	switch (iParam0)
	{
		case 1:
			iVar0 = true;
			break;
		
		case 2:
			iVar1 = true;
			break;
		
		default:
			return;
	}
	if (iVar0)
	{
		switch (*uParam1)
		{
			case 1:
			case 3:
				break;
			
			case 0:
				*uParam1 = 1;
				break;
			
			case 2:
				*uParam1 = 3;
				break;
			
			default:
				return;
		}
		return;
	}
	if (iVar1)
	{
		switch (*uParam1)
		{
			case 2:
			case 3:
				break;
			
			case 0:
				*uParam1 = 2;
				break;
			
			case 1:
				*uParam1 = 3;
				break;
			
			default:
				return;
		}
		return;
	}
}

char* func_236(char* sParam0, int iParam1, int iParam2)//Position - 0xE95E
{
	if (gameplay::is_string_null_or_empty(sParam0))
	{
		return sLocal_20;
	}
	if (gameplay::are_strings_equal(sParam0, sLocal_20))
	{
		return sLocal_20;
	}
	func_235(1, iParam2);
	if (iParam1)
	{
		return sParam0;
	}
	return ui::_get_label_text(sParam0);
}

int func_237(int iParam0)//Position - 0xE99B
{
	int iVar0;
	
	iVar0 = func_240(iParam0);
	if (iVar0 == -1)
	{
		func_238(iParam0, 1);
		return 0;
	}
	Global_1348553[iVar0 /*5*/].f_4 = 1;
	return Global_1348553[iVar0 /*5*/].f_2;
}

void func_238(int iParam0, int iParam1)//Position - 0xE9D1
{
	if (!func_10(iParam0, 0, 1))
	{
		return;
	}
	if (func_240(iParam0) != -1)
	{
		return;
	}
	if (Global_1348716)
	{
		if (iParam0 == Global_1348716.f_1)
		{
			return;
		}
	}
	if (func_239(iParam0))
	{
		return;
	}
	if (Global_1348754 >= 32)
	{
		return;
	}
	Global_1348721[Global_1348754] = iParam0;
	Global_1348754++;
	if (iParam1)
	{
	}
}

bool func_239(int iParam0)//Position - 0xEA3D
{
	int iVar0;
	
	iVar0 = 0;
	iVar0 = 0;
	while (iVar0 < Global_1348754)
	{
		if (Global_1348721[iVar0] == iParam0)
		{
			return true;
		}
		iVar0++;
	}
	return false;
}

int func_240(int iParam0)//Position - 0xEA6F
{
	int iVar0;
	
	if (!func_10(iParam0, 0, 1))
	{
		return -1;
	}
	if (Global_1348714 == 0)
	{
		return -1;
	}
	iVar0 = 0;
	iVar0 = 0;
	while (iVar0 < Global_1348714)
	{
		if (Global_1348553[iVar0 /*5*/].f_1 == iParam0)
		{
			if (ped::is_pedheadshot_valid(Global_1348553[iVar0 /*5*/].f_2) && ped::is_pedheadshot_ready(Global_1348553[iVar0 /*5*/].f_2))
			{
				return iVar0;
			}
			func_241(iVar0);
			return -1;
		}
		iVar0++;
	}
	return -1;
}

void func_241(int iParam0)//Position - 0xEAEE
{
	char cVar0[64];
	char cVar16[64];
	int iVar32;
	int iVar33;
	
	if (iParam0 >= Global_1348714)
	{
		return;
	}
	if (ped::is_pedheadshot_valid(Global_1348553[iParam0 /*5*/].f_2))
	{
		StringCopy(&cVar0, "CHAR_DEFAULT", 64);
		if (Global_1348553[iParam0 /*5*/].f_2 != 0)
		{
			StringCopy(&cVar16, ped::get_pedheadshot_txd_string(Global_1348553[iParam0 /*5*/].f_2), 64);
			ui::_0x317EBA71D7543F52(&cVar16, &cVar16, &cVar0, &cVar0);
		}
		ped::unregister_pedheadshot(Global_1348553[iParam0 /*5*/].f_2);
	}
	iVar32 = iParam0;
	iVar33 = iVar32 + 1;
	while (iVar33 < Global_1348714)
	{
		Global_1348553[iVar32 /*5*/] = { Global_1348553[iVar33 /*5*/] };
		iVar32++;
		iVar33++;
	}
	func_242(&(Global_1348553[iVar32 /*5*/]));
	Global_1348714 = (Global_1348714 - 1);
}

void func_242(var uParam0)//Position - 0xEBA4
{
	*uParam0 = 0;
	uParam0->f_1 = func_243();
	uParam0->f_2 = 0;
	uParam0->f_4 = 0;
	if (network::network_is_game_in_progress())
	{
		uParam0->f_3 = network::get_network_time();
	}
}

int func_243()//Position - 0xEBD1
{
	return -1;
}

void func_244()//Position - 0xEBDA
{
	Global_1332285.f_40.f_9 = 4;
}

int func_245(int iParam0, var uParam1, char* sParam2, int iParam3, char* sParam4, int iParam5, int iParam6, char* sParam7, char* sParam8)//Position - 0xEBEB
{
	int iVar0;
	
	func_244();
	iVar0 = false;
	return func_219(iParam0, uParam1, sParam2, iVar0, iParam3, sParam4, iParam5, iParam6, sParam7, sParam8);
}

int func_246(int iParam0, var uParam1, char* sParam2, int iParam3, char* sParam4, int iParam5, int iParam6, char* sParam7, char* sParam8)//Position - 0xEC12
{
	int iVar0;
	
	iVar0 = false;
	return func_247(iParam0, uParam1, sParam2, iVar0, iParam3, sParam4, iParam5, iParam6, sParam7, sParam8);
}

bool func_247(int iParam0, var uParam1, char* sParam2, int iParam3, int iParam4, char* sParam5, int iParam6, int iParam7, char* sParam8, char* sParam9)//Position - 0xEC35
{
	int iVar0;
	int iVar1;
	char* sVar2;
	int iVar3;
	char* sVar4;
	var uVar5;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	int iVar10;
	int iVar11;
	int iVar12;
	
	iVar0 = func_243();
	iVar1 = 0;
	if (iParam0 == 145)
	{
		iVar0 = uParam1;
		sVar2 = player::get_player_name(iVar0);
		iVar1 = func_237(iVar0);
		if (iVar1 == 0)
		{
			if (network::is_time_less_than(network::get_network_time(), Global_1332285.f_40.f_13))
			{
				return false;
			}
		}
		Global_16773 = iVar1;
	}
	else
	{
		sVar2 = "";
	}
	iVar3 = 0;
	sVar4 = func_236(sParam5, iParam6, &iVar3);
	uVar5 = func_234(iParam7, &iVar3);
	iVar6 = 0;
	if (!gameplay::is_string_null_or_empty(sParam8))
	{
		iVar6++;
		if (!gameplay::is_string_null_or_empty(sParam9))
		{
			iVar6++;
		}
	}
	if (gameplay::are_strings_equal(sVar4, " "))
	{
		sVar4 = "";
	}
	iVar7 = true;
	iVar8 = 0;
	iVar9 = 0;
	iVar10 = 1;
	iVar11 = 0;
	if (iParam3)
	{
		iVar9 = 1;
		iVar10 = 2;
		iVar11 = 1;
		if (gameplay::is_bit_set(iParam4, 1))
		{
			iVar8 = 1;
		}
	}
	if (gameplay::is_bit_set(iParam4, 2))
	{
		iVar10 = 2;
	}
	iVar12 = false;
	if (!iVar3 == 0 || !gameplay::is_string_null_or_empty(sVar2))
	{
		iVar12 = func_255(iParam0, sParam2, iVar10, sVar4, uVar5, sVar2, iVar3, iVar11, 1, iVar9, 0, iVar7, iVar8, 0, iVar6, sParam8, sParam9);
	}
	else
	{
		iVar12 = func_249(iParam0, sParam2, iVar10, iVar11, 1, iVar9, 0, iVar7, iVar8, 0);
	}
	if (!iVar12)
	{
		return false;
	}
	if (gameplay::is_bit_set(iParam4, 0))
	{
		func_222();
	}
	func_248();
	func_221();
	func_220();
	return true;
}

void func_248()//Position - 0xED8C
{
	Global_1332285.f_40.f_9 = 3;
}

bool func_249(int iParam0, char* sParam1, int iParam2, int iParam3, int iParam4, int iParam5, int iParam6, int iParam7, int iParam8, int iParam9)//Position - 0xED9D
{
	int iVar0;
	char* sVar1;
	int iVar2;
	char* sVar3;
	int iVar4;
	char* sVar5;
	char* sVar6;
	int iVar7;
	
	gameplay::clear_bit(&Global_2283, 10);
	iVar0 = 0;
	sVar1 = "NULL";
	iVar2 = -99;
	sVar3 = "NULL";
	iVar4 = 0;
	sVar5 = "NULL";
	sVar6 = "NULL";
	iVar7 = 3;
	if (func_250(iParam0, sParam1, iParam2, iVar0, sVar1, sVar3, iVar2, iParam3, iParam4, iParam5, iParam7, iParam8, iParam9, iVar4, sVar5, sVar6, iVar7) == 1)
	{
		if (iParam7 == 1)
		{
			Global_2990 = iParam6;
			Global_2893[3 /*6*/] = { Global_101154.f_32575[iParam0 /*29*/].f_3 };
			Global_2970 = iParam0;
			gameplay::set_bit(&Global_2283, 1);
			gameplay::set_bit(&Global_2283, 7);
		}
		return true;
	}
	return false;
}

bool func_250(var uParam0, char* sParam1, int iParam2, int iParam3, char* sParam4, char* sParam5, int iParam6, int iParam7, var uParam8, var uParam9, int iParam10, var uParam11, var uParam12, int iParam13, char* sParam14, char* sParam15, int iParam16)//Position - 0xEE35
{
	int iVar0;
	
	if (iParam13 > 99)
	{
	}
	if (gameplay::are_strings_equal(sParam14, sParam15))
	{
	}
	func_122();
	iVar0 = 0;
	switch (iParam16)
	{
		case 0:
			if (Global_14413 == 0)
			{
				iVar0 = 0;
			}
			else
			{
				iVar0 = 1;
			}
			break;
		
		case 2:
			if (Global_14413 == 2)
			{
				iVar0 = 0;
			}
			else
			{
				iVar0 = 1;
			}
			break;
		
		case 1:
			if (Global_14413 == 1)
			{
				iVar0 = 0;
			}
			else
			{
				iVar0 = 1;
			}
			break;
		
		default:
			iVar0 = 0;
			break;
	}
	if (iVar0 == 0)
	{
		if (player::is_player_playing(player::player_id()))
		{
			if (ped::is_ped_swimming_under_water(player::player_ped_id()))
			{
				return false;
			}
		}
		if (Global_101154.f_12741[Global_14413 /*20*/].f_17 == 1)
		{
			return false;
		}
		if (script::_get_number_of_instances_of_streamed_script(joaat("apptextmessage")) > 0)
		{
			return false;
		}
		if (script::_get_number_of_instances_of_streamed_script(joaat("apptextmessage")) > 0)
		{
			return false;
		}
	}
	if (func_254() == 0)
	{
		func_252();
		return false;
	}
	func_251(Global_16779);
	StringCopy(&(Global_101154.f_12831[Global_16779 /*104*/]), sParam1, 64);
	Global_101154.f_12831[Global_16779 /*104*/].f_17 = uParam0;
	if (iParam2 == 0)
	{
	}
	else
	{
		Global_101154.f_12831[Global_16779 /*104*/].f_24 = iParam2;
	}
	Global_101154.f_12831[Global_16779 /*104*/].f_25 = iParam7;
	Global_101154.f_12831[Global_16779 /*104*/].f_26 = uParam8;
	Global_101154.f_12831[Global_16779 /*104*/].f_29 = uParam9;
	Global_101154.f_12831[Global_16779 /*104*/].f_30 = uParam12;
	Global_101154.f_12831[Global_16779 /*104*/].f_31 = uParam11;
	Global_101154.f_12831[Global_16779 /*104*/].f_28 = 0;
	Global_101154.f_12831[Global_16779 /*104*/].f_32 = iParam3;
	StringCopy(&(Global_101154.f_12831[Global_16779 /*104*/].f_33), sParam4, 64);
	Global_101154.f_12831[Global_16779 /*104*/].f_49 = iParam6;
	StringCopy(&(Global_101154.f_12831[Global_16779 /*104*/].f_50), sParam5, 64);
	Global_101154.f_12831[Global_16779 /*104*/].f_66 = iParam13;
	StringCopy(&(Global_101154.f_12831[Global_16779 /*104*/].f_67), sParam14, 64);
	StringCopy(&(Global_101154.f_12831[Global_16779 /*104*/].f_83), sParam15, 64);
	if (gameplay::is_bit_set(Global_2283, 10))
	{
		Global_101154.f_12831[Global_16779 /*104*/].f_99[0] = 1;
		Global_101154.f_12831[Global_16779 /*104*/].f_99[1] = 1;
		Global_101154.f_12831[Global_16779 /*104*/].f_99[2] = 1;
		Global_2989 = 4;
		func_228(0);
		func_228(2);
		func_228(1);
	}
	else
	{
		func_122();
		switch (iParam16)
		{
			case 3:
				Global_101154.f_12831[Global_16779 /*104*/].f_99[Global_14413] = 1;
				break;
			
			case 0:
				Global_101154.f_12831[Global_16779 /*104*/].f_99[0] = 1;
				break;
			
			case 2:
				Global_101154.f_12831[Global_16779 /*104*/].f_99[2] = 1;
				break;
			
			case 1:
				Global_101154.f_12831[Global_16779 /*104*/].f_99[1] = 1;
				break;
		}
		if (iParam16 == 3)
		{
			switch (Global_14413)
			{
				case 0:
					func_228(0);
					Global_2989 = 0;
					break;
				
				case 1:
					func_228(1);
					Global_2989 = 1;
					break;
				
				case 2:
					func_228(2);
					Global_2989 = 2;
					break;
				
				case 3:
					func_228(3);
					Global_2989 = 3;
					break;
				
				default:
					Global_2989 = 4;
					break;
				}
			}
	}
	if (iParam7 == 1)
	{
		if (gameplay::is_bit_set(Global_2283, 10))
		{
			Global_101154.f_12741[0 /*20*/].f_17 = 1;
			Global_101154.f_12741[1 /*20*/].f_17 = 1;
			Global_101154.f_12741[2 /*20*/].f_17 = 1;
		}
		else
		{
			switch (iParam16)
			{
				case 3:
					Global_101154.f_12741[Global_14413 /*20*/].f_17 = 1;
					break;
				
				case 0:
					Global_101154.f_12741[0 /*20*/].f_17 = 1;
					break;
				
				case 2:
					Global_101154.f_12741[2 /*20*/].f_17 = 1;
					break;
				
				case 1:
					Global_101154.f_12741[1 /*20*/].f_17 = 1;
					break;
				}
			}
	}
	Global_16781[Global_16779] = 0;
	if (iParam10)
	{
		func_122();
		if (Global_14356)
		{
			StringCopy(&Global_14402, "Phone_SoundSet_Prologue", 24);
		}
		else
		{
			switch (Global_14413)
			{
				case 0:
					StringCopy(&Global_14402, "Phone_SoundSet_Michael", 24);
					break;
				
				case 2:
					StringCopy(&Global_14402, "Phone_SoundSet_Trevor", 24);
					break;
				
				case 1:
					StringCopy(&Global_14402, "Phone_SoundSet_Franklin", 24);
					break;
				
				default:
					StringCopy(&Global_14402, "Phone_SoundSet_Default", 24);
					break;
				}
		}
		if (!Global_3088[Global_14413 /*2811*/][0 /*281*/].f_259 == 1)
		{
			if (!func_75())
			{
				audio::play_sound_frontend(-1, "Text_Arrive_Tone", &Global_14402, 1);
			}
		}
	}
	if (!Global_14572)
	{
		if (Global_14413.f_1 == 6)
		{
			func_227(Global_14394, "SET_DATA_SLOT_EMPTY", 1f, -1082130432, -1082130432, -1082130432, -1082130432);
			func_225(1);
			func_227(Global_14394, "DISPLAY_VIEW", 1f, system::to_float(Global_14393), -1082130432, -1082130432, -1082130432);
		}
	}
	return true;
}

void func_251(var uParam0)//Position - 0xF2EC
{
	int iVar0;
	int iVar1;
	int iVar2;
	int iVar3;
	var uVar4;
	int iVar5;
	
	iVar0 = time::get_clock_seconds();
	iVar1 = time::get_clock_minutes();
	iVar2 = time::get_clock_hours();
	iVar3 = time::get_clock_day_of_month();
	uVar4 = time::get_clock_month() + 1;
	iVar5 = time::get_clock_year();
	Global_101154.f_12831[uParam0 /*104*/].f_18 = iVar0;
	Global_101154.f_12831[uParam0 /*104*/].f_18.f_1 = iVar1;
	Global_101154.f_12831[uParam0 /*104*/].f_18.f_2 = iVar2;
	Global_101154.f_12831[uParam0 /*104*/].f_18.f_3 = iVar3;
	Global_101154.f_12831[uParam0 /*104*/].f_18.f_4 = uVar4;
	Global_101154.f_12831[uParam0 /*104*/].f_18.f_5 = iVar5;
}

void func_252()//Position - 0xF37E
{
	int iVar0;
	int iVar1;
	int iVar2;
	
	if (Global_69489)
	{
		iVar0 = 24;
		iVar1 = 33;
	}
	else
	{
		iVar0 = 0;
		iVar1 = 20;
	}
	iVar2 = iVar0;
	Global_16779 = 34;
	Global_101154.f_12831[Global_16779 /*104*/].f_18 = -1;
	Global_101154.f_12831[Global_16779 /*104*/].f_18.f_1 = 0;
	Global_101154.f_12831[Global_16779 /*104*/].f_18.f_2 = 0;
	Global_101154.f_12831[Global_16779 /*104*/].f_18.f_3 = 0;
	Global_101154.f_12831[Global_16779 /*104*/].f_18.f_5 = 99999;
	while (iVar2 < iVar1)
	{
		if (!func_253(Global_101154.f_12831[iVar2 /*104*/].f_18, Global_101154.f_12831[Global_16779 /*104*/].f_18))
		{
			Global_16779 = iVar2;
		}
		iVar2++;
	}
	Global_101154.f_12831[Global_16779 /*104*/].f_24 = 1;
}

bool func_253(struct<6> Param0, struct<6> Param6)//Position - 0xF449
{
	struct<4> Var0;
	struct<4> Var6;
	int iVar12;
	int iVar13;
	
	if (Param0.f_5 < Param6.f_5)
	{
		return false;
	}
	if (Param0.f_5 > Param6.f_5)
	{
		return true;
	}
	if (Param0.f_5 == Param6.f_5)
	{
		if (Param0.f_4 < Param6.f_4)
		{
			return false;
		}
		if (Param0.f_4 > Param6.f_4)
		{
			return true;
		}
		if (Param0.f_4 == Param6.f_4)
		{
			Var0 = Param0;
			Var0.f_1 = Param0.f_1 * 60;
			Var0.f_2 = Param0.f_2 * 3600;
			Var0.f_3 = (Param0.f_3 * 86400);
			iVar12 = (((Var0 + Var0.f_1) + Var0.f_2) + Var0.f_3);
			Var6 = Param6;
			Var6.f_1 = Param6.f_1 * 60;
			Var6.f_2 = Param6.f_2 * 3600;
			Var6.f_3 = (Param6.f_3 * 86400);
			iVar13 = (((Var6 + Var6.f_1) + Var6.f_2) + Var6.f_3);
			if (iVar12 > iVar13 || iVar12 == iVar13)
			{
				return true;
			}
			else
			{
				return false;
			}
		}
	}
	return false;
}

bool func_254()//Position - 0xF534
{
	int iVar0;
	int iVar1;
	int iVar2;
	
	if (Global_69489)
	{
		iVar0 = 24;
		iVar1 = 33;
	}
	else
	{
		iVar0 = 0;
		iVar1 = 20;
	}
	iVar2 = iVar0;
	while (iVar2 < iVar1)
	{
		if (Global_101154.f_12831[iVar2 /*104*/].f_24 == 0)
		{
			Global_16779 = iVar2;
			return true;
		}
		iVar2++;
	}
	iVar2 = iVar0;
	Global_16779 = 34;
	Global_101154.f_12831[Global_16779 /*104*/].f_18 = -1;
	Global_101154.f_12831[Global_16779 /*104*/].f_18.f_1 = 0;
	Global_101154.f_12831[Global_16779 /*104*/].f_18.f_2 = 0;
	Global_101154.f_12831[Global_16779 /*104*/].f_18.f_3 = 0;
	Global_101154.f_12831[Global_16779 /*104*/].f_18.f_5 = 99999;
	while (iVar2 < iVar1)
	{
		if (Global_101154.f_12831[iVar2 /*104*/].f_24 == 0 || Global_101154.f_12831[iVar2 /*104*/].f_24 == 1)
		{
			if (!func_253(Global_101154.f_12831[iVar2 /*104*/].f_18, Global_101154.f_12831[Global_16779 /*104*/].f_18))
			{
				Global_16779 = iVar2;
			}
		}
		iVar2++;
	}
	if (Global_16779 == 34)
	{
		return false;
	}
	Global_101154.f_12831[Global_16779 /*104*/].f_99[0] = 0;
	Global_101154.f_12831[Global_16779 /*104*/].f_99[1] = 0;
	Global_101154.f_12831[Global_16779 /*104*/].f_99[2] = 0;
	return true;
}

bool func_255(int iParam0, char* sParam1, int iParam2, char* sParam3, var uParam4, char* sParam5, int iParam6, int iParam7, int iParam8, int iParam9, int iParam10, int iParam11, int iParam12, int iParam13, int iParam14, char* sParam15, char* sParam16)//Position - 0xF68B
{
	int iVar0;
	
	switch (iParam14)
	{
		case 0:
			sParam15 = "NULL";
			sParam16 = "NULL";
			break;
		
		case 1:
			sParam16 = "NULL";
			break;
		
		case 2:
			break;
		
		default:
			break;
	}
	gameplay::clear_bit(&Global_2283, 10);
	iVar0 = 3;
	if (func_250(iParam0, sParam1, iParam2, iParam6, sParam3, sParam5, uParam4, iParam7, iParam8, iParam9, iParam11, iParam12, iParam13, iParam14, sParam15, sParam16, iVar0) == 1)
	{
		if (iParam11 == 1)
		{
			Global_2990 = iParam10;
			Global_2893[3 /*6*/] = { Global_101154.f_32575[iParam0 /*29*/].f_3 };
			Global_2970 = iParam0;
			StringCopy(&Global_2971, sParam5, 64);
			gameplay::set_bit(&Global_2283, 1);
			gameplay::set_bit(&Global_2283, 7);
		}
		return true;
	}
	return false;
}

bool func_256(int iParam0, var uParam1, char* sParam2, int iParam3, char* sParam4, int iParam5, int iParam6, char* sParam7, char* sParam8)//Position - 0xF740
{
	int iVar0;
	
	if (!ped::is_ped_injured(player::player_ped_id()))
	{
	}
	if (ai::is_ped_sprinting(player::player_ped_id()))
	{
		return false;
	}
	func_248();
	iVar0 = true;
	if (func_247(iParam0, uParam1, sParam2, iVar0, iParam3, sParam4, iParam5, iParam6, sParam7, sParam8))
	{
		func_218(120000);
		return true;
	}
	return false;
}

bool func_257(var uParam0, int iParam1, char* sParam2, char* sParam3, int iParam4)//Position - 0xF792
{
	int iVar0;
	int iVar1;
	
	if (!ped::is_ped_injured(player::player_ped_id()))
	{
		if (ai::is_ped_sprinting(player::player_ped_id()))
		{
			return false;
		}
	}
	iVar0 = false;
	iVar1 = 12;
	if (gameplay::is_bit_set(iParam4, 7))
	{
		iVar1 = 9;
	}
	if (gameplay::is_bit_set(iParam4, 4))
	{
		iVar0 = func_264(uParam0, iParam1, sParam2, sParam3, iVar1, 0, 0, 1);
	}
	else
	{
		iVar0 = func_263(uParam0, iParam1, sParam2, sParam3, iVar1, 0, 0, 1);
	}
	if (iVar0)
	{
		if (gameplay::is_bit_set(iParam4, 3))
		{
			func_262(1);
		}
		if (gameplay::is_bit_set(iParam4, 5))
		{
			func_261(1);
		}
		func_260();
		func_221();
		func_259();
		func_258();
		return true;
	}
	return false;
}

void func_258()//Position - 0xF835
{
	Global_2467484 = 0;
}

void func_259()//Position - 0xF842
{
	Global_1332285.f_57 = 1;
	Global_1332285.f_57.f_1 = 0;
}

void func_260()//Position - 0xF85A
{
	Global_1332285.f_40.f_9 = 1;
}

void func_261(int iParam0)//Position - 0xF86B
{
	if (iParam0 == 1)
	{
		gameplay::set_bit(&Global_2285, 0);
	}
	else
	{
		gameplay::clear_bit(&Global_2285, 0);
	}
}

void func_262(int iParam0)//Position - 0xF88C
{
	if (iParam0 == 1)
	{
		gameplay::set_bit(&Global_2283, 20);
	}
	else
	{
		gameplay::clear_bit(&Global_2283, 20);
	}
}

int func_263(var uParam0, int iParam1, char* sParam2, char* sParam3, int iParam4, int iParam5, int iParam6, int iParam7)//Position - 0xF8AF
{
	func_131(uParam0, iParam1, sParam2, iParam5, iParam6, 0);
	Global_15760 = 0;
	Global_15719 = 1;
	Global_15726 = 0;
	Global_15721 = 0;
	Global_16703 = 0;
	Global_16705 = 0;
	Global_16709 = 0;
	Global_15717 = 0;
	Global_15764 = 0;
	Global_15766 = 0;
	Global_2621441 = 0;
	return func_117(sParam3, iParam4, iParam7);
}

int func_264(var uParam0, int iParam1, char* sParam2, char* sParam3, int iParam4, int iParam5, int iParam6, int iParam7)//Position - 0xF8FD
{
	func_131(uParam0, iParam1, sParam2, iParam5, iParam6, 0);
	Global_15760 = 1;
	Global_15719 = 1;
	Global_15726 = 0;
	Global_15721 = 0;
	Global_16703 = 0;
	Global_16705 = 0;
	Global_16709 = 0;
	Global_15717 = 0;
	Global_15764 = 0;
	Global_15766 = 0;
	Global_2621441 = 0;
	return func_117(sParam3, iParam4, iParam7);
}

bool func_265(var uParam0, int iParam1, char* sParam2, char* sParam3, char* sParam4)//Position - 0xF94B
{
	if (!ped::is_ped_injured(player::player_ped_id()))
	{
	}
	if (ai::is_ped_sprinting(player::player_ped_id()))
	{
		return false;
	}
	if (func_267(uParam0, iParam1, sParam2, sParam3, 9, sParam4, 0, 0, 1))
	{
		func_266();
		func_260();
		func_221();
		func_259();
		func_258();
		return true;
	}
	return false;
}

void func_266()//Position - 0xF99D
{
	Global_16730 = 0;
}

int func_267(var uParam0, int iParam1, char* sParam2, char* sParam3, int iParam4, char* sParam5, int iParam6, int iParam7, int iParam8)//Position - 0xF9A9
{
	func_131(uParam0, iParam1, sParam2, iParam6, iParam7, 0);
	Global_15760 = 0;
	Global_15719 = 1;
	Global_15726 = 0;
	Global_15721 = 1;
	Global_16703 = 0;
	Global_16705 = 0;
	Global_16709 = 0;
	Global_15717 = 0;
	Global_15764 = 1;
	Global_15766 = 0;
	StringCopy(&Global_15860, sParam5, 24);
	Global_2621441 = 0;
	return func_117(sParam3, iParam4, iParam8);
}

bool func_268(var uParam0, char* sParam1, char* sParam2)//Position - 0xF9FE
{
	if (func_270(uParam0, sParam1, sParam2, 12, 0, 0, 0))
	{
		func_269();
		func_221();
		func_259();
		return true;
	}
	return false;
}

void func_269()//Position - 0xFA29
{
	Global_1332285.f_40.f_9 = 2;
}

int func_270(var uParam0, char* sParam1, char* sParam2, int iParam3, int iParam4, int iParam5, int iParam6)//Position - 0xFA3A
{
	func_131(uParam0, 145, sParam1, iParam4, iParam5, iParam6);
	if (iParam3 > 7)
	{
		if (iParam3 < 12)
		{
			iParam3 = 7;
		}
	}
	Global_15719 = 0;
	Global_15721 = 0;
	Global_15726 = 0;
	Global_16703 = 0;
	Global_16705 = 0;
	Global_16709 = 0;
	Global_2621441 = 0;
	return func_117(sParam2, iParam3, 0);
}

void func_271()//Position - 0xFA88
{
	Global_1332285.f_55 = Global_1332285.f_40.f_1;
	Global_1332285.f_55.f_1 = Global_1332285.f_40.f_10;
}

void func_272()//Position - 0xFAAE
{
	Global_1332285.f_40 = 1;
}

int func_273()//Position - 0xFABD
{
	return Global_1332285.f_40 == 1;
}

bool func_274(int iParam0, int iParam1, int iParam2)//Position - 0xFACD
{
	if (!func_275(iParam0))
	{
		return false;
	}
	if (Global_1332285.f_40.f_2 != iParam1)
	{
		return false;
	}
	if (iParam2 != 0)
	{
		if (Global_1332285.f_40.f_3 != iParam2)
		{
			return false;
		}
	}
	return true;
}

bool func_275(int iParam0)//Position - 0xFB0C
{
	if (!func_276())
	{
		return false;
	}
	if (!Global_1332285.f_40.f_1 == iParam0)
	{
		return false;
	}
	return true;
}

bool func_276()//Position - 0xFB34
{
	if (Global_1332285.f_40 == 0)
	{
		return false;
	}
	return true;
}

bool func_277(int iParam0)//Position - 0xFB4B
{
	if (func_281())
	{
		return false;
	}
	if (func_280())
	{
		return false;
	}
	if (func_50(0))
	{
		return false;
	}
	if (Global_1312466.f_18 != 0)
	{
		return false;
	}
	if (Global_1715399 || func_279())
	{
		return false;
	}
	if (!gameplay::is_bit_set(iParam0, 6))
	{
		if (func_278())
		{
			return false;
		}
	}
	return true;
}

int func_278()//Position - 0xFBAF
{
	return network::is_time_less_than(network::get_network_time(), Global_1347375);
}

bool func_279()//Position - 0xFBC3
{
	if (Global_2552549.f_796 > -1)
	{
		return true;
	}
	return false;
}

int func_280()//Position - 0xFBDB
{
	return Global_1332285.f_40 == 3;
}

int func_281()//Position - 0xFBEB
{
	return func_120();
}

int func_282(int iParam0, int iParam1, int iParam2)//Position - 0xFBF7
{
	if (!func_280())
	{
		return 0;
	}
	return func_274(iParam0, iParam1, iParam2);
}

int func_283(char* sParam0, char* sParam1)//Position - 0xFC15
{
	char cVar0[64];
	
	StringCopy(&cVar0, sParam0, 64);
	StringConCat(&cVar0, sParam1, 64);
	return gameplay::get_hash_key(&cVar0);
}

var func_284()//Position - 0xFC2F
{
	return Global_2465472.f_1;
}

int func_285()//Position - 0xFC3D
{
	if (Global_1332473.f_2)
	{
		return 1;
	}
	return func_286();
}

int func_286()//Position - 0xFC56
{
	return func_281();
}

void func_287(var uParam0)//Position - 0xFC62
{
	if (!network::network_does_network_id_exist(Local_93.f_2[uParam0 /*23*/]))
	{
		if (Local_93.f_2[uParam0 /*23*/].f_2 == network::participant_id_to_int())
		{
			if (!gameplay::is_bit_set(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2, 18))
			{
				if (func_24(Local_288[Local_93.f_2[uParam0 /*23*/].f_2 /*44*/].f_4.f_21))
				{
					if (!func_85(&uLocal_1726, 30000, 0))
					{
						if (func_288(uParam0, 1109393408))
						{
							Local_288[network::participant_id_to_int() /*44*/].f_4.f_26 = { 0f, 0f, 0f };
							Local_288[network::participant_id_to_int() /*44*/].f_4.f_29 = 0f;
							func_30(&uLocal_1726);
						}
					}
					else if (!gameplay::is_bit_set(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2, 19))
					{
						gameplay::set_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_4.f_2), 19);
					}
				}
			}
		}
	}
}

bool func_288(var uParam0, float fParam1)//Position - 0xFD2F
{
	vector3 vVar0;
	vector3 vVar3;
	var uVar6;
	int iVar7;
	
	if (func_10(network::network_get_player_index(player::int_to_participantindex(Local_93.f_2[uParam0 /*23*/].f_2)), 1, 1))
	{
		streaming::request_model(Global_2460486.f_744);
		streaming::request_model(Global_2460486.f_745);
		if (streaming::has_model_loaded(Global_2460486.f_744))
		{
			if (streaming::has_model_loaded(Global_2460486.f_745))
			{
				vVar3 = { entity::get_entity_coords(player::get_player_ped(network::network_get_player_index(player::int_to_participantindex(Local_93.f_2[uParam0 /*23*/].f_2))), 1) };
				if (!func_305(vVar3))
				{
					if (func_185(vVar3))
					{
						if (Local_288[Local_93.f_2[uParam0 /*23*/].f_2 /*44*/].f_4.f_25 < 2)
						{
							iVar7 = 0;
						}
						else if (Local_288[Local_93.f_2[uParam0 /*23*/].f_2 /*44*/].f_4.f_25 < 5)
						{
							iVar7 = 9;
						}
						else
						{
							iVar7 = 1;
						}
					}
					else if (Local_288[Local_93.f_2[uParam0 /*23*/].f_2 /*44*/].f_4.f_25 < 5)
					{
						iVar7 = 8;
					}
					else
					{
						iVar7 = 9;
					}
					if (Local_288[Local_93.f_2[uParam0 /*23*/].f_2 /*44*/].f_4.f_34 == -1)
					{
						Local_288[Local_93.f_2[uParam0 /*23*/].f_2 /*44*/].f_4.f_34 = 0;
					}
					if (func_301(vVar3, &vVar0, &uVar6, &(Local_288[Local_93.f_2[uParam0 /*23*/].f_2 /*44*/].f_4.f_34), iVar7, fParam1))
					{
						Local_288[Local_93.f_2[uParam0 /*23*/].f_2 /*44*/].f_4.f_21 = { vVar0 };
						Local_288[Local_93.f_2[uParam0 /*23*/].f_2 /*44*/].f_4.f_24 = uVar6;
						Local_288[Local_93.f_2[uParam0 /*23*/].f_2 /*44*/].f_4.f_25 = 0;
						Local_288[Local_93.f_2[uParam0 /*23*/].f_2 /*44*/].f_4.f_34 = -1;
						return true;
					}
					else if (Local_288[Local_93.f_2[uParam0 /*23*/].f_2 /*44*/].f_4.f_34 >= 5)
					{
						Local_288[Local_93.f_2[uParam0 /*23*/].f_2 /*44*/].f_4.f_25++;
						Local_288[Local_93.f_2[uParam0 /*23*/].f_2 /*44*/].f_4.f_34 = 0;
					}
				}
				else if (func_289(vVar3, &vVar0, &uVar6))
				{
					Local_288[Local_93.f_2[uParam0 /*23*/].f_2 /*44*/].f_4.f_21 = { vVar0 };
					Local_288[Local_93.f_2[uParam0 /*23*/].f_2 /*44*/].f_4.f_24 = uVar6;
					Local_288[Local_93.f_2[uParam0 /*23*/].f_2 /*44*/].f_4.f_25 = 0;
					Local_288[Local_93.f_2[uParam0 /*23*/].f_2 /*44*/].f_4.f_34 = -1;
					return true;
				}
			}
		}
	}
	return false;
}

bool func_289(vector3 vParam0, var uParam3, var uParam4)//Position - 0xFF8E
{
	int iVar0;
	int iVar1;
	vector3 vVar2;
	float fVar5;
	
	if (object::is_point_in_angled_area(vParam0, -1061.018f, -2540.235f, 18.66932f, -1023.332f, -2562.115f, 31.57616f, 250f, 0, true))
	{
		iVar1 = 5;
		iVar0 = 0;
		while (iVar0 < iVar1)
		{
			switch (iVar0)
			{
				case 0:
					vVar2 = { -988.9172f, -2428.579f, 19.0608f };
					fVar5 = 148.3473f;
					break;
				
				case 1:
					vVar2 = { -968.0948f, -2392.327f, 19.056f };
					fVar5 = 150.0203f;
					break;
				
				case 2:
					vVar2 = { -946.4792f, -2419.659f, 19.0562f };
					fVar5 = 91.6004f;
					break;
				
				case 3:
					vVar2 = { -899.0128f, -2432.842f, 19.0847f };
					fVar5 = 58.9819f;
					break;
				
				case 4:
					vVar2 = { -890.7079f, -2272.402f, 18.2077f };
					fVar5 = 135.9921f;
					break;
			}
			if (func_290(vVar2, 1086324736, 1065353216, 1065353216, 1084227584, 1, 1, 1, 1123024896, 0, -1, 1, 0, 0, 0, 0, 0))
			{
				*uParam3 = { vVar2 };
				*uParam4 = fVar5;
				return true;
			}
			iVar0++;
		}
	}
	else if (object::is_point_in_angled_area(vParam0, -1061.059f, -2540.254f, 10.94467f, -1023.297f, -2562.052f, 18.51685f, 250f, 0, true))
	{
		iVar1 = 5;
		iVar0 = 0;
		while (iVar0 < iVar1)
		{
			switch (iVar0)
			{
				case 0:
					vVar2 = { -996.2861f, -2449.917f, 12.6953f };
					fVar5 = 148.5654f;
					break;
				
				case 1:
					vVar2 = { -1006.094f, -2421.448f, 12.9447f };
					fVar5 = 237.9966f;
					break;
				
				case 2:
					vVar2 = { -948.7274f, -2403.462f, 12.7341f };
					fVar5 = 111.3975f;
					break;
				
				case 3:
					vVar2 = { -895.4352f, -2364.867f, 13.4802f };
					fVar5 = 142.0129f;
					break;
				
				case 4:
					vVar2 = { -906.6598f, -2419.59f, 12.6381f };
					fVar5 = 78.0133f;
					break;
			}
			if (func_290(vVar2, 1086324736, 1065353216, 1065353216, 1084227584, 1, 1, 1, 1123024896, 0, -1, 1, 0, 0, 0, 0, 0))
			{
				*uParam3 = { vVar2 };
				*uParam4 = fVar5;
				return true;
			}
			iVar0++;
		}
	}
	else if (object::is_point_in_angled_area(vParam0, -1043.364f, -2747.29f, 16.96057f, -991.5368f, -2657.682f, 69.12349f, 200f, 0, true))
	{
		iVar1 = 5;
		iVar0 = 0;
		while (iVar0 < iVar1)
		{
			switch (iVar0)
			{
				case 0:
					vVar2 = { -1084.003f, -2690.473f, 19.0585f };
					fVar5 = 213.4924f;
					break;
				
				case 1:
					vVar2 = { -1087.542f, -2660.057f, 19.0615f };
					fVar5 = 191.5389f;
					break;
				
				case 2:
					vVar2 = { -1083.4f, -2612.184f, 19.0622f };
					fVar5 = 153.7453f;
					break;
				
				case 3:
					vVar2 = { -1059.893f, -2570.656f, 19.061f };
					fVar5 = 150.5092f;
					break;
				
				case 4:
					vVar2 = { -1038.387f, -2533.845f, 19.0498f };
					fVar5 = 150.637f;
					break;
			}
			if (func_290(vVar2, 1086324736, 1065353216, 1065353216, 1084227584, 1, 1, 1, 1123024896, 0, -1, 1, 0, 0, 0, 0, 0))
			{
				*uParam3 = { vVar2 };
				*uParam4 = fVar5;
				return true;
			}
			iVar0++;
		}
	}
	else if (object::is_point_in_angled_area(vParam0, -1047.646f, -2754.947f, 2.941969f, -991.7314f, -2653.153f, 16.89228f, 200f, 0, true) || object::is_point_in_angled_area(vParam0, -1116.893f, -2675.671f, 12.17757f, -1183.933f, -2789.451f, 38.95185f, 53f, 0, true))
	{
		iVar1 = 5;
		iVar0 = 0;
		while (iVar0 < iVar1)
		{
			switch (iVar0)
			{
				case 0:
					vVar2 = { -1076.408f, -2693.846f, 12.6509f };
					fVar5 = 221.0395f;
					break;
				
				case 1:
					vVar2 = { -1121.422f, -2703.146f, 12.9444f };
					fVar5 = 326.1454f;
					break;
				
				case 2:
					vVar2 = { -1095.97f, -2644.177f, 12.6382f };
					fVar5 = 182.0544f;
					break;
				
				case 3:
					vVar2 = { -1084.046f, -2601.412f, 12.6823f };
					fVar5 = 153.5335f;
					break;
				
				case 4:
					vVar2 = { -1049.575f, -2589.945f, 12.6066f };
					fVar5 = 135.7366f;
					break;
			}
			if (func_290(vVar2, 1086324736, 1065353216, 1065353216, 1084227584, 1, 1, 1, 1123024896, 0, -1, 1, 0, 0, 0, 0, 0))
			{
				*uParam3 = { vVar2 };
				*uParam4 = fVar5;
				return true;
			}
			iVar0++;
		}
	}
	return false;
}

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

bool func_291(vector3 vParam0, float fParam3, int iParam4, int iParam5, float fParam6, int iParam7, int iParam8, float fParam9, int iParam10)//Position - 0x105C2
{
	int iVar0;
	int iVar1;
	float fVar2;
	
	if (iParam4 && !iParam7)
	{
		if (func_10(player::player_id(), 1, 1))
		{
			if (!cam::is_screen_faded_out())
			{
				fVar2 = fParam6;
				if (fParam9 > 0f)
				{
					fVar2 = fParam9;
				}
				if (gameplay::get_distance_between_coords(func_203(player::player_id()), vParam0, 1) <= (fVar2 + fParam3))
				{
					if (cam::is_sphere_visible(vParam0, fParam3))
					{
						return true;
					}
				}
			}
		}
	}
	iVar0 = 0;
	while (iVar0 < 32)
	{
		iVar1 = iVar0;
		if (func_10(iVar1, 1, 1))
		{
			if (!func_293(iVar1, 0) && network::_0x9DE986FC9A87C474(player::player_id(), iVar1))
			{
				if (iParam4 == 1 || (iParam4 == 0 && iVar1 != player::player_id()))
				{
					if ((func_292(iVar1) || !iParam10) && !Global_2418472[iVar1 /*313*/].f_255)
					{
						fVar2 = fParam6;
						if (fParam9 > 0f)
						{
							if (!player::get_player_team(iVar1) == -1)
							{
								if (player::get_player_team(iVar1) == player::get_player_team(player::player_id()))
								{
									fVar2 = fParam9;
								}
							}
						}
						if (!iParam7)
						{
							if ((iParam5 || (iParam5 == 0 && player::get_player_team(iVar1) != player::get_player_team(player::player_id()))) || player::get_player_team(iVar1) == -1)
							{
								if (gameplay::get_distance_between_coords(func_203(iVar1), vParam0, 1) <= (fVar2 + fParam3))
								{
									if (network::is_sphere_visible_to_player(iVar1, vParam0, fParam3))
									{
										return true;
									}
								}
							}
						}
						else if (player::get_player_team(iVar1) != iParam8 || player::get_player_team(iVar1) == -1)
						{
							if (gameplay::get_distance_between_coords(func_203(iVar1), vParam0, 1) <= (fVar2 + fParam3))
							{
								if (network::is_sphere_visible_to_player(iVar1, vParam0, fParam3))
								{
									return true;
								}
							}
						}
					}
				}
			}
		}
		iVar0++;
	}
	return false;
}

bool func_292(int iParam0)//Position - 0x10779
{
	if (entity::is_entity_visible_to_script(player::get_player_ped(iParam0)) || Global_2418472[iParam0 /*313*/].f_241)
	{
		return true;
	}
	return false;
}

int func_293(int iParam0, int iParam1)//Position - 0x107A4
{
	int iVar0;
	
	if (iParam0 == player::player_id())
	{
		iVar0 = func_294(-1, 0) == 8;
	}
	else
	{
		iVar0 = Global_1587523[iParam0 /*444*/].f_195 == 8;
	}
	if (iParam1 == 1)
	{
		if (network::network_is_player_active(iParam0))
		{
			iVar0 = player::get_player_team(iParam0) == 8;
		}
	}
	return iVar0;
}

int func_294(int iParam0, int iParam1)//Position - 0x107EF
{
	int iVar0;
	int iVar1;
	
	iVar1 = iParam0;
	if (iVar1 == -1)
	{
		iVar1 = func_89();
	}
	if (Global_1315891[iVar1] == 1)
	{
		if (iParam1)
		{
		}
		iVar0 = 8;
	}
	else
	{
		iVar0 = Global_1312741[iVar1];
		if (iParam1)
		{
		}
	}
	return iVar0;
}

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

bool func_296(int iParam0)//Position - 0x1092C
{
	if (func_300(player::player_id(), iParam0))
	{
		return true;
	}
	Global_2459440 = { func_299(iParam0) };
	if (network::network_is_friend(&Global_2459440))
	{
		return true;
	}
	if (func_297(player::player_id(), iParam0))
	{
		return true;
	}
	return false;
}

bool func_297(int iParam0, int iParam1)//Position - 0x10973
{
	int iVar0;
	
	iVar0 = func_298(iParam0);
	if (!iVar0 == func_243())
	{
		if (iVar0 == func_298(iParam1))
		{
			return true;
		}
	}
	return false;
}

int func_298(int iParam0)//Position - 0x1099E
{
	if (iParam0 != func_243())
	{
		return Global_1610316[iParam0 /*174*/].f_10;
	}
	return func_243();
}

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

bool func_300(int iParam0, int iParam1)//Position - 0x109D7
{
	if (network::_network_player_is_in_clan())
	{
		Global_2459440 = { func_299(iParam0) };
		Global_2459453 = { func_299(iParam1) };
		if (network::network_clan_player_is_active(&Global_2459440))
		{
			if (network::network_clan_player_is_active(&Global_2459453))
			{
				network::network_clan_player_get_desc(&Global_2459370, 35, &Global_2459440);
				network::network_clan_player_get_desc(&Global_2459405, 35, &Global_2459453);
				if (Global_2459370 == Global_2459405)
				{
					return true;
				}
			}
		}
	}
	return false;
}

bool func_301(vector3 vParam0, var uParam3, var uParam4, var uParam5, int iParam6, float fParam7)//Position - 0x10A44
{
	vector3 vVar0;
	vector3 vVar3;
	vector3 vVar6;
	float fVar9;
	var uVar10;
	int iVar11;
	int iVar12;
	int iVar13;
	float fVar14;
	float fVar15;
	vector3 vVar16;
	vector3 vVar19;
	vector3 vVar22;
	
	fVar9 = 0f;
	iVar11 = true;
	if (iParam6 == 0)
	{
		iVar11 = false;
	}
	iVar12 = false;
	iVar13 = 0;
	fVar14 = 100f;
	fVar15 = 2.5f;
	if (!ped::is_ped_injured(player::player_ped_id()))
	{
		if (pathfind::get_nth_closest_vehicle_node_with_heading(vParam0, *uParam5, &vVar0, &fVar9, &uVar10, iParam6, fVar14, fVar15))
		{
			if (system::vdist2(vParam0, vVar0) <= (50f * 50f))
			{
				while (!iVar12 && iVar13 < 5)
				{
					if (vehicle::_0xA4822F1CF23F4810(&vVar0, &vVar3, &vVar6, 0f, 180f, fParam7, iVar11, 1, 0))
					{
						fVar9 = func_304(0f, 0f, 0f, vVar6, 1);
						if (func_302(vParam0, vVar3, 120f, fParam7))
						{
							if (func_290(*uParam3, 5f, 2f, 1f, 6f, 1, 1, 1, 120f, 0, -1, 1, 0f, 0, 0, 0, 0))
							{
								iVar12 = true;
								vVar16 = { object::_get_object_offset_from_coords(vVar3, fVar9, 0f, 1f, 0f) };
								vVar19 = { vVar16 - vVar3 };
								vVar22 = { vVar0 - vVar3 };
								if (gameplay::get_angle_between_2d_vectors(vVar19.x, vVar19.y, vVar22.x, vVar22.y) > 60f)
								{
									fVar9 = (fVar9 + 180f);
									fVar9 = func_198(fVar9, 0f, 360f);
								}
								*uParam3 = { vVar3 };
								*uParam4 = fVar9;
								return true;
							}
							else
							{
								iVar13++;
							}
						}
						else
						{
							iVar13++;
						}
					}
					else
					{
						iVar13++;
					}
				}
			}
			*uParam5++;
		}
		else
		{
			*uParam5++;
		}
	}
	return false;
}

bool func_302(vector3 vParam0, vector3 vParam3, float fParam6, float fParam7)//Position - 0x10BC3
{
	float fVar0;
	
	fVar0 = system::vdist2(vParam0, vParam3);
	if (fVar0 >= (fParam6 * fParam6))
	{
		return false;
	}
	if (fVar0 <= (fParam7 * fParam7))
	{
		return false;
	}
	if (cam::is_sphere_visible(vParam3, 2.5f))
	{
		return false;
	}
	if (gameplay::is_point_obscured_by_a_mission_entity(vParam3, 3f, 3f, 3f, 0))
	{
		return false;
	}
	if (func_303(vParam3, 0))
	{
		return false;
	}
	return true;
}

bool func_303(vector3 vParam0, int iParam3)//Position - 0x10C2F
{
	if (func_12(vParam0, -1144.497f, 43.01712f, 51.94447f, 325f))
	{
		if (func_191(vParam0, 1, 0, 0))
		{
			return true;
		}
		if (object::is_point_in_angled_area(vParam0, -1319.769f, 29.52616f, 49.56616f, -1336.527f, 121.0351f, 75.61888f, 18f, 0, true))
		{
			return true;
		}
		if (object::is_point_in_angled_area(vParam0, -1360.02f, 110.1307f, 52.63413f, -1365.276f, 172.0624f, 72.01312f, 52f, 0, true))
		{
			return true;
		}
		if (object::is_point_in_angled_area(vParam0, -1363.007f, 170.533f, 50.00813f, -1296.903f, 178.8133f, 73.37104f, 35f, 0, true))
		{
			return true;
		}
		if (object::is_point_in_angled_area(vParam0, -1197.521f, 199.8643f, 57.04471f, -1298.04f, 176.1384f, 73.33252f, 34f, 0, true))
		{
			return true;
		}
		if (object::is_point_in_angled_area(vParam0, -1103.745f, 221.1367f, 55.34814f, -1208.394f, 191.0909f, 79.13708f, 45f, 0, true))
		{
			return true;
		}
		if (object::is_point_in_angled_area(vParam0, -989.0328f, -89.39376f, 32.48801f, -1086.211f, -115.7076f, 50.65051f, 70f, 0, true))
		{
			return true;
		}
		if (object::is_point_in_angled_area(vParam0, -958.5481f, -111.5455f, 30.76432f, -1132.685f, 190.7841f, 73.90366f, 70f, 0, true))
		{
			return true;
		}
		if (object::is_point_in_angled_area(vParam0, -1077.028f, -139.7337f, 38.73388f, -1299.556f, -15.16894f, 63.4371f, 20f, 0, true))
		{
			return true;
		}
		if (object::is_point_in_angled_area(vParam0, -1319.769f, 29.52616f, 47.56616f, -1287.619f, -24.88864f, 67.5273f, 20f, 0, true))
		{
			return true;
		}
	}
	if (func_192(2, vParam0))
	{
		if (func_191(vParam0, 2, 0, 0))
		{
			return true;
		}
	}
	if (func_192(3, vParam0))
	{
		if (func_191(vParam0, 3, 0, 0))
		{
			return true;
		}
	}
	if (func_192(4, vParam0))
	{
		if (func_191(vParam0, 4, 0, 0))
		{
			return true;
		}
	}
	if (func_192(5, vParam0))
	{
		if (func_191(vParam0, 5, 0, 0))
		{
			return true;
		}
	}
	if (func_192(6, vParam0))
	{
		if (func_191(vParam0, 6, 0, 0))
		{
			return true;
		}
	}
	if (!func_188())
	{
		if (func_192(7, vParam0))
		{
			if (func_191(vParam0, 7, 0, 0))
			{
				return true;
			}
		}
	}
	if (func_192(8, vParam0))
	{
		if (func_191(vParam0, 8, 0, 0))
		{
			return true;
		}
	}
	if (object::is_point_in_angled_area(vParam0, 2591.626f, -268.894f, 111.8859f, 2591.331f, -614.4355f, 55.36921f, 70f, 0, true))
	{
		return true;
	}
	if (object::is_point_in_angled_area(vParam0, -1112.586f, -2674.767f, 12.56804f, -1215.468f, -2854.589f, 19.44588f, 41.25f, 0, true))
	{
		return true;
	}
	if (object::is_point_in_angled_area(vParam0, -804.05f, 4216.412f, 204.4872f, -509.0679f, 4135.19f, 123.2502f, 250f, 0, true))
	{
		return true;
	}
	if (object::is_point_in_angled_area(vParam0, -148.8777f, 4862.204f, 305.6442f, 454.6274f, 5573.104f, 804.097f, 250f, 0, true) || object::is_point_in_angled_area(vParam0, -482.8931f, 4990.255f, 155.1601f, 7.830751f, 5009.371f, 430.7604f, 250f, 0, true))
	{
		return true;
	}
	if (((object::is_point_in_angled_area(vParam0, 441.3999f, 5579.99f, 802.5138f, 965.7776f, 5675.921f, 601.2646f, 250f, 0, true) || object::is_point_in_angled_area(vParam0, 954.1139f, 5641.051f, 646.5054f, 2140.375f, 5377.753f, 149.1221f, 250f, 0, true)) || object::is_point_in_angled_area(vParam0, 2117.348f, 5377.259f, 173.3297f, 2439.934f, 5297.445f, 62.68662f, 100f, 0, true)) || object::is_point_in_angled_area(vParam0, 2393.347f, 5321.58f, 107.0624f, 2523.946f, 5124.746f, 41.68384f, 70f, 0, true))
	{
		return true;
	}
	if (func_12(vParam0, -99.68751f, -2448.891f, 5.01731f, 230f))
	{
		if ((((object::is_point_in_angled_area(vParam0, 85.05448f, -2511.884f, -2.996267f, -57.59977f, -2412.716f, 15.00095f, 75f, 0, true) || object::is_point_in_angled_area(vParam0, 7.516524f, -2546.741f, 1.331557f, -177.3268f, -2417.047f, 19.16044f, 80f, 0, true)) || object::is_point_in_angled_area(vParam0, -260.0354f, -2419.978f, 1.399635f, -27.26375f, -2423.848f, 25.00064f, 80f, 0, true)) || object::is_point_in_angled_area(vParam0, -187.4256f, -2516.086f, -6.849975f, -186.7518f, -2438.149f, 25.0016f, 40f, 0, true)) || object::is_point_in_angled_area(vParam0, -73.60813f, -2538.564f, -6.989857f, -183.2556f, -2465.145f, 25.0203f, 70f, 0, true))
		{
			return true;
		}
	}
	if (!iParam3)
	{
		if (object::is_point_in_angled_area(vParam0, -1171.709f, -1524.66f, 23.37969f, -1139.721f, -1573.589f, -1.585432f, 55f, 0, true))
		{
			return true;
		}
		if (object::is_point_in_angled_area(vParam0, 476.5394f, -1301.548f, 44.82458f, 499.5822f, -1339.025f, 26.31703f, 35f, 0, true) || object::is_point_in_angled_area(vParam0, 496.9816f, -1412.255f, 43.29391f, 497.269f, -1339.364f, 26.31648f, 40f, 0, true))
		{
			return true;
		}
	}
	return false;
}

float func_304(struct<2> Param0, float fParam2, struct<2> Param3, var uParam5, int iParam6)//Position - 0x112A9
{
	float fVar0;
	float fVar1;
	float fVar2;
	
	fVar1 = (Param3 - Param0);
	fVar2 = (Param3.f_1 - Param0.f_1);
	if (fVar2 != 0f)
	{
		fVar0 = gameplay::atan2(fVar1, fVar2);
	}
	else if (fVar1 < 0f)
	{
		fVar0 = -90f;
	}
	else
	{
		fVar0 = 90f;
	}
	if (iParam6 == 1)
	{
		fVar0 = (fVar0 * -1f);
		if (fVar0 < 0f)
		{
			fVar0 = (fVar0 + 360f);
		}
	}
	return fVar0;
}

bool func_305(vector3 vParam0)//Position - 0x1130E
{
	if (object::is_point_in_angled_area(vParam0, -1061.018f, -2540.235f, 18.66932f, -1023.332f, -2562.115f, 31.57616f, 250f, 0, true))
	{
		return true;
	}
	else if (object::is_point_in_angled_area(vParam0, -1061.059f, -2540.254f, 10.94467f, -1023.297f, -2562.052f, 18.51685f, 250f, 0, true))
	{
		return true;
	}
	else if (object::is_point_in_angled_area(vParam0, -1043.364f, -2747.29f, 16.96057f, -991.5368f, -2657.682f, 69.12349f, 200f, 0, true))
	{
		return true;
	}
	else if (object::is_point_in_angled_area(vParam0, -1047.646f, -2754.947f, 2.941969f, -991.7314f, -2653.153f, 16.89228f, 200f, 0, true) || object::is_point_in_angled_area(vParam0, -1116.893f, -2675.671f, 12.17757f, -1183.933f, -2789.451f, 38.95185f, 53f, 0, true))
	{
		return true;
	}
	return false;
}

void func_306()//Position - 0x11423
{
	int iVar0;
	
	if (network::network_is_participant_active(network::participant_id()))
	{
		iVar0 = 0;
		iVar0 = 0;
		while (iVar0 < 8)
		{
			if (gameplay::is_bit_set(Local_288[network::participant_id_to_int() /*44*/].f_4.f_3, iVar0))
			{
				if ((Local_93.f_2[iVar0 /*23*/].f_7 == 11 || Local_93.f_2[iVar0 /*23*/].f_7 == 9) || Local_93.f_2[iVar0 /*23*/].f_7 == 10)
				{
					gameplay::clear_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_4.f_3), iVar0);
				}
				else if (!network::network_does_network_id_exist(Local_93.f_2[iVar0 /*23*/].f_1))
				{
					gameplay::clear_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_4.f_3), iVar0);
				}
			}
			iVar0++;
		}
	}
}

void func_307()//Position - 0x114D3
{
	int iVar0;
	
	if (network::network_is_participant_active(network::participant_id()))
	{
		iVar0 = 0;
		iVar0 = 0;
		while (iVar0 < 8)
		{
			if (Local_93.f_2[iVar0 /*23*/].f_3 != -1)
			{
				if (Local_93.f_2[iVar0 /*23*/].f_3 != network::participant_id_to_int())
				{
					if (network::network_does_network_id_exist(Local_93.f_2[iVar0 /*23*/]))
					{
						if (network::network_has_control_of_network_id(Local_93.f_2[iVar0 /*23*/]))
						{
							network::set_network_id_can_migrate(Local_93.f_2[iVar0 /*23*/], true);
						}
					}
					if (network::network_does_network_id_exist(Local_93.f_2[iVar0 /*23*/].f_1))
					{
						if (network::network_has_control_of_network_id(Local_93.f_2[iVar0 /*23*/].f_1))
						{
							network::set_network_id_can_migrate(Local_93.f_2[iVar0 /*23*/].f_1, true);
						}
					}
				}
			}
			else if (Local_93.f_2[iVar0 /*23*/].f_2 != -1)
			{
				if (Local_93.f_2[iVar0 /*23*/].f_2 == network::participant_id_to_int())
				{
					if (network::network_does_network_id_exist(Local_93.f_2[iVar0 /*23*/]))
					{
						if (network::network_has_control_of_network_id(Local_93.f_2[iVar0 /*23*/]))
						{
							network::set_network_id_can_migrate(Local_93.f_2[iVar0 /*23*/], false);
						}
						else if (network::network_request_control_of_network_id(Local_93.f_2[iVar0 /*23*/]))
						{
						}
					}
					if (network::network_does_network_id_exist(Local_93.f_2[iVar0 /*23*/].f_1))
					{
						if (network::network_has_control_of_network_id(Local_93.f_2[iVar0 /*23*/].f_1))
						{
							network::set_network_id_can_migrate(Local_93.f_2[iVar0 /*23*/].f_1, false);
						}
					}
				}
				else
				{
					if (network::network_does_network_id_exist(Local_93.f_2[iVar0 /*23*/]))
					{
						if (network::network_has_control_of_network_id(Local_93.f_2[iVar0 /*23*/]))
						{
							network::set_network_id_can_migrate(Local_93.f_2[iVar0 /*23*/], true);
						}
					}
					if (network::network_does_network_id_exist(Local_93.f_2[iVar0 /*23*/].f_1))
					{
						if (network::network_has_control_of_network_id(Local_93.f_2[iVar0 /*23*/].f_1))
						{
							network::set_network_id_can_migrate(Local_93.f_2[iVar0 /*23*/].f_1, true);
						}
					}
				}
			}
			else
			{
				if (network::network_does_network_id_exist(Local_93.f_2[iVar0 /*23*/]))
				{
					if (network::network_has_control_of_network_id(Local_93.f_2[iVar0 /*23*/]))
					{
						network::set_network_id_can_migrate(Local_93.f_2[iVar0 /*23*/], true);
					}
				}
				if (network::network_does_network_id_exist(Local_93.f_2[iVar0 /*23*/].f_1))
				{
					if (network::network_has_control_of_network_id(Local_93.f_2[iVar0 /*23*/].f_1))
					{
						network::set_network_id_can_migrate(Local_93.f_2[iVar0 /*23*/].f_1, true);
					}
				}
			}
			iVar0++;
		}
	}
}

void func_308()//Position - 0x116C5
{
	switch (Local_288[network::participant_id_to_int() /*44*/].f_43)
	{
		case 0:
			if (Local_93.f_191 > 0)
			{
				Local_288[network::participant_id_to_int() /*44*/].f_43 = 1;
			}
			break;
		
		case 1:
			func_319();
			func_309();
			if (Local_93.f_191 >= 4)
			{
				Local_288[network::participant_id_to_int() /*44*/].f_43 = 4;
			}
			break;
		
		case 2:
			break;
		
		case 3:
			break;
		
		case 4:
			func_348();
			break;
	}
}

void func_309()//Position - 0x1173E
{
	int iVar0;
	
	iVar0 = network::get_num_reserved_mission_vehicles(false);
	if (Local_93.f_189 != iVar0)
	{
		if (Local_93.f_189 < iVar0 || func_310(Local_93.f_189, Local_93.f_189, Local_93.f_189, 0, 1))
		{
			network::reserve_network_mission_vehicles(Local_93.f_189);
			network::reserve_network_mission_peds(Local_93.f_189);
			network::reserve_network_mission_objects(Local_93.f_189);
		}
	}
}

bool func_310(int iParam0, int iParam1, int iParam2, int iParam3, int iParam4)//Position - 0x11790
{
	if ((func_318(iParam0, iParam3, iParam4) && func_317(iParam1, iParam3, iParam4)) && func_311(iParam2, iParam3, iParam4))
	{
		return true;
	}
	return false;
}

int func_311(int iParam0, int iParam1, int iParam2)//Position - 0x117C8
{
	return func_312(2, iParam0, 1, iParam1, iParam2);
}

bool func_312(int iParam0, int iParam1, int iParam2, int iParam3, int iParam4)//Position - 0x117DC
{
	int iVar0;
	int iVar1;
	
	if (!gameplay::is_bit_set(Global_1348769, 0))
	{
		return false;
	}
	if ((iParam2 && !iParam3) && iParam1 <= (func_316(iParam0) - func_315(iParam0, 0)))
	{
		return true;
	}
	else
	{
		if (iParam3)
		{
			if (iParam2)
			{
				iVar0 = (iParam1 - func_315(iParam0, 0));
			}
			else
			{
				iVar0 = iParam1;
			}
			iVar1 = (func_316(iParam0) - func_314(iParam0));
		}
		else
		{
			if (iParam2)
			{
				iVar0 = (iParam1 - func_315(iParam0, 0));
			}
			else
			{
				iVar0 = iParam1;
			}
			iVar1 = (func_316(iParam0) - func_315(iParam0, 1));
		}
		if (!iParam4 && Global_1587523[player::player_id() /*444*/] != 3)
		{
			iVar1 = (iVar1 - func_313(iParam0));
		}
		if (iVar0 < iVar1)
		{
			return true;
		}
	}
	return false;
}

int func_313(int iParam0)//Position - 0x118A5
{
	switch (iParam0)
	{
		case 0:
			return 10;
			break;
		
		case 1:
			return 10;
			break;
		
		case 2:
			return 10;
			break;
	}
	return 0;
}

int func_314(int iParam0)//Position - 0x118DF
{
	switch (iParam0)
	{
		case 0:
			return Global_1348769.f_1;
			break;
		
		case 1:
			return Global_1348769.f_2;
			break;
		
		case 2:
			return Global_1348769.f_3;
			break;
	}
	return 0;
}

int func_315(int iParam0, int iParam1)//Position - 0x11925
{
	int iVar0;
	
	iVar0 = player::player_id();
	switch (iParam0)
	{
		case 0:
			if (!network::network_get_this_script_is_network_script())
			{
				return Global_2418472[iVar0 /*313*/].f_207;
			}
			else
			{
				return network::get_num_reserved_mission_peds(!iParam1);
			}
			break;
		
		case 1:
			if (!network::network_get_this_script_is_network_script())
			{
				return Global_2418472[iVar0 /*313*/].f_208;
			}
			else
			{
				return network::get_num_reserved_mission_vehicles(!iParam1);
			}
			break;
		
		case 2:
			if (!network::network_get_this_script_is_network_script())
			{
				return Global_2418472[iVar0 /*313*/].f_209;
			}
			else
			{
				return network::get_num_reserved_mission_objects(!iParam1);
			}
			break;
	}
	return 0;
}

int func_316(int iParam0)//Position - 0x119BF
{
	switch (iParam0)
	{
		case 0:
			return Global_1348777;
			break;
		
		case 1:
			return Global_1348778;
			break;
		
		case 2:
			return Global_1348779;
			break;
	}
	return 0;
}

int func_317(int iParam0, int iParam1, int iParam2)//Position - 0x119FF
{
	return func_312(1, iParam0, 1, iParam1, iParam2);
}

int func_318(int iParam0, int iParam1, int iParam2)//Position - 0x11A13
{
	return func_312(0, iParam0, 1, iParam1, iParam2);
}

void func_319()//Position - 0x11A27
{
	int iVar0;
	struct<2> Var1;
	
	switch (iLocal_1725)
	{
		case 0:
			if (func_333(131))
			{
				iVar0 = func_323();
				if (iVar0 == 0)
				{
					func_20(&uLocal_2633, 7, 0, "TaxiDispatch", 0, 1);
					if (func_322(&uLocal_2633, 131, "MPTXIAU", "MPTXI_P1", 12, 1, 0, 0, 0))
					{
						iLocal_1725 = 1;
					}
				}
				else if (iVar0 == 9)
				{
				}
				else
				{
					StringCopy(&Var1, "MPTXI_N", 16);
					StringIntConCat(&Var1, iVar0, 16);
					func_20(&uLocal_2633, 7, 0, "TaxiDispatch", 0, 1);
					if (func_322(&uLocal_2633, 131, "MPTXIAU", &Var1, 12, 1, 0, 0, 0))
					{
					}
				}
			}
			else if (gameplay::is_bit_set(Global_2460486.f_743, 0))
			{
				if (func_323() == 0)
				{
					if (!func_24(Local_288[network::participant_id_to_int() /*44*/].f_4.f_21))
					{
						Local_288[network::participant_id_to_int() /*44*/].f_4.f_21 = { 0f, 0f, 0f };
						Local_288[network::participant_id_to_int() /*44*/].f_4.f_24 = 0f;
					}
					gameplay::set_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_1), 0);
					iLocal_1725 = 2;
				}
				gameplay::clear_bit(&(Global_2460486.f_743), 0);
			}
			break;
		
		case 1:
			if (func_321())
			{
				if (!func_320())
				{
					if (!func_24(Local_288[network::participant_id_to_int() /*44*/].f_4.f_21))
					{
						Local_288[network::participant_id_to_int() /*44*/].f_4.f_21 = { 0f, 0f, 0f };
						Local_288[network::participant_id_to_int() /*44*/].f_4.f_24 = 0f;
					}
					gameplay::set_bit(&(Local_288[network::participant_id_to_int() /*44*/].f_1), 0);
					iLocal_1725 = 2;
				}
				else
				{
					iLocal_1725 = 0;
				}
			}
			break;
		
		case 2:
			if (!gameplay::is_bit_set(Local_288[network::participant_id_to_int() /*44*/].f_1, 0))
			{
				iLocal_1725 = 0;
			}
			break;
	}
}

bool func_320()//Position - 0x11BC3
{
	if (Global_15761 == 1 || Global_16728 == 1)
	{
		return true;
	}
	return false;
}

bool func_321()//Position - 0x11BE6
{
	if (Global_15712 == 0)
	{
		return true;
	}
	return false;
}

int func_322(var uParam0, int iParam1, char* sParam2, char* sParam3, int iParam4, int iParam5, int iParam6, int iParam7, int iParam8)//Position - 0x11BFD
{
	func_131(uParam0, iParam1, sParam2, iParam6, iParam7, 0);
	Global_15760 = 0;
	Global_15719 = 1;
	Global_15726 = 0;
	Global_15721 = 0;
	Global_16703 = 0;
	Global_16705 = 0;
	Global_16709 = 0;
	Global_15717 = 0;
	Global_15764 = 0;
	Global_15766 = 0;
	if (iParam5 == 1)
	{
		Global_15724 = 1;
	}
	else
	{
		Global_15724 = 0;
	}
	Global_2621441 = 1;
	return func_117(sParam3, iParam4, iParam8);
}

int func_323()//Position - 0x11C5C
{
	int iVar0;
	int iVar1;
	vector3 vVar2;
	vector3 vVar5;
	float fVar8;
	int iVar9;
	
	if (!gameplay::is_bit_set(Global_2460486.f_743, 0))
	{
		if (IntToFloat(func_161(player::player_id())) <= (IntToFloat(iLocal_1903) * 1.5f))
		{
			if (!ui::is_help_message_being_displayed())
			{
				func_164("TXM_H03", -1);
			}
			return 9;
		}
		if (player::is_player_wanted_level_greater(player::player_id(), 0))
		{
			return 2;
		}
	}
	if (!func_29())
	{
		return 1;
	}
	if (func_332(network::participant_id_to_int()))
	{
		return 9;
	}
	iVar0 = player::get_player_ped(network::network_get_player_index(network::participant_id()));
	if (!ped::is_ped_injured(iVar0))
	{
		if (ped::is_ped_in_any_vehicle(iVar0, 0))
		{
			iVar1 = ped::get_vehicle_ped_is_in(iVar0, 0);
			if (vehicle::is_vehicle_driveable(iVar1, 0))
			{
				if (vehicle::is_vehicle_model(iVar1, joaat("taxi")))
				{
					return 9;
				}
			}
		}
	}
	if (func_331(network::participant_id_to_int()))
	{
		return 4;
	}
	if (Local_288[network::participant_id_to_int() /*44*/].f_4 != -1)
	{
		return 4;
	}
	if (gameplay::is_bit_set(Local_288[network::participant_id_to_int() /*44*/].f_1, 0))
	{
		return 4;
	}
	if (func_170(player::player_id(), 1) && Global_1587523[player::player_id() /*444*/] != 16)
	{
		return 1;
	}
	if (entity::get_entity_speed(player::player_ped_id()) >= 6f)
	{
		return 9;
	}
	if (func_330(player::player_id(), 1, 0))
	{
		return 9;
	}
	if (func_329(player::player_id(), 0))
	{
		return 9;
	}
	if (func_328())
	{
		return 3;
	}
	if (!func_324(1, 1, 1, 1, 0))
	{
		return 1;
	}
	vVar2 = { entity::get_entity_coords(player::player_ped_id(), 1) };
	fVar8 = 50f;
	iVar9 = 1;
	if (!func_185(vVar2))
	{
		iVar9 = 9;
	}
	if (!pathfind::get_closest_vehicle_node(vVar2, &vVar5, iVar9, 100f, 2.5f))
	{
		return 3;
	}
	if (!entity::is_entity_at_coord(player::player_ped_id(), vVar5, fVar8, fVar8, 20f, false, true, 0))
	{
		return 3;
	}
	if (func_303(vVar2, 1))
	{
		return 3;
	}
	return 0;
}

bool func_324(int iParam0, int iParam1, int iParam2, int iParam3, int iParam4)//Position - 0x11E38
{
	if ((func_327(iParam0, iParam3, iParam4) || func_326(iParam1, iParam3, iParam4)) || func_325(iParam2, iParam3, iParam4))
	{
		return true;
	}
	return false;
}

int func_325(int iParam0, int iParam1, int iParam2)//Position - 0x11E72
{
	return func_312(2, iParam0, 0, iParam1, iParam2);
}

int func_326(int iParam0, int iParam1, int iParam2)//Position - 0x11E86
{
	return func_312(1, iParam0, 0, iParam1, iParam2);
}

int func_327(int iParam0, int iParam1, int iParam2)//Position - 0x11E9A
{
	return func_312(0, iParam0, 0, iParam1, iParam2);
}

bool func_328()//Position - 0x11EAE
{
	if (func_10(player::player_id(), 1, 1))
	{
		if (entity::is_entity_in_area(player::player_ped_id(), -64f, -850f, 200f, -84f, -795f, 340f, 0, 1, 0))
		{
			return true;
		}
	}
	return false;
}

int func_329(int iParam0, int iParam1)//Position - 0x11EF4
{
	return gameplay::is_bit_set(Global_2418472[iParam0 /*313*/].f_206, iParam1);
}

bool func_330(int iParam0, int iParam1, int iParam2)//Position - 0x11F0D
{
	if (iParam0 == func_243())
	{
		return false;
	}
	if (gameplay::is_bit_set(Global_1587523[iParam0 /*444*/].f_250.f_7, 0))
	{
		return true;
	}
	if (iParam1)
	{
		if (gameplay::is_bit_set(Global_1587523[iParam0 /*444*/].f_250.f_7, 1))
		{
			return true;
		}
	}
	if (iParam2)
	{
		if (Global_2418472[iParam0 /*313*/].f_305.f_1 != -1)
		{
			return true;
		}
	}
	return false;
}

bool func_331(int iParam0)//Position - 0x11F75
{
	int iVar0;
	
	if (iParam0 != -1)
	{
		iVar0 = 0;
		while (iVar0 < 8)
		{
			if (Local_93.f_2[iVar0 /*23*/].f_2 != -1)
			{
				if (Local_93.f_2[iVar0 /*23*/].f_2 == iParam0)
				{
					return true;
				}
			}
			iVar0++;
		}
	}
	return false;
}

bool func_332(int iParam0)//Position - 0x11FBB
{
	int iVar0;
	
	if (iParam0 != -1)
	{
		iVar0 = 0;
		while (iVar0 < 8)
		{
			if (Local_93.f_2[iVar0 /*23*/].f_3 != -1)
			{
				if (Local_93.f_2[iVar0 /*23*/].f_3 == iParam0)
				{
					return true;
				}
			}
			iVar0++;
		}
	}
	return false;
}

bool func_333(int iParam0)//Position - 0x12001
{
	if ((Global_16826 || Global_16825) || Global_16827)
	{
		if (iParam0 == 130)
		{
		}
		else
		{
			return false;
		}
	}
	if (Global_117[iParam0 /*10*/].f_8 != 138)
	{
		if (Global_14413.f_1 == 10)
		{
			if (Global_1598 == iParam0)
			{
				return true;
			}
			else
			{
				return false;
			}
		}
		else
		{
			return false;
		}
	}
	return false;
}

int func_334()//Position - 0x12065
{
	return Local_93;
}

var func_335(int iParam0)//Position - 0x1206F
{
	return Local_288[iParam0 /*44*/];
}

int func_336()//Position - 0x1207E
{
	return gameplay::is_bit_set(Global_1587523[player::player_id() /*444*/].f_131, 18);
}

bool func_337()//Position - 0x12099
{
	int iVar0;
	
	func_344(&iVar0);
	if (iVar0)
	{
		return true;
	}
	if (Global_1315888 == 0)
	{
		if (!network::network_is_game_in_progress())
		{
			return true;
		}
	}
	if (func_343())
	{
		return true;
	}
	if (Global_2445442)
	{
		return true;
	}
	if (func_342())
	{
		return true;
	}
	if (func_341(157))
	{
		if (!func_340())
		{
			return true;
		}
	}
	if (func_341(155))
	{
		return true;
	}
	if (!network::network_is_signed_online())
	{
		return true;
	}
	if (func_338() != 0)
	{
		if (script::_get_number_of_instances_of_streamed_script(func_338()) == 0)
		{
			return true;
		}
	}
	return false;
}

int func_338()//Position - 0x1212C
{
	switch (func_339())
	{
		case 0:
			return joaat("freemode");
			break;
		
		case 2:
			return joaat("creator");
			break;
	}
	return 0;
}

var func_339()//Position - 0x12160
{
	return Global_25120;
}

var func_340()//Position - 0x1216B
{
	return Global_2434762.f_574;
}

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

var func_342()//Position - 0x12191
{
	return Global_2443085;
}

var func_343()//Position - 0x1219D
{
	return Global_2434762.f_569;
}

void func_344(var uParam0)//Position - 0x121AC
{
	int iVar0;
	int iVar1;
	int iVar2;
	vector3 vVar4;
	
	iVar0 = 0;
	while (iVar0 < script::get_number_of_events(1))
	{
		iVar1 = script::get_event_at_index(1, iVar0);
		if (iVar1 == 168)
		{
			script::get_event_data(1, iVar0, &iVar2, 2);
			switch (iVar2)
			{
				case 339:
					func_345(iVar0);
					break;
				
				case 2:
					script::get_event_data(1, iVar0, &vVar4, 3);
					if (vVar4.y == 55)
					{
						*uParam0 = 1;
					}
					break;
				}
		}
		iVar0++;
	}
}

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

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

void func_347()//Position - 0x122EB
{
	system::wait(0);
}

void func_348()//Position - 0x122F8
{
	int iVar0;
	
	iVar0 = 0;
	while (iVar0 < 8)
	{
		if (network::network_does_network_id_exist(Local_93.f_2[iVar0 /*23*/]))
		{
			if (network::network_has_control_of_network_id(Local_93.f_2[iVar0 /*23*/]))
			{
				network::set_network_id_can_migrate(Local_93.f_2[iVar0 /*23*/], true);
			}
		}
		if (network::network_does_network_id_exist(Local_93.f_2[iVar0 /*23*/].f_1))
		{
			if (network::network_has_control_of_network_id(Local_93.f_2[iVar0 /*23*/].f_1))
			{
				network::set_network_id_can_migrate(Local_93.f_2[iVar0 /*23*/].f_1, true);
			}
		}
		iVar0++;
	}
	if (cam::does_cam_exist(iLocal_2612))
	{
		if (cam::is_cam_active(iLocal_2612))
		{
			func_38();
		}
	}
	if (iLocal_1899)
	{
		cam::set_cinematic_button_active(true);
	}
	if (entity::does_entity_exist(iLocal_1736))
	{
		object::delete_object(&iLocal_1736);
		streaming::set_model_as_no_longer_needed(iLocal_1737);
	}
	if (ui::is_named_rendertarget_registered("taxi"))
	{
		ui::release_named_rendertarget("taxi");
	}
	func_349();
}

void func_349()//Position - 0x123C0
{
	script::terminate_this_thread();
}

bool func_350(struct<20> Param0)//Position - 0x123CC
{
	func_356(32, Param0);
	func_354(0, -1, 0);
	network::network_register_host_broadcast_variables(&Local_93, 195);
	network::network_register_player_broadcast_variables(&Local_288, 1409);
	gameplay::set_this_script_can_be_paused(0);
	if (!func_353())
	{
		return false;
	}
	if (network::network_is_game_in_progress())
	{
		func_351(131, 3, gameplay::is_bit_set(Global_2460486.f_743, 4));
		func_35(&uLocal_1728, 0, 0);
		Local_288[network::participant_id_to_int() /*44*/] = 0;
	}
	return true;
}

void func_351(int iParam0, int iParam1, int iParam2)//Position - 0x12437
{
	Global_2969 = iParam0;
	if (Global_117[iParam0 /*10*/].f_8 != 138)
	{
		func_122();
		if (iParam1 == 4)
		{
			Global_101154.f_32575[iParam0 /*29*/].f_12[0] = 1;
			Global_101154.f_32575[iParam0 /*29*/].f_12[1] = 1;
			Global_101154.f_32575[iParam0 /*29*/].f_12[2] = 1;
			Global_101154.f_32575[iParam0 /*29*/].f_24[0] = 1;
			Global_101154.f_32575[iParam0 /*29*/].f_24[1] = 1;
			Global_101154.f_32575[iParam0 /*29*/].f_24[2] = 1;
		}
		else
		{
			if (Global_101154.f_32575[iParam0 /*29*/].f_12[iParam1] == 1 && Global_101154.f_32575[iParam0 /*29*/].f_24[iParam1] == 1)
			{
				iParam2 = false;
			}
			Global_101154.f_32575[iParam0 /*29*/].f_12[iParam1] = 1;
			Global_101154.f_32575[iParam0 /*29*/].f_24[iParam1] = 1;
		}
		if (iParam2)
		{
			if (!Global_69489)
			{
				if (iParam1 != 4)
				{
					if (Global_14413 != iParam1)
					{
						Global_2942[iParam1 /*4*/] = { Global_101154.f_32575[iParam0 /*29*/].f_3 };
						Global_2959[iParam1] = 1;
						Global_2964[iParam1] = iParam0;
					}
					else if (iParam0 == Global_14413)
					{
					}
					else
					{
						Global_2893[1 /*6*/] = { Global_101154.f_32575[iParam0 /*29*/].f_3 };
						Global_2893[1 /*6*/].f_5 = iParam1;
						func_352();
					}
				}
				else
				{
					Global_2893[1 /*6*/] = { Global_101154.f_32575[iParam0 /*29*/].f_3 };
					Global_2893[1 /*6*/].f_5 = iParam1;
					func_352();
				}
			}
			else
			{
				Global_2893[1 /*6*/] = { Global_101154.f_32575[iParam0 /*29*/].f_3 };
				Global_2893[1 /*6*/].f_5 = iParam1;
				func_352();
			}
		}
	}
}

void func_352()//Position - 0x125E1
{
	char cVar0[64];
	char cVar16[64];
	char* sVar32;
	
	StringCopy(&cVar0, ui::_get_label_text(&(Global_101154.f_32575[Global_2969 /*29*/].f_7)), 64);
	if (Global_2988 == 0)
	{
		ui::_set_notification_text_entry("");
		StringCopy(&cVar16, ui::_get_label_text(&(Global_2893[1 /*6*/])), 64);
		sVar32 = ui::_get_label_text("CELL_253");
		ui::_set_notification_message(&cVar0, &cVar0, 0, 3, sVar32, &cVar16);
	}
	else
	{
		ui::_set_notification_text_entry("CELL_255");
		ui::_add_text_component_item_string(&(Global_2893[1 /*6*/]));
		ui::_set_notification_message(&cVar0, &cVar0, 0, 3, "", 0);
	}
	gameplay::clear_bit(&Global_2283, 0);
}

bool func_353()//Position - 0x12660
{
	int iVar0;
	
	iVar0 = 0;
	while (true)
	{
		iVar0++;
		if (!network::network_is_game_in_progress())
		{
			return false;
		}
		if (network::_0x5D10B3795F3FC886())
		{
			return true;
		}
		if (func_343())
		{
			return false;
		}
		if (func_341(155))
		{
			return false;
		}
		if (iVar0 >= 3600)
		{
			return false;
		}
		system::wait(0);
	}
	return false;
}

bool func_354(int iParam0, int iParam1, int iParam2)//Position - 0x126B9
{
	int iVar0;
	
	iVar0 = network::network_get_script_status();
	while (iVar0 != 2)
	{
		if (((iVar0 == 3 || iVar0 == 4) || iVar0 == 5) || iVar0 == 6)
		{
			if (!iParam2)
			{
				func_349();
			}
			else
			{
				return false;
			}
		}
		if (!func_355())
		{
			if (iParam0 == 0)
			{
				if (!network::network_is_game_in_progress())
				{
					if (!iParam2)
					{
						func_349();
					}
					else
					{
						return false;
					}
				}
				if (func_343())
				{
					if (!iParam2)
					{
						func_349();
					}
					else
					{
						return false;
					}
				}
				if (func_341(155))
				{
					if (!iParam2)
					{
						func_349();
					}
					else
					{
						return false;
					}
				}
			}
			else if (!network::network_is_in_session())
			{
				if (!iParam2)
				{
					func_349();
				}
				else
				{
					return false;
				}
			}
		}
		system::wait(0);
		iVar0 = network::network_get_script_status();
	}
	if (iParam1 > -1)
	{
		Global_1312502 = iVar0;
	}
	if (iParam0 == 0)
	{
		if (!network::network_is_game_in_progress())
		{
			if (!iParam2)
			{
				func_349();
			}
			else
			{
				return false;
			}
		}
	}
	else if (!network::network_is_in_session())
	{
		if (!iParam2)
		{
			func_349();
		}
		else
		{
			return false;
		}
	}
	return true;
}

var func_355()//Position - 0x127CE
{
	return Global_1315888;
}

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

